Repository navigation
constellation: Report history traversals to webdriver when they are requested - #50006
Conversation
| /// Whether a history traversal is still running, | ||
| /// or the top-level document is still loading. | ||
| fn webview_is_navigating(&self, webview_id: WebViewId) -> bool { | ||
| let has_ongoing_traversal = self | ||
| .webviews | ||
| .get(&webview_id) | ||
| .is_some_and(|webview| webview.ongoing_history_traversal_request.is_some()); | ||
| let top_level_is_loading = self | ||
| .browsing_contexts | ||
| .get(&BrowsingContextId::from(webview_id)) | ||
| .and_then(|context| self.pipelines.get(&context.pipeline_id)) | ||
| .is_some_and(|pipeline| !pipeline.completely_loaded); | ||
| has_ongoing_traversal || top_level_is_loading | ||
| } |
There was a problem hiding this comment.
I think it makes sense to add this to ConstellationWebView a helper that takes the BrowsingContext.
Signed-off-by: Euclid Ye <[email protected]>
Signed-off-by: Euclid Ye <[email protected]>
03968ab to
23ef7b5
Compare
|
🔨 Triggering try run (#44118484016) for Linux (WPT) |
|
Test results for linux-wpt from try job (#44118484016): Flaky unexpected result (29)
Stable unexpected results that are known to be intermittent (9)
|
|
✨ Try run (#44118484016) succeeded. |
TimvdLippe
left a comment
There was a problem hiding this comment.
Approving to get CI back to stable, given the amount of intermittent webdriver tests in the other PRs. That said, I assume that Martins only concern was moving the helper and he was okay with the rest of the code. If that assumption turns out to be false, then I am sorry for that, but I am willing to take that risk in favor of stabilizing CI.
|
The failure was test_largest_contentful_paint_js_api_with_mouse_click_and_reload, known as #49756 for a while. The moving was done in second commit. |
History traversal didn't report webdriver navigation status, until a pipeline is created (which is queued),
so
WebDriverCommandMsg::IsNavigationInProgressmight say false, which makes webdriver serverskip the waiting when it should.
Testing: This fixes one intermittent case in
tests/webdriver/tests/classic/back/user_prompts.py, where the back commands finishes prematurely, so that when next command is run, we are still on the old document.Fixes: Part of #42802.
Fixes: Part of #49983