Unreviewed, rolling out r150386 and r150397.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 May 2013 20:21:24 +0000 (20:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 May 2013 20:21:24 +0000 (20:21 +0000)
http://trac.webkit.org/changeset/150386
http://trac.webkit.org/changeset/150397
https://bugs.webkit.org/show_bug.cgi?id=116572

Broke a test; Alex is going to try again later. (Requested by
thorton on #webkit).

Tools:

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::pathSuitableForTestResult):
(WTR::dumpRequestDescriptionSuitableForTestResult):
(WTR::dumpResponseDescriptionSuitableForTestResult):
(WTR::InjectedBundlePage::willPerformClientRedirectForFrame):
(WTR::InjectedBundlePage::didInitiateLoadForResource):
(WTR::InjectedBundlePage::willSendRequestForFrame):
(WTR::InjectedBundlePage::didReceiveResponseForResource):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
(InjectedBundlePage):

LayoutTests:

* platform/wk2/TestExpectations:

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

LayoutTests/ChangeLog
LayoutTests/platform/wk2/TestExpectations
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h

index 71e027d77f371b381d9f9aa88f3cbab88858e5f0..63569d2e752e85facc829c3a6025526aaa051f5a 100644 (file)
@@ -1,3 +1,15 @@
+2013-05-21  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r150386 and r150397.
+        http://trac.webkit.org/changeset/150386
+        http://trac.webkit.org/changeset/150397
+        https://bugs.webkit.org/show_bug.cgi?id=116572
+
+        Broke a test; Alex is going to try again later. (Requested by
+        thorton on #webkit).
+
+        * platform/wk2/TestExpectations:
+
 2013-05-20  Ryosuke Niwa  <rniwa@webkit.org>
 
         dispatchEvent call can execute javascript and blow away endRoot from underneath
index cca2b87856841490238edc58ad67d42d2e73a835..dcee9d744992969bcb68e7336145cf50ce46a507 100644 (file)
@@ -274,8 +274,6 @@ webkit.org/b/105952 fast/loader/submit-form-while-parsing-2.html [ Pass Failure
 # https://bugs.webkit.org/show_bug.cgi?id=114074
 webkit.org/b/114074 fast/loader/willsendrequest-returns-null-for-memory-cache-load.html [ Failure ]
 
-webkit.org/b/116491 loader/go-back-cached-main-resource.html [ Failure ]
-
 ### END OF (1) Classified failures with bug reports
 ########################################
 
@@ -463,6 +461,14 @@ http/tests/security/contentTypeOptions
 # Unexpected redirection happens.
 http/tests/loading/redirect-methods.html
 
+# Should pass now but need to be checked first.
+platform/mac/fast/loader/file-url-mimetypes-2.html
+platform/mac/fast/loader/file-url-mimetypes-3.html
+platform/mac/fast/loader/file-url-mimetypes.html
+webarchive/loading/cache-expired-subresource.html
+webarchive/loading/test-loading-archive.html
+webarchive/loading/test-loading-archive-subresource-null-mimetype.html
+
 # Should pass now on ports other than EFL and GTK.
 # But it needs to be checked first.
 http/tests/loading/bad-scheme-subframe.html
index 324e1691438523a9a96d11d07e1344294e7d4e79..4ee2efb95cf2db48634e7c45ecefe60e31ec8e81 100644 (file)
@@ -1,3 +1,24 @@
+2013-05-21  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r150386 and r150397.
+        http://trac.webkit.org/changeset/150386
+        http://trac.webkit.org/changeset/150397
+        https://bugs.webkit.org/show_bug.cgi?id=116572
+
+        Broke a test; Alex is going to try again later. (Requested by
+        thorton on #webkit).
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::pathSuitableForTestResult):
+        (WTR::dumpRequestDescriptionSuitableForTestResult):
+        (WTR::dumpResponseDescriptionSuitableForTestResult):
+        (WTR::InjectedBundlePage::willPerformClientRedirectForFrame):
+        (WTR::InjectedBundlePage::didInitiateLoadForResource):
+        (WTR::InjectedBundlePage::willSendRequestForFrame):
+        (WTR::InjectedBundlePage::didReceiveResponseForResource):
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+        (InjectedBundlePage):
+
 2013-05-21  Ryosuke Niwa  <rniwa@webkit.org>
 
         Fix a python unittest after r149419. We need to support Python 2.6 on Windows.
index 4a56768bdcd28693a6548ce19d9ad611908c3cfa..eb50ce0e05020f00930509579986ac802d318cec 100644 (file)
@@ -235,7 +235,7 @@ static inline bool isLocalFileScheme(WKStringRef scheme)
 
 static const char divider = '/';
 
-static inline WTF::String pathSuitableForTestResult(WKURLRef fileUrl, WKURLRef mainFrameURL)
+static inline WTF::String pathSuitableForTestResult(WKURLRef fileUrl)
 {
     if (!fileUrl)
         return String();
@@ -245,12 +245,22 @@ static inline WTF::String pathSuitableForTestResult(WKURLRef fileUrl, WKURLRef m
         return toWTFString(adoptWK(WKURLCopyString(fileUrl)));
 
     String pathString = toWTFString(adoptWK(WKURLCopyPath(fileUrl)));
-    String mainFrameURLPathString = toWTFString(adoptWK(WKURLCopyPath(mainFrameURL)));
-    String basePath = mainFrameURLPathString.substring(0, mainFrameURLPathString.reverseFind(divider)+1);
-    
-    if (pathString.startsWith(basePath))
-        return pathString.substring(basePath.length());
-    return toWTFString(adoptWK(WKURLCopyString(fileUrl)));
+    StringBuilder stringBuilder;
+
+    // Remove the leading path from file urls.
+    const size_t indexBaseName = pathString.reverseFind(divider);
+    if (indexBaseName != notFound) {
+        const size_t indexDirName = pathString.reverseFind(divider, indexBaseName - 1);
+        if (indexDirName != notFound)
+            stringBuilder.append(pathString.substring(indexDirName + 1, indexBaseName - indexDirName - 1));
+        stringBuilder.append(divider);
+        stringBuilder.append(pathString.substring(indexBaseName + 1)); // Filename.
+    } else {
+        stringBuilder.append(divider);
+        stringBuilder.append(pathString); // Return "/pathString".
+    }
+
+    return stringBuilder.toString();
 }
 
 static inline WTF::String urlSuitableForTestResult(WKURLRef fileUrl)
@@ -483,14 +493,14 @@ static void dumpLoadEvent(WKBundleFrameRef frame, const char* eventName)
     InjectedBundle::shared().outputText(stringBuilder.toString());
 }
 
-static inline void dumpRequestDescriptionSuitableForTestResult(WKURLRequestRef request, StringBuilder& stringBuilder, WKURLRef mainFrameURL)
+static inline void dumpRequestDescriptionSuitableForTestResult(WKURLRequestRef request, StringBuilder& stringBuilder)
 {
     WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request));
     WKRetainPtr<WKURLRef> firstParty = adoptWK(WKURLRequestCopyFirstPartyForCookies(request));
     WKRetainPtr<WKStringRef> httpMethod = adoptWK(WKURLRequestCopyHTTPMethod(request));
 
     stringBuilder.appendLiteral("<NSURLRequest URL ");
-    stringBuilder.append(pathSuitableForTestResult(url.get(), mainFrameURL));
+    stringBuilder.append(pathSuitableForTestResult(url.get()));
     stringBuilder.appendLiteral(", main document URL ");
     stringBuilder.append(urlSuitableForTestResult(firstParty.get()));
     stringBuilder.appendLiteral(", http method ");
@@ -503,7 +513,7 @@ static inline void dumpRequestDescriptionSuitableForTestResult(WKURLRequestRef r
     stringBuilder.append('>');
 }
 
-static inline void dumpResponseDescriptionSuitableForTestResult(WKURLResponseRef response, StringBuilder& stringBuilder, WKURLRef mainFrameURL)
+static inline void dumpResponseDescriptionSuitableForTestResult(WKURLResponseRef response, StringBuilder& stringBuilder)
 {
     WKRetainPtr<WKURLRef> url = adoptWK(WKURLResponseCopyURL(response));
     if (!url) {
@@ -511,7 +521,7 @@ static inline void dumpResponseDescriptionSuitableForTestResult(WKURLResponseRef
         return;
     }
     stringBuilder.appendLiteral("<NSURLResponse ");
-    stringBuilder.append(pathSuitableForTestResult(url.get(), mainFrameURL));
+    stringBuilder.append(pathSuitableForTestResult(url.get()));
     stringBuilder.appendLiteral(", http status code ");
     stringBuilder.appendNumber(WKURLResponseHTTPStatusCode(response));
     stringBuilder.append('>');
@@ -604,7 +614,7 @@ void InjectedBundlePage::didCancelClientRedirectForFrame(WKBundlePageRef page, W
 
 void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date, const void* clientInfo)
 {
-    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willPerformClientRedirectForFrame(page, frame, url, delay, date);
+    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willPerformClientRedirectForFrame(frame, url, delay, date);
 }
 
 void InjectedBundlePage::didSameDocumentNavigationForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef*, const void* clientInfo)
@@ -989,7 +999,7 @@ void InjectedBundlePage::didCancelClientRedirectForFrame(WKBundleFrameRef frame)
     dumpLoadEvent(frame, "didCancelClientRedirectForFrame");
 }
 
-void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date)
+void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundleFrameRef frame, WKURLRef url, double delay, double date)
 {
     if (!InjectedBundle::shared().isTestRunning())
         return;
@@ -998,10 +1008,9 @@ void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundlePageRef page,
         return;
 
     StringBuilder stringBuilder;
-    WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page)));
     dumpFrameDescriptionSuitableForTestResult(frame, stringBuilder);
     stringBuilder.appendLiteral(" - willPerformClientRedirectToURL: ");
