Title: [128169] trunk
Revision
128169
Author
commit-qu...@webkit.org
Date
2012-09-11 04:21:52 -0700 (Tue, 11 Sep 2012)

Log Message

[WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
https://bugs.webkit.org/show_bug.cgi?id=96256

Patch by Mikhail Pozdnyakov <mikhail.pozdnya...@intel.com> on 2012-09-11
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Added new setter for minimum DOM timer interval to InjectedBundle private API.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetMinimumTimerInterval):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setMinimumTimerInterval):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):

Tools:

Exported TestRunner::setMinimumTimerInterval() method.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setMinimumTimerInterval):
(WTR):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner):

LayoutTests:

Unskipped corresponding fast/dom/ tests.

* platform/wk2/Skipped:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (128168 => 128169)


--- trunk/LayoutTests/ChangeLog	2012-09-11 10:50:48 UTC (rev 128168)
+++ trunk/LayoutTests/ChangeLog	2012-09-11 11:21:52 UTC (rev 128169)
@@ -1,3 +1,14 @@
+2012-09-11  Mikhail Pozdnyakov  <mikhail.pozdnya...@intel.com>
+
+        [WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
+        https://bugs.webkit.org/show_bug.cgi?id=96256
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Unskipped corresponding fast/dom/ tests.
+
+        * platform/wk2/Skipped:
+
 2012-09-11  Szilard Ledan  <szle...@inf.u-szeged.hu>
 
         [Qt] New fast/canvas/canvas-lineDash.html introduced in r128116 fails.

Modified: trunk/LayoutTests/platform/wk2/Skipped (128168 => 128169)


--- trunk/LayoutTests/platform/wk2/Skipped	2012-09-11 10:50:48 UTC (rev 128168)
+++ trunk/LayoutTests/platform/wk2/Skipped	2012-09-11 11:21:52 UTC (rev 128169)
@@ -818,14 +818,6 @@
 compositing/plugins/invalidate_rect.html
 plugins/windowless_plugin_paint_test.html
 
-# WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
-fast/dom/timer-increase-min-interval-and-reset-part-1.html
-fast/dom/timer-increase-min-interval-and-reset-part-2.html
-fast/dom/timer-increase-min-interval-repeating.html
-fast/dom/timer-increase-min-interval.html
-fast/dom/timer-increase-then-decrease-min-interval-repeating.html
-fast/dom/timer-increase-then-decrease-min-interval.html
-
 # WebKitTestRunner needs layoutTestController.originsWithLocalStorage
 storage/domstorage/localstorage/storagetracker/storage-tracker-1-prepare.html
 storage/domstorage/localstorage/storagetracker/storage-tracker-2-create.html

Modified: trunk/Source/WebKit2/ChangeLog (128168 => 128169)


--- trunk/Source/WebKit2/ChangeLog	2012-09-11 10:50:48 UTC (rev 128168)
+++ trunk/Source/WebKit2/ChangeLog	2012-09-11 11:21:52 UTC (rev 128169)
@@ -1,3 +1,21 @@
+2012-09-11  Mikhail Pozdnyakov  <mikhail.pozdnya...@intel.com>
+
+        [WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
+        https://bugs.webkit.org/show_bug.cgi?id=96256
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Added new setter for minimum DOM timer interval to InjectedBundle private API.
+
+        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+        (WKBundleSetMinimumTimerInterval):
+        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::setMinimumTimerInterval):
+        (WebKit):
+        * WebProcess/InjectedBundle/InjectedBundle.h:
+        (InjectedBundle):
+
 2012-09-11  Kangil Han  <kangil....@samsung.com>
 
         [WK2][EFL] Fix compile warnings when enable tiled backing store

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp (128168 => 128169)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp	2012-09-11 10:50:48 UTC (rev 128168)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp	2012-09-11 11:21:52 UTC (rev 128169)
@@ -236,6 +236,11 @@
     return toImpl(bundleRef)->appCacheUsageForOrigin(toImpl(origin)->string());
 }
 
+void WKBundleSetMinimumTimerInterval(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, double seconds)
+{
+    toImpl(bundleRef)->setMinimumTimerInterval(toImpl(pageGroupRef), seconds);
+}
+
 int WKBundleNumberOfPages(WKBundleRef bundleRef, WKBundleFrameRef frameRef, double pageWidthInPixels, double pageHeightInPixels)
 {
     return toImpl(bundleRef)->numberOfPages(toImpl(frameRef), pageWidthInPixels, pageHeightInPixels);

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h (128168 => 128169)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2012-09-11 10:50:48 UTC (rev 128168)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h	2012-09-11 11:21:52 UTC (rev 128169)
@@ -77,6 +77,7 @@
 WK_EXPORT void WKBundleSetWebNotificationPermission(WKBundleRef bundle, WKBundlePageRef page, WKStringRef originStringRef, bool allowed);
 WK_EXPORT void WKBundleRemoveAllWebNotificationPermissions(WKBundleRef bundle, WKBundlePageRef page);
 WK_EXPORT uint64_t WKBundleGetWebNotificationID(WKBundleRef bundle, JSContextRef context, JSValueRef notification);
+WK_EXPORT void WKBundleSetMinimumTimerInterval(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, double interval);
 
 // UserContent API
 WK_EXPORT void WKBundleAddUserScript(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, WKBundleScriptWorldRef scriptWorld, WKStringRef source, WKURLRef url, WKArrayRef whitelist, WKArrayRef blacklist, WKUserScriptInjectionTime injectionTime, WKUserContentInjectedFrames injectedFrames);

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (128168 => 128169)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2012-09-11 10:50:48 UTC (rev 128168)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2012-09-11 11:21:52 UTC (rev 128169)
@@ -557,6 +557,13 @@
         (*iter)->settings()->setUserStyleSheetLocation(KURL(KURL(), location));
 }
 
