[WK2][WKTR] TestRunner is not dumping some frame load callbacks information
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2012 11:22:00 +0000 (11:22 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2012 11:22:00 +0000 (11:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=96740

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-14
Reviewed by Kenneth Rohde Christiansen.

Tools:

Dump information expected by the test cases about the following
frame load callbacks:
"didDisplayInsecureContentForFrame"
"didRunInsecureContentForFrame"
"didDetectXSSForFrame"

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::willPerformClientRedirectForFrame): Print a URL
as expected by test results by calling pathSuitableForTestResult() instead
of printing raw URL.
(WTR::InjectedBundlePage::didDisplayInsecureContentForFrame):
(WTR::InjectedBundlePage::didRunInsecureContentForFrame):
(WTR::InjectedBundlePage::didDetectXSSForFrame):

LayoutTests:

Unskip test cases which were failing due to missing
frame load callbacks information dumping with
WebKitTestRunner.

* platform/wk2/Skipped:

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

LayoutTests/ChangeLog
LayoutTests/platform/wk2/Skipped
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp

index cfa0f10..686040a 100644 (file)
@@ -1,3 +1,16 @@
+2012-09-14  Christophe Dumez  <christophe.dumez@intel.com>
+
+        [WK2][WKTR] TestRunner is not dumping some frame load callbacks information
+        https://bugs.webkit.org/show_bug.cgi?id=96740
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Unskip test cases which were failing due to missing
+        frame load callbacks information dumping with
+        WebKitTestRunner.
+
+        * platform/wk2/Skipped:
+
 2012-09-14  Vsevolod Vlasov  <vsevik@chromium.org>
 
         Web Inspector: Add ability to replay XHR in network panel.
index a690cc8..92c2c94 100644 (file)
@@ -237,29 +237,9 @@ webarchive/test-table-background.html
 webarchive/test-td-background.html
 webarchive/test-xml-stylesheet.xml
 
-# WebKitTestRunner needs layoutTestController.dumpFrameLoadCallbacks
-# <https://bugs.webkit.org/show_bug.cgi?id=42331>
+# Fails on WebKit2
+# <https://bugs.webkit.org/show_bug.cgi?id=96741>
 fast/loader/recursive-before-unload-crash.html
-http/tests/security/mixedContent/about-blank-iframe-in-main-frame.html
-http/tests/security/mixedContent/data-url-iframe-in-main-frame.html
-http/tests/security/mixedContent/data-url-script-in-iframe.html
-http/tests/security/mixedContent/empty-url-plugin-in-frame.html
-http/tests/security/mixedContent/insecure-css-in-iframe.html
-http/tests/security/mixedContent/insecure-css-in-main-frame.html
-http/tests/security/mixedContent/insecure-iframe-in-iframe.html
-http/tests/security/mixedContent/insecure-iframe-in-main-frame.html
-http/tests/security/mixedContent/insecure-image-in-iframe.html
-http/tests/security/mixedContent/insecure-image-in-main-frame.html
-http/tests/security/mixedContent/insecure-plugin-in-iframe.html
-http/tests/security/mixedContent/insecure-script-in-iframe.html
-http/tests/security/mixedContent/redirect-http-to-https-iframe-in-main-frame.html
-http/tests/security/mixedContent/redirect-http-to-https-script-in-iframe.html
-http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame.html
-http/tests/security/mixedContent/redirect-https-to-http-script-in-iframe.html
-webarchive/loading/javascript-url-iframe-crash.html
-webarchive/loading/mainresource-null-mimetype-crash.html
-webarchive/loading/missing-data.html
-http/tests/security/xssAuditor/script-tag-with-callbacks.html
 
 # WebKitTestRunner needs textInputController
 # <https://bugs.webkit.org/show_bug.cgi?id=42337>
index aca44c3..5524b45 100644 (file)
@@ -1,3 +1,24 @@
+2012-09-14  Christophe Dumez  <christophe.dumez@intel.com>
+
+        [WK2][WKTR] TestRunner is not dumping some frame load callbacks information
+        https://bugs.webkit.org/show_bug.cgi?id=96740
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Dump information expected by the test cases about the following
+        frame load callbacks:
+        "didDisplayInsecureContentForFrame"
+        "didRunInsecureContentForFrame"
+        "didDetectXSSForFrame"
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::InjectedBundlePage::willPerformClientRedirectForFrame): Print a URL
+        as expected by test results by calling pathSuitableForTestResult() instead
+        of printing raw URL.
+        (WTR::InjectedBundlePage::didDisplayInsecureContentForFrame):
+        (WTR::InjectedBundlePage::didRunInsecureContentForFrame):
+        (WTR::InjectedBundlePage::didDetectXSSForFrame):
+
 2012-09-14  Peter Beverloo  <peter@chromium.org>
 
         The runtime/unsigned category should be valid in the cpp style-checker.
index 44dba96..1e51117 100644 (file)
@@ -1035,7 +1035,7 @@ void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundleFrameRef fram
 
     dumpFrameDescriptionSuitableForTestResult(frame);
     InjectedBundle::shared().stringBuilder()->appendLiteral(" - willPerformClientRedirectToURL: ");
-    InjectedBundle::shared().stringBuilder()->append(toWTFString(adoptWK(WKURLCopyString(url))));
+    InjectedBundle::shared().stringBuilder()->append(pathSuitableForTestResult(url));
     InjectedBundle::shared().stringBuilder()->appendLiteral(" \n");
 }
 
@@ -1075,14 +1075,20 @@ void InjectedBundlePage::didHandleOnloadEventsForFrame(WKBundleFrameRef frame)
 
 void InjectedBundlePage::didDisplayInsecureContentForFrame(WKBundleFrameRef frame)
 {
+    if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
+        InjectedBundle::shared().stringBuilder()->appendLiteral("didDisplayInsecureContent\n");
 }
 
 void InjectedBundlePage::didRunInsecureContentForFrame(WKBundleFrameRef frame)
 {
+    if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
+        InjectedBundle::shared().stringBuilder()->appendLiteral("didRunInsecureContent\n");
 }
 
 void InjectedBundlePage::didDetectXSSForFrame(WKBundleFrameRef frame)
 {
+    if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
+        InjectedBundle::shared().stringBuilder()->appendLiteral("didDetectXSS\n");
 }
 
 void InjectedBundlePage::didInitiateLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKURLRequestRef request, bool)