Paul Vriens : wininet/tests: Don't crash on systems with IE5.

Alexandre Julliard julliard at winehq.org
Mon Mar 9 09:40:26 CDT 2009


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

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Sun Mar  8 14:06:48 2009 +0100

wininet/tests: Don't crash on systems with IE5.

---

 dlls/wininet/tests/url.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/dlls/wininet/tests/url.c b/dlls/wininet/tests/url.c
index a3c2d91..39c0286 100644
--- a/dlls/wininet/tests/url.c
+++ b/dlls/wininet/tests/url.c
@@ -305,13 +305,19 @@ static void InternetCrackUrlW_test(void)
         return;
     }
     ok( !r, "InternetCrackUrlW succeeded unexpectedly\n");
-    ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error);
+    ok( error == ERROR_INVALID_PARAMETER ||
+        broken(error == ERROR_INTERNET_UNRECOGNIZED_SCHEME), /* IE5 */
+        "expected ERROR_INVALID_PARAMETER got %u\n", error);
 
-    SetLastError(0xdeadbeef);
-    r = InternetCrackUrlW(url, 0, 0, NULL );
-    error = GetLastError();
-    ok( !r, "InternetCrackUrlW succeeded unexpectedly\n");
-    ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error);
+    if (error == ERROR_INVALID_PARAMETER)
+    {
+        /* Crashes on IE5 */
+        SetLastError(0xdeadbeef);
+        r = InternetCrackUrlW(url, 0, 0, NULL );
+        error = GetLastError();
+        ok( !r, "InternetCrackUrlW succeeded unexpectedly\n");
+        ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error);
+    }
 
     r = InternetCrackUrlW(url, 0, 0, &comp );
     ok( r, "failed to crack url\n");




More information about the wine-cvs mailing list