Changeset 119127 in webkit


Ignore:
Timestamp:
May 31, 2012 11:11:55 AM (12 years ago)
Author:
ap@apple.com
Message:

[WK2] window.internals settings are not reset between tests
https://bugs.webkit.org/show_bug.cgi?id=87783

Reviewed by Mihai Parparita.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::done): Call resetAfterTest().
  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::prepare): Renamed from "reset" for clarity. (WTR::InjectedBundlePage::resetAfterTest): Added a function that resets internals. This needs to be done after a tets, because the code assumes that there is an object with this name in global scope.
  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r119116 r119127  
     12012-05-31  Alexey Proskuryakov  <ap@apple.com>
     2
     3        [WK2] window.internals settings are not reset between tests
     4        https://bugs.webkit.org/show_bug.cgi?id=87783
     5
     6        Reviewed by Mihai Parparita.
     7
     8        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
     9        (WTR::InjectedBundle::done): Call resetAfterTest().
     10
     11        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
     12        (WTR::InjectedBundlePage::prepare): Renamed from "reset" for clarity.
     13        (WTR::InjectedBundlePage::resetAfterTest): Added a function that resets internals.
     14        This needs to be done after a tets, because the code assumes that there is an object
     15        with this name in global scope.
     16
     17        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
     18
    1192012-05-31  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
    220
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r116338 r119127  
    231231    m_layoutTestController->setShouldDumpFrameLoadCallbacks(booleanForKey(settings, "DumpFrameLoadDelegates"));
    232232
    233     page()->reset();
     233    page()->prepare();
    234234
    235235    WKBundleClearAllDatabases(m_bundle);
     
    261261
    262262    closeOtherPages();
    263    
     263
     264    page()->resetAfterTest();
     265
    264266    m_state = Idle;
    265267}
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp

    r118397 r119127  
    331331}
    332332
    333 void InjectedBundlePage::reset()
     333void InjectedBundlePage::prepare()
    334334{
    335335    WKBundlePageClearMainFrameName(m_page);
     
    346346   
    347347    WKBundlePageSetTracksRepaints(m_page, false);
     348}
     349
     350void InjectedBundlePage::resetAfterTest()
     351{
     352    WKBundleFrameRef frame = WKBundlePageGetMainFrame(m_page);
     353    JSGlobalContextRef context = WKBundleFrameGetJavaScriptContext(frame);
     354#if PLATFORM(QT)
     355    DumpRenderTreeSupportQt::injectInternalsObject(context);
     356#else
     357    WebCoreTestSupport::resetInternalsObject(context);
     358#endif
    348359}
    349360
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h

    r117276 r119127  
    4343    void stopLoading();
    4444
    45     void reset();
     45    void prepare();
     46    void resetAfterTest();
    4647
    4748    void dumpBackForwardList();
Note: See TracChangeset for help on using the changeset viewer.