Loading URL's in to TestWebView is racy

Bug #1567991 reported by Chris Coulson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Oxide
New
Undecided
Unassigned

Bug Description

There are lots of this pattern in tests:

webView.url = <some_url>;
verify(webView.waitForLoadSucceeded());

TestWebView tracks successful loads with qtest_loadsSucceededCount. waitForLoadSucceeded() increments another counter (qtest_expectedLoadsSucceededCount) and waits until they both match.

As these counts get out of sync, we have another function - clearLoadEventCounters() which resets all of these. A solution to some test failures is to place calls to this in various places.

It might be better to add a new call to TestWebView (loadUrlAndWait, or something like that), which:
- Stops pending loads and waits for them to stop.
- Loads WebView.url
- Waits for the load to succeed.

It would probably be easier to make this more reliable and race free.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.