diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs index 7d7ad686a18..d1b0505bab8 100644 --- a/components/webdriver_server/lib.rs +++ b/components/webdriver_server/lib.rs @@ -1067,7 +1067,7 @@ impl Handler { /// fn handle_window_handles(&mut self) -> WebDriverResult { let mut handles = self.get_window_handles(); - handles.sort(); + handles.sort_unstable(); Ok(WebDriverResponse::Generic(ValueResponse( serde_json::to_value(handles)?, @@ -1266,6 +1266,12 @@ impl Handler { let session = self.session_mut()?; session.set_webview_id(webview_id); session.set_browsing_context_id(BrowsingContextId::from(webview_id)); + + // Step 5. Update any implementation-specific state that would result + // from the user selecting session's current browsing context for interaction, + // without altering OS-level focus. + self.focus_webview(webview_id)?; + Ok(WebDriverResponse::Void) } diff --git a/tests/wpt/meta/webdriver/tests/classic/back/back.py.ini b/tests/wpt/meta/webdriver/tests/classic/back/back.py.ini index 6f12d53580c..074e67aef1b 100644 --- a/tests/wpt/meta/webdriver/tests/classic/back/back.py.ini +++ b/tests/wpt/meta/webdriver/tests/classic/back/back.py.ini @@ -7,6 +7,3 @@ [test_seen_nodes[https coop\]] expected: FAIL - - [test_history_pushstate] - expected: FAIL diff --git a/tests/wpt/meta/webdriver/tests/classic/forward/forward.py.ini b/tests/wpt/meta/webdriver/tests/classic/forward/forward.py.ini index ac3532fc471..13032a4e96e 100644 --- a/tests/wpt/meta/webdriver/tests/classic/forward/forward.py.ini +++ b/tests/wpt/meta/webdriver/tests/classic/forward/forward.py.ini @@ -13,6 +13,3 @@ [test_removed_iframe] expected: FAIL - - [test_history_pushstate] - expected: FAIL