Changeset 142509 in webkit


Ignore:
Timestamp:
Feb 11, 2013 1:41:01 PM (11 years ago)
Author:
benjamin@webkit.org
Message:

Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
https://bugs.webkit.org/show_bug.cgi?id=109349

Reviewed by Sam Weinig.

.:

  • Source/autotools/symbols.filter:

Source/WebCore:

Expose setMinimumTimerInterval() and implement the backup/restore to keep
a consistent state between tests.

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setMinimumTimerInterval):
(WebCore):

  • testing/InternalSettings.h:

(Backup):
(InternalSettings):

  • testing/InternalSettings.idl:

Source/WebKit/gtk:

  • WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
  • WebCoreSupport/DumpRenderTreeSupportGtk.h:

(DumpRenderTreeSupportGtk):

Source/WebKit/mac:

  • WebView/WebView.mm:
  • WebView/WebViewPrivate.h:

Source/WebKit/qt:

  • WebCoreSupport/DumpRenderTreeSupportQt.cpp:
  • WebCoreSupport/DumpRenderTreeSupportQt.h:

Source/WebKit2:

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:
  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:
  • WebProcess/InjectedBundle/InjectedBundle.h:

(InjectedBundle):

Tools:

Get rid of TestRunner's setMinimumTimerInterval and all the related functions.

This also fixes an oddity:
TestRunners were initialized with a minimum timer interval of 10 milliseconds instead
of using the default value. All with the same copy of an outdated comment.

  • DumpRenderTree/TestRunner.cpp:

(TestRunner::staticFunctions):

  • DumpRenderTree/TestRunner.h:

(TestRunner):

  • DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
  • DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
  • DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:

(WebTestRunner::TestRunner::TestRunner):

  • DumpRenderTree/chromium/TestRunner/src/TestRunner.h:

(TestRunner):

  • DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:

(WebTestRunner::WebPreferences::reset):
(WebTestRunner::WebPreferences::applyTo):

  • DumpRenderTree/chromium/WebViewHost.cpp:

(WebViewHost::reset):

  • DumpRenderTree/efl/DumpRenderTreeChrome.cpp:

(DumpRenderTreeChrome::resetDefaultsToConsistentValues):

  • DumpRenderTree/efl/TestRunnerEfl.cpp:
  • DumpRenderTree/gtk/DumpRenderTree.cpp:

(resetDefaultsToConsistentValues):

  • DumpRenderTree/gtk/TestRunnerGtk.cpp:
  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebViewToConsistentStateBeforeTesting):

  • DumpRenderTree/mac/TestRunnerMac.mm:
  • DumpRenderTree/qt/DumpRenderTreeQt.cpp:

(WebCore::WebPage::resetSettings):

  • DumpRenderTree/qt/TestRunnerQt.cpp:
  • DumpRenderTree/qt/TestRunnerQt.h:

(TestRunner):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebViewToConsistentStateBeforeTesting):

  • DumpRenderTree/win/TestRunnerWin.cpp:
  • DumpRenderTree/wx/TestRunnerWx.cpp:
  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:
  • WebKitTestRunner/InjectedBundle/TestRunner.h:

(TestRunner):

LayoutTests:

Update the tests to use InternalSettings.

  • fast/dom/timer-increase-min-interval-and-reset-part-1.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:
