Paul Vriens : wininet/tests: Fix a test failure on IE8.

Alexandre Julliard julliard at winehq.org
Thu Sep 10 09:09:13 CDT 2009


Module: wine
Branch: master
Commit: bf1b965e96e695f376ddf9140e4c17e687771899
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bf1b965e96e695f376ddf9140e4c17e687771899

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Thu Sep 10 15:17:17 2009 +0200

wininet/tests: Fix a test failure on IE8.

---

 dlls/wininet/tests/http.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index b11cb2c..dda4a41 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -1162,13 +1162,20 @@ static void test_http_cache(void)
     ok(ret, "HttpSendRequest failed: %u\n", GetLastError());
 
     size = sizeof(file_name);
+    file_name[0] = 0;
     ret = InternetQueryOptionA(request, INTERNET_OPTION_DATAFILE_NAME, file_name, &size);
-    ok(ret, "InternetQueryOptionA(INTERNET_OPTION_DATAFILE_NAME) failed %u\n", GetLastError());
-
-    file = CreateFile(file_name, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
+    if (ret)
+    {
+        file = CreateFile(file_name, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
                       FILE_ATTRIBUTE_NORMAL, NULL);
-    ok(file != INVALID_HANDLE_VALUE, "Could not create file: %u\n", GetLastError());
-    CloseHandle(file);
+        ok(file != INVALID_HANDLE_VALUE, "Could not create file: %u\n", GetLastError());
+        CloseHandle(file);
+    }
+    else
+    {
+        /* < IE8 */
+        ok(file_name[0] == 0, "Didn't expect a file name\n");
+    }
 
     ok(InternetCloseHandle(request), "Close request handle failed\n");
     ok(InternetCloseHandle(connect), "Close connect handle failed\n");




More information about the wine-cvs mailing list