[Win] The test http/tests/loading/main-resource-delegates-on-back-navigation.html...
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jul 2016 17:19:56 +0000 (17:19 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Jul 2016 17:19:56 +0000 (17:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=159509

Reviewed by Alex Christensen.

We should always insert the url in the url map when identifierForInitialRequest
is called. Otherwise we can end up with identifiers not having an entry in the
url map when urls are written to the test output file.

* DumpRenderTree/win/ResourceLoadDelegate.cpp:
(ResourceLoadDelegate::identifierForInitialRequest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202913 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/DumpRenderTree/win/ResourceLoadDelegate.cpp

index c891311..7471dd5 100644 (file)
@@ -1,3 +1,17 @@
+2016-07-07  Per Arne Vollan  <pvollan@apple.com>
+
+        [Win] The test http/tests/loading/main-resource-delegates-on-back-navigation.html is failing.
+        https://bugs.webkit.org/show_bug.cgi?id=159509
+
+        Reviewed by Alex Christensen.
+
+        We should always insert the url in the url map when identifierForInitialRequest
+        is called. Otherwise we can end up with identifiers not having an entry in the
+        url map when urls are written to the test output file. 
+
+        * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+        (ResourceLoadDelegate::identifierForInitialRequest):
+
 2016-07-06  Tim Horton  <timothy_horton@apple.com>
 
         Email from June 1st containing text 'Today @ 7:10PM' is linkified, but shouldn't be
index d80d9da..a645e7f 100644 (file)
@@ -199,14 +199,12 @@ ULONG ResourceLoadDelegate::Release()
 HRESULT ResourceLoadDelegate::identifierForInitialRequest(_In_opt_ IWebView* webView, _In_opt_ IWebURLRequest* request,
     _In_opt_ IWebDataSource* dataSource, unsigned long identifier)
 { 
-    if (!done && gTestRunner->dumpResourceLoadCallbacks()) {
-        _bstr_t urlStr;
-        if (FAILED(request->URL(&urlStr.GetBSTR())))
-            return E_FAIL;
+    _bstr_t urlStr;
+    if (FAILED(request->URL(&urlStr.GetBSTR())))
+        return E_FAIL;
 
-        ASSERT(!urlMap().contains(identifier));
-        urlMap().set(identifier, wstringFromBSTR(urlStr));
-    }
+    ASSERT(!urlMap().contains(identifier));
+    urlMap().set(identifier, wstringFromBSTR(urlStr));
 
     return S_OK;
 }