+void InjectedBundle::setMinimumTimerInterval(WebPageGroupProxy* pageGroup, double seconds)
+{
+    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
+    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
+        (*iter)->settings()->setMinDOMTimerInterval(seconds);
+}
+
 void InjectedBundle::setWebNotificationPermission(WebPage* page, const String& originString, bool allowed)
 {
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h (128168 => 128169)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h	2012-09-11 10:50:48 UTC (rev 128168)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h	2012-09-11 11:21:52 UTC (rev 128169)
@@ -125,6 +125,7 @@
     String pageSizeAndMarginsInPixels(WebFrame*, int, int, int, int, int, int, int);
     bool isPageBoxVisible(WebFrame*, int);
     void setUserStyleSheetLocation(WebPageGroupProxy*, const String&);
+    void setMinimumTimerInterval(WebPageGroupProxy*, double seconds);
     void setWebNotificationPermission(WebPage*, const String& originString, bool allowed);
     void removeAllWebNotificationPermissions(WebPage*);
     uint64_t webNotificationID(JSContextRef, JSValueRef);

Modified: trunk/Tools/ChangeLog (128168 => 128169)


--- trunk/Tools/ChangeLog	2012-09-11 10:50:48 UTC (rev 128168)
+++ trunk/Tools/ChangeLog	2012-09-11 11:21:52 UTC (rev 128169)
@@ -1,3 +1,21 @@
+2012-09-11  Mikhail Pozdnyakov  <mikhail.pozdnya...@intel.com>
+
+        [WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
+        https://bugs.webkit.org/show_bug.cgi?id=96256
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Exported TestRunner::setMinimumTimerInterval() method.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::beginTesting):
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::TestRunner::setMinimumTimerInterval):
+        (WTR):
+        * WebKitTestRunner/InjectedBundle/TestRunner.h:
+        (TestRunner):
+
 2012-09-11  Tommy Widenflycht  <tom...@google.com>
 
         MediaStream API: add RTCPeerConnection::onnegotiationneeded

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (128168 => 128169)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl	2012-09-11 10:50:48 UTC (rev 128168)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl	2012-09-11 11:21:52 UTC (rev 128169)
@@ -67,6 +67,7 @@
         void removeOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
         void setUserStyleSheetEnabled(in boolean value);
         void setUserStyleSheetLocation(in DOMString location);
+        void setMinimumTimerInterval(in double interval); // Interval specified in seconds.
 
         // Special DOM functions.
         void clearBackForwardList();

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (128168 => 128169)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2012-09-11 10:50:48 UTC (rev 128168)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2012-09-11 11:21:52 UTC (rev 128169)
@@ -240,6 +240,7 @@
     WKBundleSetAuthorAndUserStylesEnabled(m_bundle, m_pageGroup, true);
     WKBundleSetFrameFlatteningEnabled(m_bundle, m_pageGroup, false);
     WKBundleSetMinimumLogicalFontSize(m_bundle, m_pageGroup, 9);
+    WKBundleSetMinimumTimerInterval(m_bundle, m_pageGroup, 0.010); // 10 milliseconds (DOMTimer::s_minDefaultTimerInterval)
 
     WKBundleRemoveAllUserContent(m_bundle, m_pageGroup);
 

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (128168 => 128169)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp	2012-09-11 10:50:48 UTC (rev 128168)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp	2012-09-11 11:21:52 UTC (rev 128169)
@@ -678,6 +678,11 @@
         setUserStyleSheetEnabled(true);
 }
 
+void TestRunner::setMinimumTimerInterval(double seconds)
+{
+    WKBundleSetMinimumTimerInterval(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), seconds);
+}
+
 void TestRunner::grantWebNotificationPermission(JSStringRef origin)
 {
     WKRetainPtr<WKStringRef> originWK = toWK(origin);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (128168 => 128169)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h	2012-09-11 10:50:48 UTC (rev 128168)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h	2012-09-11 11:21:52 UTC (rev 128169)
@@ -106,6 +106,7 @@
     void removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
     void setUserStyleSheetEnabled(bool);
     void setUserStyleSheetLocation(JSStringRef);
+    void setMinimumTimerInterval(double seconds); // Interval specified in seconds.
 
     // Special DOM functions.
     JSValueRef computedStyleIncludingVisitedInfo(JSValueRef element);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to