-    stringBuilder.append(pathSuitableForTestResult(url, mainFrameURL.get()));
+    stringBuilder.append(pathSuitableForTestResult(url));
     stringBuilder.appendLiteral(" \n");
     InjectedBundle::shared().outputText(stringBuilder.toString());
 }
@@ -1056,7 +1065,7 @@ void InjectedBundlePage::didDetectXSSForFrame(WKBundleFrameRef frame)
         InjectedBundle::shared().outputText("didDetectXSS\n");
 }
 
-void InjectedBundlePage::didInitiateLoadForResource(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, WKURLRequestRef request, bool)
+void InjectedBundlePage::didInitiateLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKURLRequestRef request, bool)
 {
     if (!InjectedBundle::shared().isTestRunning())
         return;
@@ -1065,8 +1074,7 @@ void InjectedBundlePage::didInitiateLoadForResource(WKBundlePageRef page, WKBund
         return;
 
     WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request));
-    WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page)));
-    assignedUrlsCache.add(identifier, pathSuitableForTestResult(url.get(), mainFrameURL.get()));
+    assignedUrlsCache.add(identifier, pathSuitableForTestResult(url.get()));
 }
 
 // Resource Load Client Callbacks
@@ -1081,17 +1089,16 @@ static inline bool isHTTPOrHTTPSScheme(WKStringRef scheme)
     return WKStringIsEqualToUTF8CStringIgnoringCase(scheme, "http") || WKStringIsEqualToUTF8CStringIgnoringCase(scheme, "https");
 }
 
-WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef page, WKBundleFrameRef frame, uint64_t identifier, WKURLRequestRef request, WKURLResponseRef response)
+WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef, WKBundleFrameRef frame, uint64_t identifier, WKURLRequestRef request, WKURLResponseRef response)
 {
     if (InjectedBundle::shared().isTestRunning()
         && InjectedBundle::shared().testRunner()->shouldDumpResourceLoadCallbacks()) {
         StringBuilder stringBuilder;
         dumpResourceURL(identifier, stringBuilder);
         stringBuilder.appendLiteral(" - willSendRequest ");
-        WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page)));
-        dumpRequestDescriptionSuitableForTestResult(request, stringBuilder, mainFrameURL.get());
+        dumpRequestDescriptionSuitableForTestResult(request, stringBuilder);
         stringBuilder.appendLiteral(" redirectResponse ");
-        dumpResponseDescriptionSuitableForTestResult(response, stringBuilder, mainFrameURL.get());
+        dumpResponseDescriptionSuitableForTestResult(response, stringBuilder);
         stringBuilder.append('\n');
         InjectedBundle::shared().outputText(stringBuilder.toString());
     }
@@ -1138,7 +1145,7 @@ WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef page
     return request;
 }
 
-void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, WKURLResponseRef response)
+void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKURLResponseRef response)
 {
     if (!InjectedBundle::shared().isTestRunning())
         return;
@@ -1147,8 +1154,7 @@ void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef page, WKB
         StringBuilder stringBuilder;
         dumpResourceURL(identifier, stringBuilder);
         stringBuilder.appendLiteral(" - didReceiveResponse ");
-        WKRetainPtr<WKURLRef> mainFrameURL = adoptWK(WKBundleFrameCopyURL(WKBundlePageGetMainFrame(page)));
-        dumpResponseDescriptionSuitableForTestResult(response, stringBuilder, mainFrameURL.get());
+        dumpResponseDescriptionSuitableForTestResult(response, stringBuilder);
         stringBuilder.append('\n');
         InjectedBundle::shared().outputText(stringBuilder.toString());
     }
index f01b50b542fa62c42d4b07f0a412b4eb3f5caa28..d09a204dd9ecee5db0c64c6c3bfe49cc68913e1a 100644 (file)
@@ -86,7 +86,7 @@ private:
     void didReceiveTitleForFrame(WKStringRef title, WKBundleFrameRef);
     void didClearWindowForFrame(WKBundleFrameRef, WKBundleScriptWorldRef);
     void didCancelClientRedirectForFrame(WKBundleFrameRef);
-    void willPerformClientRedirectForFrame(WKBundlePageRef, WKBundleFrameRef, WKURLRef, double delay, double date);
+    void willPerformClientRedirectForFrame(WKBundleFrameRef, WKURLRef url, double delay, double date);
     void didSameDocumentNavigationForFrame(WKBundleFrameRef, WKSameDocumentNavigationType);
     void didFinishDocumentLoadForFrame(WKBundleFrameRef);
     void didHandleOnloadEventsForFrame(WKBundleFrameRef);