Changeset 128169 in webkit


Ignore:
Timestamp:
Sep 11, 2012 4:21:52 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@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:
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r128167 r128169  
     12012-09-11  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        [WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
     4        https://bugs.webkit.org/show_bug.cgi?id=96256
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Unskipped corresponding fast/dom/ tests.
     9
     10        * platform/wk2/Skipped:
     11
    1122012-09-11  Szilard Ledan  <szledan@inf.u-szeged.hu>
    213
  • trunk/LayoutTests/platform/wk2/Skipped

    r128157 r128169  
    819819plugins/windowless_plugin_paint_test.html
    820820
    821 # WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
    822 fast/dom/timer-increase-min-interval-and-reset-part-1.html
    823 fast/dom/timer-increase-min-interval-and-reset-part-2.html
    824 fast/dom/timer-increase-min-interval-repeating.html
    825 fast/dom/timer-increase-min-interval.html
    826 fast/dom/timer-increase-then-decrease-min-interval-repeating.html
    827 fast/dom/timer-increase-then-decrease-min-interval.html
    828 
    829821# WebKitTestRunner needs layoutTestController.originsWithLocalStorage
    830822storage/domstorage/localstorage/storagetracker/storage-tracker-1-prepare.html
  • trunk/Source/WebKit2/ChangeLog

    r128163 r128169  
     12012-09-11  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        [WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
     4        https://bugs.webkit.org/show_bug.cgi?id=96256
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Added new setter for minimum DOM timer interval to InjectedBundle private API.
     9
     10        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     11        (WKBundleSetMinimumTimerInterval):
     12        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     13        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     14        (WebKit::InjectedBundle::setMinimumTimerInterval):
     15        (WebKit):
     16        * WebProcess/InjectedBundle/InjectedBundle.h:
     17        (InjectedBundle):
     18
    1192012-09-11  Kangil Han  <kangil.han@samsung.com>
    220
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r128157 r128169  
    237237}
    238238
     239void WKBundleSetMinimumTimerInterval(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, double seconds)
     240{
     241    toImpl(bundleRef)->setMinimumTimerInterval(toImpl(pageGroupRef), seconds);
     242}
     243
    239244int WKBundleNumberOfPages(WKBundleRef bundleRef, WKBundleFrameRef frameRef, double pageWidthInPixels, double pageHeightInPixels)
    240245{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r128157 r128169  
    7878WK_EXPORT void WKBundleRemoveAllWebNotificationPermissions(WKBundleRef bundle, WKBundlePageRef page);
    7979WK_EXPORT uint64_t WKBundleGetWebNotificationID(WKBundleRef bundle, JSContextRef context, JSValueRef notification);
     80WK_EXPORT void WKBundleSetMinimumTimerInterval(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, double interval);
    8081
    8182// UserContent API
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r128157 r128169  
    558558}
    559559
     560void InjectedBundle::setMinimumTimerInterval(WebPageGroupProxy* pageGroup, double seconds)
     561{
     562    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
     563    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
     564        (*iter)->settings()->setMinDOMTimerInterval(seconds);
     565}
     566
    560567void InjectedBundle::setWebNotificationPermission(WebPage* page, const String& originString, bool allowed)
    561568{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r128157 r128169  
    126126    bool isPageBoxVisible(WebFrame*, int);
    127127    void setUserStyleSheetLocation(WebPageGroupProxy*, const String&);
     128    void setMinimumTimerInterval(WebPageGroupProxy*, double seconds);
    128129    void setWebNotificationPermission(WebPage*, const String& originString, bool allowed);
    129130    void removeAllWebNotificationPermissions(WebPage*);
  • trunk/Tools/ChangeLog

    r128166 r128169  
     12012-09-11  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        [WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
     4        https://bugs.webkit.org/show_bug.cgi?id=96256
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Exported TestRunner::setMinimumTimerInterval() method.
     9
     10        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
     11        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
     12        (WTR::InjectedBundle::beginTesting):
     13        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     14        (WTR::TestRunner::setMinimumTimerInterval):
     15        (WTR):
     16        * WebKitTestRunner/InjectedBundle/TestRunner.h:
     17        (TestRunner):
     18
    1192012-09-11  Tommy Widenflycht  <tommyw@google.com>
    220
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl

    r128157 r128169  
    6868        void setUserStyleSheetEnabled(in boolean value);
    6969        void setUserStyleSheetLocation(in DOMString location);
     70        void setMinimumTimerInterval(in double interval); // Interval specified in seconds.
    7071
    7172        // Special DOM functions.
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r128048 r128169  
    241241    WKBundleSetFrameFlatteningEnabled(m_bundle, m_pageGroup, false);
    242242    WKBundleSetMinimumLogicalFontSize(m_bundle, m_pageGroup, 9);
     243    WKBundleSetMinimumTimerInterval(m_bundle, m_pageGroup, 0.010); // 10 milliseconds (DOMTimer::s_minDefaultTimerInterval)
    243244
    244245    WKBundleRemoveAllUserContent(m_bundle, m_pageGroup);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r128157 r128169  
    679679}
    680680
     681void TestRunner::setMinimumTimerInterval(double seconds)
     682{
     683    WKBundleSetMinimumTimerInterval(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), seconds);
     684}
     685
    681686void TestRunner::grantWebNotificationPermission(JSStringRef origin)
    682687{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r128157 r128169  
    107107    void setUserStyleSheetEnabled(bool);
    108108    void setUserStyleSheetLocation(JSStringRef);
     109    void setMinimumTimerInterval(double seconds); // Interval specified in seconds.
    109110
    110111    // Special DOM functions.
Note: See TracChangeset for help on using the changeset viewer.