Bug 43653

Summary: WebKitTestRunner should be more aggressive about ensuring consistent state between tests
Product: WebKit Reporter: Sam Weinig <sam>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, ap, darin
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
sam: review-
Patch 2 ap: review+

Description Sam Weinig 2010-08-06 16:29:21 PDT
WebKitTestRunner should be more aggressive about ensuring consistent state between tests.  For instance, it should ensure that there are no outstanding loads, all windows other than the main window are closed and the web process is alive.
Comment 1 Sam Weinig 2010-08-06 16:29:49 PDT
<rdar://problem/8283644>
Comment 2 Sam Weinig 2010-08-11 19:57:45 PDT
Created attachment 64181 [details]
Patch
Comment 3 Sam Weinig 2010-08-11 22:45:48 PDT
Comment on attachment 64181 [details]
Patch

r-ing for now, there is something weird in here.
Comment 4 Alexey Proskuryakov 2010-08-11 23:00:45 PDT
> +    WKRetainPtr<WKURLRef> url(AdoptWK, createWKURL("about:blank"));
> +    WKPageLoadURL(m_mainWebView->page(), url.get());

It seems that this can affect performance a lot. DRT doesn't do that, does it?
Comment 5 Sam Weinig 2010-08-11 23:06:17 PDT
(In reply to comment #4)
> > +    WKRetainPtr<WKURLRef> url(AdoptWK, createWKURL("about:blank"));
> > +    WKPageLoadURL(m_mainWebView->page(), url.get());
> 
> It seems that this can affect performance a lot. DRT doesn't do that, does it?

DRT does, 

    [mainFrame loadHTMLString:@"<html></html>" baseURL:[NSURL URLWithString:@"about:blank"]];
    [mainFrame stopLoading];

in runTest(). I am not sure how much that differs in performance, but since we don't have that mechanism yet, I thought this would do nicely.
Comment 6 Sam Weinig 2010-08-11 23:08:32 PDT
Created attachment 64188 [details]
Patch 2
Comment 7 Sam Weinig 2010-08-12 14:28:39 PDT
Landed in r65267.