Bug 43653 - WebKitTestRunner should be more aggressive about ensuring consistent state between tests
Summary: WebKitTestRunner should be more aggressive about ensuring consistent state be...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-08-06 16:29 PDT by Sam Weinig
Modified: 2010-08-12 14:28 PDT (History)
3 users (show)

See Also:


Attachments
Patch (33.24 KB, patch)
2010-08-11 19:57 PDT, Sam Weinig
sam: review-
Details | Formatted Diff | Diff
Patch 2 (32.80 KB, patch)
2010-08-11 23:08 PDT, Sam Weinig
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.