From bf58fdd197f516a598ee7f098282c058d2d3e908 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Tue, 8 Dec 2009 11:44:29 +0100 Subject: [PATCH] wininet/tests: Mark behavior of IE5 as broken for some ftp tests. --- dlls/wininet/tests/ftp.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/dlls/wininet/tests/ftp.c b/dlls/wininet/tests/ftp.c index 37c71dafd57..d152601b965 100644 --- a/dlls/wininet/tests/ftp.c +++ b/dlls/wininet/tests/ftp.c @@ -438,7 +438,7 @@ static void test_openfile(HINTERNET hFtp, HINTERNET hConnect) bRet = FtpCreateDirectoryA(hFtp, "new_directory_deadbeef"); error = GetLastError(); ok ( bRet == FALSE, "Expected FtpCreateDirectoryA to fail\n"); - ok ( error == ERROR_FTP_TRANSFER_IN_PROGRESS, + ok ( error == ERROR_FTP_TRANSFER_IN_PROGRESS || broken(error == ERROR_INTERNET_EXTENDED_ERROR), "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", error); trace_extended_error(error); @@ -446,22 +446,24 @@ static void test_openfile(HINTERNET hFtp, HINTERNET hConnect) bRet = FtpDeleteFileA(hFtp, "non_existent_file_deadbeef"); error = GetLastError(); ok ( bRet == FALSE, "Expected FtpDeleteFileA to fail\n"); - ok ( error == ERROR_FTP_TRANSFER_IN_PROGRESS, + ok ( error == ERROR_FTP_TRANSFER_IN_PROGRESS || broken(error == ERROR_INTERNET_EXTENDED_ERROR), "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", error); trace_extended_error(error); SetLastError(0xdeadbeef); bRet = FtpGetFileA(hFtp, "welcome.msg", "should_be_non_existing_deadbeef", FALSE, FILE_ATTRIBUTE_NORMAL, FTP_TRANSFER_TYPE_UNKNOWN, 0); - ok ( bRet == FALSE, "Expected FtpGetFileA to fail\n"); - ok ( GetLastError() == ERROR_FTP_TRANSFER_IN_PROGRESS, - "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", GetLastError()); + error = GetLastError(); + ok ( bRet == FALSE || broken(bRet == TRUE), "Expected FtpGetFileA to fail\n"); + ok ( error == ERROR_FTP_TRANSFER_IN_PROGRESS || broken(error == ERROR_SUCCESS), + "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", error); DeleteFileA("should_be_non_existing_deadbeef"); /* Just in case */ SetLastError(0xdeadbeef); hOpenFile2 = FtpOpenFileA(hFtp, "welcome.msg", GENERIC_READ, FTP_TRANSFER_TYPE_ASCII, 0); - ok ( bRet == FALSE, "Expected FtpOpenFileA to fail\n"); - ok ( GetLastError() == ERROR_FTP_TRANSFER_IN_PROGRESS, - "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", GetLastError()); + error = GetLastError(); + ok ( bRet == FALSE || broken(bRet == TRUE), "Expected FtpOpenFileA to fail\n"); + ok ( error == ERROR_FTP_TRANSFER_IN_PROGRESS || broken(error == ERROR_SUCCESS), + "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", error); InternetCloseHandle(hOpenFile2); /* Just in case */ /* Create a temporary local file */ @@ -471,22 +473,25 @@ static void test_openfile(HINTERNET hFtp, HINTERNET hConnect) CloseHandle(hFile); SetLastError(0xdeadbeef); bRet = FtpPutFileA(hFtp, "now_existing_local", "non_existing_remote", FTP_TRANSFER_TYPE_UNKNOWN, 0); + error = GetLastError(); ok ( bRet == FALSE, "Expected FtpPutFileA to fail\n"); - ok ( GetLastError() == ERROR_FTP_TRANSFER_IN_PROGRESS, - "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", GetLastError()); + ok ( error == ERROR_FTP_TRANSFER_IN_PROGRESS || broken(error == ERROR_INTERNET_EXTENDED_ERROR), + "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", error); DeleteFileA("now_existing_local"); SetLastError(0xdeadbeef); bRet = FtpRemoveDirectoryA(hFtp, "should_be_non_existing_deadbeef_dir"); + error = GetLastError(); ok ( bRet == FALSE, "Expected FtpRemoveDirectoryA to fail\n"); - ok ( GetLastError() == ERROR_FTP_TRANSFER_IN_PROGRESS, - "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", GetLastError()); + ok ( error == ERROR_FTP_TRANSFER_IN_PROGRESS || broken(error == ERROR_INTERNET_EXTENDED_ERROR), + "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", error); SetLastError(0xdeadbeef); bRet = FtpRenameFileA(hFtp , "should_be_non_existing_deadbeef", "new"); + error = GetLastError(); ok ( bRet == FALSE, "Expected FtpRenameFileA to fail\n"); - ok ( GetLastError() == ERROR_FTP_TRANSFER_IN_PROGRESS, - "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", GetLastError()); + ok ( error == ERROR_FTP_TRANSFER_IN_PROGRESS || broken(error == ERROR_INTERNET_EXTENDED_ERROR), + "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", error); } InternetCloseHandle(hOpenFile); @@ -748,6 +753,7 @@ static void test_find_first_file(HINTERNET hFtp, HINTERNET hConnect) HINTERNET hSearch; HINTERNET hSearch2; HINTERNET hOpenFile; + DWORD error; /* NULL as the search file ought to return the first file in the directory */ SetLastError(0xdeadbeef); @@ -793,9 +799,10 @@ static void test_find_first_file(HINTERNET hFtp, HINTERNET hConnect) /* This should fail as the OpenFile handle wasn't closed */ SetLastError(0xdeadbeef); hSearch = FtpFindFirstFileA(hFtp, "welcome.msg", &findData, 0, 0); + error = GetLastError(); ok ( hSearch == NULL, "Expected FtpFindFirstFileA to fail\n" ); - ok ( GetLastError() == ERROR_FTP_TRANSFER_IN_PROGRESS, - "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", GetLastError() ); + ok ( error == ERROR_FTP_TRANSFER_IN_PROGRESS || broken(error == ERROR_INTERNET_EXTENDED_ERROR), + "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", error ); InternetCloseHandle(hSearch); /* Just in case */ InternetCloseHandle(hOpenFile);