Title: [131583] trunk
Revision
131583
Author
[email protected]
Date
2012-10-17 04:07:13 -0700 (Wed, 17 Oct 2012)

Log Message

WebKitTestRunner needs layoutTestController.queueReload
https://bugs.webkit.org/show_bug.cgi?id=42672

Patch by Mikhail Pozdnyakov <[email protected]> on 2012-10-17
Reviewed by Kenneth Rohde Christiansen.

Tools:

Added implementation of testRunner.queueReload().

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::queueReload):
(WTR):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(InjectedBundle):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::queueReload):
(WTR):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/WorkQueueManager.cpp:
(WTR::WorkQueueManager::queueReload):
(WTR):
* WebKitTestRunner/WorkQueueManager.h:
(WorkQueueManager):

LayoutTests:

Unskipped the related test cases for WK2.

* platform/efl-wk2/TestExpectations:
* platform/wk2/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (131582 => 131583)


--- trunk/LayoutTests/ChangeLog	2012-10-17 10:46:48 UTC (rev 131582)
+++ trunk/LayoutTests/ChangeLog	2012-10-17 11:07:13 UTC (rev 131583)
@@ -1,3 +1,15 @@
+2012-10-17  Mikhail Pozdnyakov  <[email protected]>
+
+        WebKitTestRunner needs layoutTestController.queueReload
+        https://bugs.webkit.org/show_bug.cgi?id=42672
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Unskipped the related test cases for WK2.
+
+        * platform/efl-wk2/TestExpectations:
+        * platform/wk2/TestExpectations:
+
 2012-10-17  Kent Tamura  <[email protected]>
 
         REGRESSION(r131421): Text baseline becomes incorrect after re-layout of input[type=time]

Modified: trunk/LayoutTests/platform/efl-wk2/TestExpectations (131582 => 131583)


--- trunk/LayoutTests/platform/efl-wk2/TestExpectations	2012-10-17 10:46:48 UTC (rev 131582)
+++ trunk/LayoutTests/platform/efl-wk2/TestExpectations	2012-10-17 11:07:13 UTC (rev 131583)
@@ -174,9 +174,6 @@
 # FAILING TESTS
 #////////////////////////////////////////////////////////////////////////////////////////
 
-# WebKitTestRunner needs an implementation for testRunner.queueReload
-webkit.org/b/42674 fast/dom/navigation-type-reload.html [ Failure ]
-
 # WebKitTestRunner needs an implementation for testRunner.titleTextDirection
 webkit.org/b/93470 fast/dom/title-directionality-removeChild.html [ Failure ]
 webkit.org/b/93470 fast/dom/title-directionality.html [ Failure ]

Modified: trunk/LayoutTests/platform/wk2/TestExpectations (131582 => 131583)


--- trunk/LayoutTests/platform/wk2/TestExpectations	2012-10-17 10:46:48 UTC (rev 131582)
+++ trunk/LayoutTests/platform/wk2/TestExpectations	2012-10-17 11:07:13 UTC (rev 131583)
@@ -292,17 +292,9 @@
 svg/custom/manually-parsed-svg-allowed-in-dashboard.html
 svg/custom/svg-allowed-in-dashboard-object.html
 
-# WebKitTestRunner needs testRunner.queueReload
-# <https://bugs.webkit.org/show_bug.cgi?id=42672>
-fast/css/compare-content-style.html
-fast/frames/frame-display-none-focus.html
-fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html
-fast/loader/images-enabled-unset-can-block-image-and-can-reload-in-place.html
+# InjectedBundlePage::decidePolicyForNavigationAction() should print only filename part of local URLs.
+# <https://bugs.webkit.org/show_bug.cgi?id=99581>
 fast/loader/reload-policy-delegate.html
-http/tests/navigation/fallback-anchor-reload.html
-http/tests/navigation/reload-subframe-frame.html
-http/tests/navigation/reload-subframe-iframe.html
-http/tests/navigation/reload-subframe-object.html
 
 # WebKitTestRunner needs testRunner.queueNonLoadingScript
 # <https://bugs.webkit.org/show_bug.cgi?id=98141>

Modified: trunk/Tools/ChangeLog (131582 => 131583)


