ubuntu-webapps-bugs team mailing list archive
-
ubuntu-webapps-bugs team
-
Mailing list archive
-
Message #03965
[Bug 1567991] [NEW] Loading URL's in to TestWebView is racy
Public bug reported:
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.
** Affects: oxide
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
WebApps bug tracking, which is subscribed to Oxide.
https://bugs.launchpad.net/bugs/1567991
Title:
Loading URL's in to TestWebView is racy
Status in Oxide:
New
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 manage notifications about this bug go to:
https://bugs.launchpad.net/oxide/+bug/1567991/+subscriptions