Changeset 244668 in webkit


Ignore:
Timestamp:
Apr 25, 2019 3:41:59 PM (5 years ago)
Author:
Simon Fraser
Message:

DumpRenderTree doesn't call Internals::resetToConsistentState() before the first test
https://bugs.webkit.org/show_bug.cgi?id=197273

Reviewed by Dean Jackson.

Reorder code so that we create gTestRunner before calling resetWebViewToConsistentStateBeforeTesting(),
so that WebCoreTestSupport::resetInternalsObject() is always run.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebViewToConsistentStateBeforeTesting):
(runTest):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r244664 r244668  
    118118        * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: Add a test that POSTs all sorts of things
    119119          from an XHR to a custom protocol.
     120
     1212019-04-25  Simon Fraser  <simon.fraser@apple.com>
     122
     123        DumpRenderTree doesn't call Internals::resetToConsistentState() before the first test
     124        https://bugs.webkit.org/show_bug.cgi?id=197273
     125
     126        Reviewed by Dean Jackson.
     127
     128        Reorder code so that we create gTestRunner before calling resetWebViewToConsistentStateBeforeTesting(),
     129        so that WebCoreTestSupport::resetInternalsObject() is always run.
     130
     131        * DumpRenderTree/mac/DumpRenderTree.mm:
     132        (resetWebViewToConsistentStateBeforeTesting):
     133        (runTest):
    120134
    1211352019-04-24  John Wilander  <wilander@apple.com>
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r244599 r244668  
    18831883    setlocale(LC_ALL, "");
    18841884
    1885     if (gTestRunner) {
    1886         gTestRunner->resetPageVisibility();
    1887         WebCoreTestSupport::resetInternalsObject([mainFrame globalContext]);
    1888         // in the case that a test using the chrome input field failed, be sure to clean up for the next test
    1889         gTestRunner->removeChromeInputField();
    1890     }
     1885    ASSERT(gTestRunner);
     1886    gTestRunner->resetPageVisibility();
     1887    // In the case that a test using the chrome input field failed, be sure to clean up for the next test.
     1888    gTestRunner->removeChromeInputField();
     1889
     1890    WebCoreTestSupport::resetInternalsObject([mainFrame globalContext]);
    18911891
    18921892#if !PLATFORM(IOS_FAMILY)
     
    20062006    mainFrameTestOptions = options;
    20072007
    2008     resetWebViewToConsistentStateBeforeTesting(options);
    2009 
    20102008    const char* testURL([[url absoluteString] UTF8String]);
    2011 
    2012 #if !PLATFORM(IOS_FAMILY)
    2013     changeWindowScaleIfNeeded(testURL);
    2014 #endif
    2015 
    20162009    gTestRunner = TestRunner::create(testURL, command.expectedPixelHash);
    20172010    gTestRunner->setAllowedHosts(allowedHosts);
    20182011    gTestRunner->setCustomTimeout(command.timeout);
    20192012    gTestRunner->setDumpJSConsoleLogInStdErr(command.dumpJSConsoleLogInStdErr || options.dumpJSConsoleLogInStdErr);
     2013
     2014    resetWebViewToConsistentStateBeforeTesting(options);
     2015
     2016#if !PLATFORM(IOS_FAMILY)
     2017    changeWindowScaleIfNeeded(testURL);
     2018#endif
     2019
    20202020    topLoadingFrame = nil;
    20212021#if !PLATFORM(IOS_FAMILY)
Note: See TracChangeset for help on using the changeset viewer.