2011-02-06 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Feb 2011 10:35:28 +0000 (10:35 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Feb 2011 10:35:28 +0000 (10:35 +0000)
        Reviewed by Dan Bernstein.

        WebKitTestRunner needs layoutTestController.setWillSendRequestReturnsNull
        https://bugs.webkit.org/show_bug.cgi?id=42690
        <rdar://problem/8213851>

        * platform/mac-wk2/Skipped: Unskip tests that now pass, except for the ones that
        mysteriously fail.
2011-02-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dan Bernstein.

        WebKitTestRunner needs layoutTestController.setWillSendRequestReturnsNull
        https://bugs.webkit.org/show_bug.cgi?id=42690
        <rdar://problem/8213851>

        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
        (WTR::InjectedBundlePage::willSendRequestForFrame):
        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
        (WTR::LayoutTestController::LayoutTestController):
        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
        (WTR::LayoutTestController::willSendRequestReturnsNull):
        (WTR::LayoutTestController::setWillSendRequestReturnsNull):

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

LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/Skipped
Tools/ChangeLog
Tools/Scripts/webkitpy/common/net/layouttestresults.py
Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

index f95d561..2ccd9b8 100644 (file)
@@ -1,3 +1,14 @@
+2011-02-06  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        WebKitTestRunner needs layoutTestController.setWillSendRequestReturnsNull
+        https://bugs.webkit.org/show_bug.cgi?id=42690
+        <rdar://problem/8213851>
+
+        * platform/mac-wk2/Skipped: Unskip tests that now pass, except for the ones that
+        mysteriously fail.
+
 2011-02-05  Dimitri Glazkov  <dglazkov@chromium.org>
 
         [Chromium] Add baselines for the test added in r77690.
index c267f9b..ac2281d 100644 (file)
@@ -1610,14 +1610,6 @@ editing/execCommand/query-command-state.html
 editing/execCommand/query-text-alignment.html
 editing/execCommand/toggle-compound-styles.html
 
-# WebKitTestRunner needs layoutTestController.setWillSendRequestReturnsNull
-# <https://bugs.webkit.org/show_bug.cgi?id=42690>
-fast/loader/onload-willSendRequest-null-for-frame.html
-fast/loader/onload-willSendRequest-null-for-script.html
-fast/loader/subresource-willSendRequest-null.html
-plugins/plugin-document-willSendRequest-null.html
-fast/loader/willSendRequest-null-for-preload.html
-
 # WebKitTestRunner needs layoutTestController.setStopProvisionalFrameLoads
 # <https://bugs.webkit.org/show_bug.cgi?id=42691>
 fast/loader/stop-provisional-loads.html
@@ -2177,6 +2169,10 @@ editing/pasteboard/copy-standalone-image.html
 # Mysterious failure after enabling paste tests
 platform/mac/editing/pasteboard/text-precomposed.html
 
+# Unexplained failures after implementing willSendRequestReturnsNull
+fast/loader/onload-willSendRequest-null-for-frame.html
+plugins/plugin-document-willSendRequest-null.html
+
 ### END OF (3) Unclassified failures
 ########################################
 
index a8857b1..beccb51 100644 (file)
@@ -1,3 +1,20 @@
+2011-02-06  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        WebKitTestRunner needs layoutTestController.setWillSendRequestReturnsNull
+        https://bugs.webkit.org/show_bug.cgi?id=42690
+        <rdar://problem/8213851>
+
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::InjectedBundlePage::willSendRequestForFrame):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        (WTR::LayoutTestController::LayoutTestController):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+        (WTR::LayoutTestController::willSendRequestReturnsNull):
+        (WTR::LayoutTestController::setWillSendRequestReturnsNull):
+
 2011-02-05  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r77720.
index 28caad4..249ecc9 100644 (file)
@@ -51,11 +51,13 @@ class LayoutTestResults(object):
     timeout_key = u'Tests that timed out:'
     crash_key = u'Tests that caused the DumpRenderTree tool to crash:'
     missing_key = u'Tests that had no expected results (probably new):'
+    webprocess_crash_key = u'Tests that caused the Web process to crash:'
 
     expected_keys = [
         stderr_key,
         fail_key,
         crash_key,
+        webprocess_crash_key,
         timeout_key,
         missing_key,
     ]
@@ -87,6 +89,8 @@ class LayoutTestResults(object):
             return cls._failures_from_fail_row(row)
         if table_title == cls.crash_key:
             return [test_failures.FailureCrash()]
+        if table_title == cls.webprocess_crash_key:
+            return [test_failures.FailureCrash()]
         if table_title == cls.timeout_key:
             return [test_failures.FailureTimeout()]
         if table_title == cls.missing_key:
index 162431e..a331c64 100644 (file)
@@ -87,6 +87,8 @@ module WTR {
         void setTimelineProfilingEnabled(in boolean enabled);
 
         void setPOSIXLocale(in DOMString locale);
+
+        void setWillSendRequestReturnsNull(in boolean flag);
     };
 
 }
index 82437a7..9ae659a 100644 (file)
@@ -576,6 +576,9 @@ void InjectedBundlePage::didRunInsecureContentForFrame(WKBundleFrameRef frame)
 
 WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef, WKBundleFrameRef, uint64_t, WKURLRequestRef request, WKURLResponseRef)
 {
+    if (InjectedBundle::shared().isTestRunning() && InjectedBundle::shared().layoutTestController()->willSendRequestReturnsNull())
+        return 0;
+
     return request;
 }
 
index 2c2566c..4707ed8 100644 (file)
@@ -97,6 +97,7 @@ LayoutTestController::LayoutTestController()
     , m_waitToDump(false)
     , m_testRepaint(false)
     , m_testRepaintSweepHorizontally(false)
+    , m_willSendRequestReturnsNull(false)
 {
     platformInitialize();
 }
index 0c4a70d..9271124 100644 (file)
@@ -133,6 +133,9 @@ public:
 
     void setPOSIXLocale(JSStringRef);
 
+    bool willSendRequestReturnsNull() { return m_willSendRequestReturnsNull; }
+    void setWillSendRequestReturnsNull(bool f) { m_willSendRequestReturnsNull = f; }
+
 private:
     static const double waitToDumpWatchdogTimerInterval;
 
@@ -155,6 +158,8 @@ private:
     bool m_testRepaint;
     bool m_testRepaintSweepHorizontally;
 
+    bool m_willSendRequestReturnsNull;
+
     PlatformTimerRef m_waitToDumpWatchdogTimer;
 };