[URLMON_WINETEST] Sync with Wine Staging 1.9.16. CORE-11866
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 18 Aug 2016 10:46:40 +0000 (10:46 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 18 Aug 2016 10:46:40 +0000 (10:46 +0000)
svn path=/trunk/; revision=72310

rostests/winetests/urlmon/misc.c
rostests/winetests/urlmon/protocol.c
rostests/winetests/urlmon/stream.c
rostests/winetests/urlmon/url.c

index fedc762..53cbb3c 100644 (file)
@@ -1642,7 +1642,7 @@ static void test_MkParseDisplayNameEx(void)
     ok(mon != NULL, "mon == NULL\n");
 
     hres = IMoniker_GetDisplayName(mon, NULL, 0, &name);
-    ok(hres == S_OK, "GetDiasplayName failed: %08x\n", hres);
+    ok(hres == S_OK, "GetDisplayName failed: %08x\n", hres);
     ok(!lstrcmpW(name, url9), "wrong display name %s\n", wine_dbgstr_w(name));
     CoTaskMemFree(name);
 
index a87a3b0..096768d 100644 (file)
@@ -2585,9 +2585,7 @@ static void test_file_protocol_url(LPCWSTR url)
             hres = IInternetProtocol_UnlockRequest(protocol);
             ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
             hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
-            if(file_with_hash) /* FIXME: An effect of UnlockRequest call? */
-                todo_wine ok(hres == S_OK, "Read failed: %08x\n", hres);
-            else
+            todo_wine_if(file_with_hash) /* FIXME: An effect of UnlockRequest call? */
                 ok(hres == S_OK, "Read failed: %08x\n", hres);
             hres = IInternetProtocol_Terminate(protocol, 0);
             ok(hres == S_OK, "Terminate failed: %08x\n", hres);
index ecc1bd8..afa91cc 100644 (file)
@@ -333,6 +333,21 @@ static void test_URLOpenBlockingStreamW(void)
     ok(pStream != NULL, "pStream is NULL\n");
     if(pStream)
     {
+        buffer[0] = 0;
+        hr = IStream_Read(pStream, buffer, sizeof(buffer), NULL);
+        ok(hr == S_OK, "IStream_Read failed with error 0x%08x\n", hr);
+        ok(!memcmp(buffer, szHtmlDoc, sizeof(szHtmlDoc)-1), "read data differs from file\n");
+
+        IStream_Release(pStream);
+    }
+
+    hr = URLOpenBlockingStreamW(NULL, INDEX_HTML, &pStream, 0, NULL);
+    ok(hr == S_OK, "URLOpenBlockingStreamW failed with error 0x%08x\n", hr);
+
+    ok(pStream != NULL, "pStream is NULL\n");
+    if(pStream)
+    {
+        buffer[0] = 0;
         hr = IStream_Read(pStream, buffer, sizeof(buffer), NULL);
         ok(hr == S_OK, "IStream_Read failed with error 0x%08x\n", hr);
         ok(!memcmp(buffer, szHtmlDoc, sizeof(szHtmlDoc)-1), "read data differs from file\n");
@@ -370,6 +385,9 @@ static void test_URLOpenStreamW(void)
     CHECK_CALLED(OnProgress_ENDDOWNLOADDATA);
     CHECK_CALLED(OnDataAvailable);
     CHECK_CALLED(OnStopBinding);
+
+    hr = URLOpenStreamW(NULL, INDEX_HTML, 0, NULL);
+    ok(hr == S_OK, "URLOpenStreamW failed with error 0x%08x\n", hr);
 }
 
 START_TEST(stream)
index 13d5462..1326917 100644 (file)
@@ -3095,14 +3095,10 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t)
     if(!no_callback) {
         CLEAR_CALLED(QueryInterface_IBindStatusCallbackEx); /* IE 8 */
         CHECK_CALLED(GetBindInfo);
-        if(abort_start)
-            todo_wine CHECK_CALLED(QueryInterface_IInternetProtocol);
-        else
+        todo_wine_if(abort_start)
             CHECK_CALLED(QueryInterface_IInternetProtocol);
         if(!emulate_protocol) {
-            if(abort_start)
-                todo_wine CHECK_CALLED(QueryService_IInternetProtocol);
-            else
+            todo_wine_if(abort_start)
                 CHECK_CALLED(QueryService_IInternetProtocol);
         }
         CHECK_CALLED(OnStartBinding);