Location:
trunk
Files:
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r142465 r142509  
     12013-02-11  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
     4        https://bugs.webkit.org/show_bug.cgi?id=109349
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Source/autotools/symbols.filter:
     9
    1102013-02-11  Zan Dobersek  <zdobersek@igalia.com>
    211
  • trunk/LayoutTests/ChangeLog

    r142506 r142509  
     12013-02-11  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
     4        https://bugs.webkit.org/show_bug.cgi?id=109349
     5
     6        Reviewed by Sam Weinig.
     7
     8        Update the tests to use InternalSettings.
     9
     10        * fast/dom/timer-increase-min-interval-and-reset-part-1.html:
     11        * fast/dom/timer-increase-min-interval-repeating.html:
     12        * fast/dom/timer-increase-min-interval.html:
     13        * fast/dom/timer-increase-then-decrease-min-interval-repeating.html:
     14        * fast/dom/timer-increase-then-decrease-min-interval.html:
     15
    1162013-02-11  Mike West  <mkwst@chromium.org>
    217
  • trunk/LayoutTests/fast/dom/timer-increase-min-interval-and-reset-part-1.html

    r120792 r142509  
    1818
    1919    // Make timers run no more often than twice a second.
    20     testRunner.setMinimumTimerInterval(0.5);
     20    internals.settings.setMinimumTimerInterval(0.5);
    2121
    2222    // Part 2 of this test (which will likely be executed immediately
  • trunk/LayoutTests/fast/dom/timer-increase-min-interval-repeating.html

    r120792 r142509  
    3434
    3535    // Make timers run no more often than twice a second.
    36     testRunner.setMinimumTimerInterval(0.5);
     36    internals.settings.setMinimumTimerInterval(0.5);
    3737
    3838    setInterval(slowTimeoutHandler, 1000);
  • trunk/LayoutTests/fast/dom/timer-increase-min-interval.html

    r120792 r142509  
    3535
    3636    // Make timers run no more often than twice a second.
    37     testRunner.setMinimumTimerInterval(0.5);
     37    internals.settings.setMinimumTimerInterval(0.5);
    3838
    3939    setTimeout(slowTimeoutHandler, 1000);
  • trunk/LayoutTests/fast/dom/timer-increase-then-decrease-min-interval-repeating.html

    r120792 r142509  
    3434
    3535    // Make timers run no more often than once every two seconds.
    36     testRunner.setMinimumTimerInterval(2.0);
     36    internals.settings.setMinimumTimerInterval(2.0);
    3737
    3838    setInterval(slowTimeoutHandler, 1000);
     
    4343    // the fast timeout handler won't get called for up to two seconds,
    4444    // which would lead to poor responsiveness.
    45     testRunner.setMinimumTimerInterval(0.004);
     45    internals.settings.setMinimumTimerInterval(0.004);
    4646}
    4747</script>
  • trunk/LayoutTests/fast/dom/timer-increase-then-decrease-min-interval.html

    r120792 r142509  
    3535
    3636    // Make timers run no more often than once every two seconds.
    37     testRunner.setMinimumTimerInterval(2.0);
     37    internals.settings.setMinimumTimerInterval(2.0);
    3838
    3939    setTimeout(slowTimeoutHandler, 1000);
     
    4444    // the fast timeout handler won't get called for up to two seconds,
    4545    // which would lead to poor responsiveness.
    46     testRunner.setMinimumTimerInterval(0.004);
     46    internals.settings.setMinimumTimerInterval(0.004);
    4747}
    4848</script>
  • trunk/Source/WebCore/ChangeLog

    r142507 r142509  
     12013-02-11  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
     4        https://bugs.webkit.org/show_bug.cgi?id=109349
     5
     6        Reviewed by Sam Weinig.
     7
     8        Expose setMinimumTimerInterval() and implement the backup/restore to keep
     9        a consistent state between tests.
     10
     11        * testing/InternalSettings.cpp:
     12        (WebCore::InternalSettings::Backup::Backup):
     13        (WebCore::InternalSettings::Backup::restoreTo):
     14        (WebCore::InternalSettings::setMinimumTimerInterval):
     15        (WebCore):
     16        * testing/InternalSettings.h:
     17        (Backup):
     18        (InternalSettings):
     19        * testing/InternalSettings.idl:
     20
    1212013-02-11  Dean Jackson  <dino@apple.com>
    222
  • trunk/Source/WebCore/testing/InternalSettings.cpp

    r141837 r142509  
    11/*
    22 * Copyright (C) 2012 Google Inc. All rights reserved.
     3 * Copyright (C) 2013 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    8889    , m_langAttributeAwareFormControlUIEnabled(RuntimeEnabledFeatures::langAttributeAwareFormControlUIEnabled())
    8990    , m_imagesEnabled(settings->areImagesEnabled())
     91    , m_minimumTimerInterval(settings->minDOMTimerInterval())
    9092#if ENABLE(VIDEO_TRACK)
    9193    , m_shouldDisplaySubtitles(settings->shouldDisplaySubtitles())
     
    122124    RuntimeEnabledFeatures::setLangAttributeAwareFormControlUIEnabled(m_langAttributeAwareFormControlUIEnabled);
    123125    settings->setImagesEnabled(m_imagesEnabled);
     126    settings->setMinDOMTimerInterval(m_minimumTimerInterval);
    124127#if ENABLE(VIDEO_TRACK)
    125128    settings->setShouldDisplaySubtitles(m_shouldDisplaySubtitles);
     
    467470}
    468471
    469 }
     472void InternalSettings::setMinimumTimerInterval(double intervalInSeconds, ExceptionCode& ec)
     473{
     474    InternalSettingsGuardForSettings();
     475    settings()->setMinDOMTimerInterval(intervalInSeconds);
     476}
     477
     478}
  • trunk/Source/WebCore/testing/InternalSettings.h

    r140509 r142509  
    11/*
    22 * Copyright (C) 2012 Google Inc. All rights reserved.
     3 * Copyright (C) 2013 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    7677        bool m_langAttributeAwareFormControlUIEnabled;
    7778        bool m_imagesEnabled;
     79        double m_minimumTimerInterval;
    7880#if ENABLE(VIDEO_TRACK)
    7981        bool m_shouldDisplaySubtitles;
     
    124126    void setLangAttributeAwareFormControlUIEnabled(bool);
    125127    void setImagesEnabled(bool enabled, ExceptionCode&);
     128    void setMinimumTimerInterval(double intervalInSeconds, ExceptionCode&);
    126129
    127130private:
  • trunk/Source/WebCore/testing/InternalSettings.idl

    r139202 r142509  
    5959    void setStorageBlockingPolicy(in DOMString policy) raises(DOMException);
    6060    void setImagesEnabled(in boolean enabled) raises(DOMException);
     61    void setMinimumTimerInterval(in double intervalInSeconds) raises(DOMException);
    6162};
  • trunk/Source/WebKit/gtk/ChangeLog

    r142395 r142509  
     12013-02-11  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
     4        https://bugs.webkit.org/show_bug.cgi?id=109349
     5
     6        Reviewed by Sam Weinig.
     7
     8        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
     9        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
     10        (DumpRenderTreeSupportGtk):
     11
    1122013-02-10  Jae Hyun Park  <jae.park08@gmail.com>
    213
  • trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp

    r142348 r142509  
    537537}
    538538
    539 double DumpRenderTreeSupportGtk::defaultMinimumTimerInterval()
    540 {
    541     return Settings::defaultMinDOMTimerInterval();
    542 }
    543 
    544 void DumpRenderTreeSupportGtk::setMinimumTimerInterval(WebKitWebView* webView, double interval)
    545 {
    546     core(webView)->settings()->setMinDOMTimerInterval(interval);
    547 }
    548 
    549539CString DumpRenderTreeSupportGtk::accessibilityHelpText(AtkObject* axObject)
    550540{
  • trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h

    r142348 r142509  
    7979    static bool isCommandEnabled(WebKitWebView*, const gchar* name);
    8080    static bool findString(WebKitWebView*, const gchar*, WebKitFindOptions);
    81     static double defaultMinimumTimerInterval(); // Not really tied to WebView
    82     static void setMinimumTimerInterval(WebKitWebView*, double);
    8381    static void rectangleForSelection(WebKitWebFrame*, cairo_rectangle_int_t*);
    8482    static void scalePageBy(WebKitWebView*, float, float, float);
  • trunk/Source/WebKit/mac/ChangeLog

    r142408 r142509  
     12013-02-11  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
     4        https://bugs.webkit.org/show_bug.cgi?id=109349
     5
     6        Reviewed by Sam Weinig.
     7
     8        * WebView/WebView.mm:
     9        * WebView/WebViewPrivate.h:
     10
    1112013-02-10  Dan Bernstein  <mitz@apple.com>
    212
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r142395 r142509  
    30743074}
    30753075
    3076 + (double)_defaultMinimumTimerInterval
    3077 {
    3078     return Settings::defaultMinDOMTimerInterval();
    3079 }
    3080 
    3081 - (void)_setMinimumTimerInterval:(double)intervalInSeconds
    3082 {
    3083     if (_private->page)
    3084         _private->page->settings()->setMinDOMTimerInterval(intervalInSeconds);
    3085 }
    3086 
    30873076+ (BOOL)_HTTPPipeliningEnabled
    30883077{
  • trunk/Source/WebKit/mac/WebView/WebViewPrivate.h

    r141011 r142509  
    621621
    622622/*!
    623     @method defaultMinimumTimerInterval
    624     @discussion Should consider moving this to the public API.
    625     @result Returns the default minimum timer interval.
    626 */
    627 + (double)_defaultMinimumTimerInterval;
    628 
    629 /*!
    630     @method setMinimumTimerInterval:
    631     @discussion Sets the minimum interval for DOMTimers in this WebView. This method is
    632     exposed here in the Mac port rather than through WebPreferences (which generally
    633     governs Settings) because this value is something adjusted at run time, not set
    634     globally via "defaults write". Should consider adding this to the public API.
    635     @param intervalInSeconds The new minimum timer interval, in seconds.
    636 */
    637 - (void)_setMinimumTimerInterval:(double)intervalInSeconds;
    638 
    639 /*!
    640623    @method _HTTPPipeliningEnabled
    641624    @abstract Checks the HTTP pipelining status.
  • trunk/Source/WebKit/qt/ChangeLog

    r142348 r142509  
     12013-02-11  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
     4        https://bugs.webkit.org/show_bug.cgi?id=109349
     5
     6        Reviewed by Sam Weinig.
     7
     8        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
     9        * WebCoreSupport/DumpRenderTreeSupportQt.h:
     10
    1112013-02-08  Benjamin Poulain  <bpoulain@apple.com>
    212
  • trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp

    r142348 r142509  
    798798}
    799799
    800 double DumpRenderTreeSupportQt::defaultMinimumTimerInterval()
    801 {
    802     return Settings::defaultMinDOMTimerInterval();
    803 }
    804 
    805 void DumpRenderTreeSupportQt::setMinimumTimerInterval(QWebPageAdapter* adapter, double interval)
    806 {
    807     Page* corePage = adapter->page;
    808     if (!corePage)
    809         return;
    810 
    811     corePage->settings()->setMinDOMTimerInterval(interval);
    812 }
    813 
    814800bool DumpRenderTreeSupportQt::thirdPartyCookiePolicyAllows(QWebPageAdapter *adapter, const QUrl& url, const QUrl& firstPartyUrl)
    815801{
  • trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h

    r142348 r142509  
    183183    static QStringList contextMenu(QWebPageAdapter*);
    184184
    185     static double defaultMinimumTimerInterval(); // Not really tied to WebView
    186     static void setMinimumTimerInterval(QWebPageAdapter*, double);
    187 
    188185    static QUrl mediaContentUrlByElementId(QWebFrameAdapter*, const QString& elementId);
    189186    static void setAlternateHtml(QWebFrameAdapter*, const QString& html, const QUrl& baseUrl, const QUrl& failingUrl);
  • trunk/Source/WebKit2/ChangeLog

    r142507 r142509  
     12013-02-11  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
     4        https://bugs.webkit.org/show_bug.cgi?id=109349
     5
     6        Reviewed by Sam Weinig.
     7
     8        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     9        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
     10        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     11        * WebProcess/InjectedBundle/InjectedBundle.h:
     12        (InjectedBundle):
     13
    1142013-02-11  Dean Jackson  <dino@apple.com>
    215
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r142348 r142509  
    265265}
    266266
    267 void WKBundleSetMinimumTimerInterval(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, double seconds)
    268 {
    269     toImpl(bundleRef)->setMinimumTimerInterval(toImpl(pageGroupRef), seconds);
    270 }
    271 
    272267WKDataRef WKBundleCreateWKDataFromUInt8Array(WKBundleRef bundle, JSContextRef context, JSValueRef data)
    273268{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r142348 r142509  
    6767WK_EXPORT void WKBundleRemoveAllWebNotificationPermissions(WKBundleRef bundle, WKBundlePageRef page);
    6868WK_EXPORT uint64_t WKBundleGetWebNotificationID(WKBundleRef bundle, JSContextRef context, JSValueRef notification);
    69 WK_EXPORT void WKBundleSetMinimumTimerInterval(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, double interval);
    7069WK_EXPORT WKDataRef WKBundleCreateWKDataFromUInt8Array(WKBundleRef bundle, JSContextRef context, JSValueRef data);
    7170
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r142499 r142509  
    587587}
    588588
    589 void InjectedBundle::setMinimumTimerInterval(WebPageGroupProxy* pageGroup, double seconds)
    590 {
    591     const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
    592     for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
    593         (*iter)->settings()->setMinDOMTimerInterval(seconds);
    594 }
    595 
    596589void InjectedBundle::setWebNotificationPermission(WebPage* page, const String& originString, bool allowed)
    597590{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r142348 r142509  
    125125    bool isPageBoxVisible(WebFrame*, int);
    126126    void setUserStyleSheetLocation(WebPageGroupProxy*, const String&);
    127     void setMinimumTimerInterval(WebPageGroupProxy*, double seconds);
    128127    void setWebNotificationPermission(WebPage*, const String& originString, bool allowed);
    129128    void removeAllWebNotificationPermissions(WebPage*);
  • trunk/Source/autotools/symbols.filter

    r142352 r142509  
    4343_ZN7WebCore8Document36updateLayoutIgnorePendingStylesheetsEv;
    4444_ZN7WebCore8Document8iconURLsEv;
     45_ZN7WebCore8Settings19minDOMTimerIntervalEv;
     46_ZN7WebCore8Settings22setMinDOMTimerIntervalEd;
    4547_ZN7WebCore9HTMLNames8inputTagE;
    4648_ZN7WebCore9HTMLNames11textareaTagE;
  • trunk/Tools/ChangeLog

    r142507 r142509  
     12013-02-11  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
     4        https://bugs.webkit.org/show_bug.cgi?id=109349
     5
     6        Reviewed by Sam Weinig.
     7
     8        Get rid of TestRunner's setMinimumTimerInterval and all the related functions.
     9
     10        This also fixes an oddity:
     11        TestRunners were initialized with a minimum timer interval of 10 milliseconds instead
     12        of using the default value. All with the same copy of an outdated comment.
     13
     14        * DumpRenderTree/TestRunner.cpp:
     15        (TestRunner::staticFunctions):
     16        * DumpRenderTree/TestRunner.h:
     17        (TestRunner):
     18        * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
     19        * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
     20        * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
     21        (WebTestRunner::TestRunner::TestRunner):
     22        * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
     23        (TestRunner):
     24        * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
     25        (WebTestRunner::WebPreferences::reset):
     26        (WebTestRunner::WebPreferences::applyTo):
     27        * DumpRenderTree/chromium/WebViewHost.cpp:
     28        (WebViewHost::reset):
     29        * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
     30        (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
     31        * DumpRenderTree/efl/TestRunnerEfl.cpp:
     32        * DumpRenderTree/gtk/DumpRenderTree.cpp:
     33        (resetDefaultsToConsistentValues):
     34        * DumpRenderTree/gtk/TestRunnerGtk.cpp:
     35        * DumpRenderTree/mac/DumpRenderTree.mm:
     36        (resetWebViewToConsistentStateBeforeTesting):
     37        * DumpRenderTree/mac/TestRunnerMac.mm:
     38        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
     39        (WebCore::WebPage::resetSettings):
     40        * DumpRenderTree/qt/TestRunnerQt.cpp:
     41        * DumpRenderTree/qt/TestRunnerQt.h:
     42        (TestRunner):
     43        * DumpRenderTree/win/DumpRenderTree.cpp:
     44        (resetWebViewToConsistentStateBeforeTesting):
     45        * DumpRenderTree/win/TestRunnerWin.cpp:
     46        * DumpRenderTree/wx/TestRunnerWx.cpp:
     47        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
     48        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
     49        (WTR::InjectedBundle::beginTesting):
     50        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     51        * WebKitTestRunner/InjectedBundle/TestRunner.h:
     52        (TestRunner):
     53
    1542013-02-11  Dean Jackson  <dino@apple.com>
    255
  • trunk/Tools/DumpRenderTree/TestRunner.cpp

    r142499 r142509  
    19581958    JSRetainPtr<JSStringRef> title(Adopt, JSValueToStringCopy(context, arguments[0], exception));
    19591959    controller->simulateLegacyWebNotificationClick(title.get());
    1960     return JSValueMakeUndefined(context);
    1961 }
    1962 
    1963 static JSValueRef setMinimumTimerIntervalCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
    1964 {
    1965     if (argumentCount < 1)
    1966         return JSValueMakeUndefined(context);
    1967 
    1968     double minimum = JSValueToNumber(context, arguments[0], exception);
    1969     ASSERT(!*exception);
    1970 
    1971     TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
    1972     controller->setMinimumTimerInterval(minimum);
    1973 
    19741960    return JSValueMakeUndefined(context);
    19751961}
     
    22192205        { "setAutomaticLinkDetectionEnabled", setAutomaticLinkDetectionEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    22202206        { "setMainFrameIsFirstResponder", setMainFrameIsFirstResponderCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    2221         { "setMinimumTimerInterval", setMinimumTimerIntervalCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    22222207        { "setMockDeviceOrientation", setMockDeviceOrientationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
    22232208        { "setMockGeolocationPositionUnavailableError", setMockGeolocationPositionUnavailableErrorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
  • trunk/Tools/DumpRenderTree/TestRunner.h

    r142499 r142509  
    345345    static const unsigned maxViewHeight;
    346346
    347     void setMinimumTimerInterval(double);
    348 
    349347    void setTextDirection(JSStringRef);
    350348    const std::string& titleTextDirection() const { return m_titleTextDirection; }
  • trunk/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp

    r142499 r142509  
    574574}
    575575
    576 void TestRunner::setMinimumTimerInterval(double)
    577 {
    578     notImplemented();
    579 }
    580 
    581576void TestRunner::setTextDirection(JSStringRef)
    582577{
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebPreferences.h

    r142237 r142509  
    105105    bool shouldRespectImageOrientation;
    106106    bool asynchronousSpellCheckingEnabled;
    107     double minimumTimerInterval;
    108107    bool touchDragDropEnabled;
    109108
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp

    r142370 r142509  
    232232    bindMethod("setPluginsEnabled", &TestRunner::setPluginsEnabled);
    233233    bindMethod("setAsynchronousSpellCheckingEnabled", &TestRunner::setAsynchronousSpellCheckingEnabled);
    234     bindMethod("setMinimumTimerInterval", &TestRunner::setMinimumTimerInterval);
    235234    bindMethod("setTouchDragDropEnabled", &TestRunner::setTouchDragDropEnabled);
    236235
     
    16461645}
    16471646
    1648 void TestRunner::setMinimumTimerInterval(const CppArgumentList& arguments, CppVariant* result)
    1649 {
    1650     if (arguments.size() > 0 && arguments[0].isNumber()) {
    1651         m_delegate->preferences()->minimumTimerInterval = arguments[0].toDouble();
    1652         m_delegate->applyPreferences();
    1653     }
    1654     result->setNull();
    1655 }
    1656 
    16571647void TestRunner::setTouchDragDropEnabled(const CppArgumentList& arguments, CppVariant* result)
    16581648{
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h

    r142370 r142509  
    309309    void setAsynchronousSpellCheckingEnabled(const CppArgumentList&, CppVariant*);
    310310
    311     void setMinimumTimerInterval(const CppArgumentList&, CppVariant*);
    312311    void setTouchDragDropEnabled(const CppArgumentList&, CppVariant*);
    313312
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp

    r142237 r142509  
    132132    shouldRespectImageOrientation = false;
    133133    asynchronousSpellCheckingEnabled = false;
    134     minimumTimerInterval = 0.010; // 10 milliseconds.
    135134    touchDragDropEnabled = false;
    136135}
     
    203202    settings->setShouldRespectImageOrientation(shouldRespectImageOrientation);
    204203    settings->setAsynchronousSpellCheckingEnabled(asynchronousSpellCheckingEnabled);
    205     settings->setMinimumTimerInterval(minimumTimerInterval);
    206204    settings->setTouchDragDropEnabled(touchDragDropEnabled);
    207205
  • trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp

    r142371 r142509  
    10601060    if (m_webWidget) {
    10611061        webView()->mainFrame()->setName(WebString());
    1062         webView()->settings()->setMinimumTimerInterval(webkit_support::GetForegroundTabTimerInterval());
    10631062    }
    10641063}
  • trunk/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp

    r141439 r142509  
    274274    ewk_view_setting_user_stylesheet_set(mainView(), 0);
    275275    ewk_view_setting_enable_xss_auditor_set(browser->mainView(), EINA_TRUE);
    276     ewk_view_setting_minimum_timer_interval_set(browser->mainView(), 0.010); // 10 milliseconds (DOMTimer::s_minDefaultTimerInterval)
    277276    ewk_view_setting_enable_webgl_set(mainView(), EINA_TRUE);
    278277    ewk_view_setting_enable_hyperlink_auditing_set(mainView(), EINA_FALSE);
  • trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp

    r142499 r142509  
    792792}
    793793
    794 void TestRunner::setMinimumTimerInterval(double minimumTimerInterval)
    795 {
    796     ewk_view_setting_minimum_timer_interval_set(browser->mainView(), minimumTimerInterval);
    797 }
    798 
    799794void TestRunner::setTextDirection(JSStringRef direction)
    800795{
  • trunk/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp

    r142499 r142509  
    482482
    483483    webkit_web_view_set_zoom_level(webView, 1.0);
    484     DumpRenderTreeSupportGtk::setMinimumTimerInterval(webView, DumpRenderTreeSupportGtk::defaultMinimumTimerInterval());
    485484
    486485    DumpRenderTreeSupportGtk::resetOriginAccessWhiteLists();
  • trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp

    r142499 r142509  
    893893}
    894894
    895 void TestRunner::setMinimumTimerInterval(double minimumTimerInterval)
    896 {
    897     WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
    898     DumpRenderTreeSupportGtk::setMinimumTimerInterval(webView, minimumTimerInterval);
    899 }
    900 
    901895void TestRunner::setTextDirection(JSStringRef direction)
    902896{
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r141491 r142509  
    12691269    [WebView _removeAllUserContentFromGroup:[webView groupName]];
    12701270    [[webView window] setAutodisplay:NO];
    1271     [webView _setMinimumTimerInterval:[WebView _defaultMinimumTimerInterval]];
    12721271    [webView setTracksRepaints:NO];
    12731272   
  • trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm

    r142499 r142509  
    10701070}
    10711071
    1072 void TestRunner::setMinimumTimerInterval(double minimumTimerInterval)
    1073 {
    1074     [[mainFrame webView] _setMinimumTimerInterval:minimumTimerInterval];
    1075 }
    1076 
    10771072void TestRunner::setTextDirection(JSStringRef directionName)
    10781073{
  • trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp

    r142499 r142509  
    205205    DumpRenderTreeSupportQt::setSeamlessIFramesEnabled(true);
    206206
    207     DumpRenderTreeSupportQt::setMinimumTimerInterval(handle(), DumpRenderTreeSupportQt::defaultMinimumTimerInterval());
    208 
    209207    DumpRenderTreeSupportQt::resetInternalsObject(mainFrame()->handle());
    210208
  • trunk/Tools/DumpRenderTree/qt/TestRunnerQt.cpp

    r142499 r142509  
    869869}
    870870
    871 void TestRunner::setMinimumTimerInterval(double minimumTimerInterval)
    872 {
    873     DumpRenderTreeSupportQt::setMinimumTimerInterval(m_drt->pageAdapter(), minimumTimerInterval);
    874 }
    875 
    876871void TestRunner::originsWithLocalStorage()
    877872{
  • trunk/Tools/DumpRenderTree/qt/TestRunnerQt.h

    r142499 r142509  
    258258    void evaluateScriptInIsolatedWorld(int worldID, const QString& script);
    259259    void addUserStyleSheet(const QString& sourceCode);
    260 
    261     void setMinimumTimerInterval(double);
    262260   
    263261    void originsWithLocalStorage();
  • trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp

    r142499 r142509  
    908908        return;
    909909
    910     double minimumInterval = 0;
    911     if (SUCCEEDED(webViewPrivate->defaultMinimumTimerInterval(&minimumInterval)))
    912         webViewPrivate->setMinimumTimerInterval(minimumInterval);
    913 
    914910    HWND viewWindow;
    915911    if (SUCCEEDED(webViewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))) && viewWindow)
  • trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp

    r142499 r142509  
    12541254}
    12551255
    1256 void TestRunner::setMinimumTimerInterval(double minimumTimerInterval)
    1257 {
    1258     COMPtr<IWebView> webView;
    1259     if (FAILED(frame->webView(&webView)))
    1260         return;
    1261 
    1262     COMPtr<IWebViewPrivate> viewPrivate(Query, webView);
    1263     if (!viewPrivate)
    1264         return;
    1265 
    1266     viewPrivate->setMinimumTimerInterval(minimumTimerInterval);
    1267 }
    1268 
    12691256void TestRunner::setTextDirection(JSStringRef direction)
    12701257{
  • trunk/Tools/DumpRenderTree/wx/TestRunnerWx.cpp

    r142499 r142509  
    498498}
    499499
    500 void TestRunner::setMinimumTimerInterval(double interval)
    501 {
    502 
    503 }
    504 
    505500void TestRunner::syncLocalStorage()
    506501{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl

    r142499 r142509  
    6767    void setUserStyleSheetEnabled(in boolean value);
    6868    void setUserStyleSheetLocation(in DOMString location);
    69     void setMinimumTimerInterval(in double interval); // Interval specified in seconds.
    7069    void setSpatialNavigationEnabled(in boolean value);
    7170    void setTabKeyCyclesThroughElements(in boolean enabled);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r141010 r142509  
    251251    WKBundleSetFrameFlatteningEnabled(m_bundle, m_pageGroup, false);
    252252    WKBundleSetMinimumLogicalFontSize(m_bundle, m_pageGroup, 9);
    253     WKBundleSetMinimumTimerInterval(m_bundle, m_pageGroup, 0.010); // 10 milliseconds (DOMTimer::s_minDefaultTimerInterval)
    254253    WKBundleSetSpatialNavigationEnabled(m_bundle, m_pageGroup, false);
    255254    WKBundleSetAllowFileAccessFromFileURLs(m_bundle, m_pageGroup, true);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r142499 r142509  
    652652}
    653653
    654 void TestRunner::setMinimumTimerInterval(double seconds)
    655 {
    656     WKBundleSetMinimumTimerInterval(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), seconds);
    657 }
    658 
    659654void TestRunner::setSpatialNavigationEnabled(bool enabled)
    660655{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r142499 r142509  
    111111    void setUserStyleSheetEnabled(bool);
    112112    void setUserStyleSheetLocation(JSStringRef);
    113     void setMinimumTimerInterval(double seconds); // Interval specified in seconds.
    114113    void setSpatialNavigationEnabled(bool);
    115114    void setTabKeyCyclesThroughElements(bool);
Note: See TracChangeset for help on using the changeset viewer.