Bug 197273

Summary: DumpRenderTree doesn't call Internals::resetToConsistentState() before the first test
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Tools / TestsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, dino, ews-watchlist, lforschler, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
dino: review+, ews-watchlist: commit-queue-
Archive of layout-test-results from ews122 for ios-simulator-wk2 none

Description Simon Fraser (smfr) 2019-04-24 21:48:41 PDT
DRT doesn't call Internals::resetToConsistentState() before the first test. This is because it's called inside this block:

void resetWebViewToConsistentStateBeforeTesting(const TestOptions& options)
{
...
    if (gTestRunner) {
        gTestRunner->resetPageVisibility();
        WebCoreTestSupport::resetInternalsObject([mainFrame globalContext]);
        // in the case that a test using the chrome input field failed, be sure to clean up for the next test
        gTestRunner->removeChromeInputField();
    }

and we don't have a gTestRunner yet. [mainFrame globalContext] needs one because it triggers didClearWindowObjectInStandardWorldForFrame: that assumes that one exists.
Comment 1 Simon Fraser (smfr) 2019-04-24 21:56:50 PDT
Created attachment 368212 [details]
Patch
Comment 2 EWS Watchlist 2019-04-25 00:01:25 PDT
Comment on attachment 368212 [details]
Patch

Attachment 368212 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/11992467

New failing tests:
imported/w3c/web-platform-tests/service-workers/cache-storage/window/cache-abort.https.html
Comment 3 EWS Watchlist 2019-04-25 00:01:27 PDT
Created attachment 368217 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 4 Dean Jackson 2019-04-25 11:23:37 PDT
Comment on attachment 368212 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=368212&action=review

> Tools/DumpRenderTree/mac/DumpRenderTree.mm:1887
> +    // in the case that a test using the chrome input field failed, be sure to clean up for the next test

Please fix to be sentence style.
Comment 5 Simon Fraser (smfr) 2019-04-25 15:42:31 PDT
https://trac.webkit.org/r244668
Comment 6 Radar WebKit Bug Importer 2019-04-25 15:43:22 PDT
<rdar://problem/50223289>