--- trunk/Tools/ChangeLog	2012-10-17 10:46:48 UTC (rev 131582)
+++ trunk/Tools/ChangeLog	2012-10-17 11:07:13 UTC (rev 131583)
@@ -1,3 +1,31 @@
+2012-10-17  Mikhail Pozdnyakov  <[email protected]>
+
+        WebKitTestRunner needs layoutTestController.queueReload
+        https://bugs.webkit.org/show_bug.cgi?id=42672
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Added implementation of testRunner.queueReload().
+
+        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::queueReload):
+        (WTR):
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+        (InjectedBundle):
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::queueReload):
+        (WTR):
+        * WebKitTestRunner/InjectedBundle/TestRunner.h:
+        (TestRunner):
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+        * WebKitTestRunner/WorkQueueManager.cpp:
+        (WTR::WorkQueueManager::queueReload):
+        (WTR):
+        * WebKitTestRunner/WorkQueueManager.h:
+        (WorkQueueManager):
+
 2012-10-17  Mark Rowe  <[email protected]>
 
         Fix the build with a newer version of clang.

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (131582 => 131583)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl	2012-10-17 10:46:48 UTC (rev 131582)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl	2012-10-17 11:07:13 UTC (rev 131583)
@@ -185,5 +185,6 @@
     // Work queue.
     void queueBackNavigation(in unsigned long howFarBackward);
     void queueLoad(in DOMString url, in DOMString target);
+    void queueReload();
 };
 

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (131582 => 131583)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2012-10-17 10:46:48 UTC (rev 131582)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2012-10-17 11:07:13 UTC (rev 131583)
@@ -499,4 +499,12 @@
     WKBundlePostMessage(m_bundle, messageName.get(), loadData.get());
 }
 
+void InjectedBundle::queueReload()
+{
+    m_useWorkQueue = true;
+
+    WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("QueueReload"));
+    WKBundlePostMessage(m_bundle, messageName.get(), 0);
+}
+
 } // namespace WTR

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h (131582 => 131583)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h	2012-10-17 10:46:48 UTC (rev 131582)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h	2012-10-17 11:07:13 UTC (rev 131583)
@@ -103,6 +103,7 @@
     void processWorkQueue();
     void queueBackNavigation(unsigned howFarBackward);
     void queueLoad(WKStringRef url, WKStringRef target);
+    void queueReload();
 
 private:
     InjectedBundle();

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (131582 => 131583)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp	2012-10-17 10:46:48 UTC (rev 131582)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp	2012-10-17 11:07:13 UTC (rev 131583)
@@ -847,4 +847,9 @@
     InjectedBundle::shared().queueLoad(urlStringWK.get(), toWK(target).get());
 }
 
+void TestRunner::queueReload()
+{
+    InjectedBundle::shared().queueReload();
+}
+
 } // namespace WTR

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (131582 => 131583)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h	2012-10-17 10:46:48 UTC (rev 131582)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h	2012-10-17 11:07:13 UTC (rev 131583)
@@ -261,8 +261,10 @@
 
     bool callShouldCloseOnWebView();
 
+    // Work queue.
     void queueBackNavigation(unsigned howFarBackward);
     void queueLoad(JSStringRef url, JSStringRef target);
+    void queueReload();
 
 private:
     static const double waitToDumpWatchdogTimerInterval;

Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (131582 => 131583)


--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2012-10-17 10:46:48 UTC (rev 131582)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2012-10-17 11:07:13 UTC (rev 131583)
@@ -459,6 +459,11 @@
         return;
     }
 
+    if (WKStringIsEqualToUTF8CString(messageName, "QueueReload")) {
+        TestController::shared().workQueueManager().queueReload();
+        return;
+    }
+
     ASSERT_NOT_REACHED();
 }
 

Modified: trunk/Tools/WebKitTestRunner/WorkQueueManager.cpp (131582 => 131583)


--- trunk/Tools/WebKitTestRunner/WorkQueueManager.cpp	2012-10-17 10:46:48 UTC (rev 131582)
+++ trunk/Tools/WebKitTestRunner/WorkQueueManager.cpp	2012-10-17 11:07:13 UTC (rev 131583)
@@ -117,6 +117,20 @@
     enqueue(new BackNavigationItem(howFarBackward));
 }
 
+void WorkQueueManager::queueReload()
+{
+    class ReloadItem : public WorkQueueItem {
+    public:
+        bool invoke() const
+        {
+            WKPageReload(mainPage());
+            return true;
+        }
+    };
+
+    enqueue(new ReloadItem());
+}
+
 void WorkQueueManager::enqueue(WorkQueueItem* item)
 {
     ASSERT(item);

Modified: trunk/Tools/WebKitTestRunner/WorkQueueManager.h (131582 => 131583)


--- trunk/Tools/WebKitTestRunner/WorkQueueManager.h	2012-10-17 10:46:48 UTC (rev 131582)
+++ trunk/Tools/WebKitTestRunner/WorkQueueManager.h	2012-10-17 11:07:13 UTC (rev 131583)
@@ -44,6 +44,7 @@
 
     void queueLoad(const String& url, const String& target);
     void queueBackNavigation(unsigned howFarBackward);
+    void queueReload();
 
 private:
     class WorkQueueItem {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to