Jacek Caban : urlmon: Fixed tests on IE7.

Alexandre Julliard julliard at winehq.org
Fri Oct 26 08:34:43 CDT 2007


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Oct 25 22:26:32 2007 +0200

urlmon: Fixed tests on IE7.

---

 dlls/urlmon/mk.c             |    6 +++---
 dlls/urlmon/tests/protocol.c |    5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/dlls/urlmon/mk.c b/dlls/urlmon/mk.c
index 2af01f2..2ae76ed 100644
--- a/dlls/urlmon/mk.c
+++ b/dlls/urlmon/mk.c
@@ -122,6 +122,9 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
     TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl), pOIProtSink,
             pOIBindInfo, grfPI, dwReserved);
 
+    if(strncmpiW(szUrl, wszMK, sizeof(wszMK)/sizeof(WCHAR)))
+        return INET_E_INVALID_URL;
+
     memset(&bindinfo, 0, sizeof(bindinfo));
     bindinfo.cbSize = sizeof(BINDINFO);
     hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bindf, &bindinfo);
@@ -132,9 +135,6 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
 
     ReleaseBindInfo(&bindinfo);
 
-    if(strncmpiW(szUrl, wszMK, sizeof(wszMK)/sizeof(WCHAR)))
-        return MK_E_SYNTAX;
-
     IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_DIRECTBIND, NULL);
     IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, NULL);
 
diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c
index 13b0f15..00335b3 100644
--- a/dlls/urlmon/tests/protocol.c
+++ b/dlls/urlmon/tests/protocol.c
@@ -1404,8 +1404,9 @@ static void test_mk_protocol(void)
 
     SET_EXPECT(GetBindInfo);
     hres = IInternetProtocol_Start(protocol, wrong_url1, &protocol_sink, &bind_info, 0, 0);
-    ok(hres == MK_E_SYNTAX, "Start failed: %08x, expected MK_E_SYNTAX\n", hres);
-    CHECK_CALLED(GetBindInfo);
+    ok(hres == MK_E_SYNTAX || hres == INET_E_INVALID_URL,
+       "Start failed: %08x, expected MK_E_SYNTAX or INET_E_INVALID_URL\n", hres);
+    CLEAR_CALLED(GetBindInfo);
 
     SET_EXPECT(GetBindInfo);
     SET_EXPECT(ReportProgress_DIRECTBIND);




More information about the wine-cvs mailing list