diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index db973e6c98d..0cfe698106c 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -1253,7 +1253,15 @@ where self.handle_exit(); }, EmbedderToConstellationMessage::GetFocusTopLevelBrowsingContext(resp_chan) => { - let _ = resp_chan.send(self.webviews.focused_webview().map(|(id, _)| id)); + let focused_context = self + .webviews + .focused_webview() + .filter(|(_, webview)| { + self.browsing_contexts + .contains_key(&webview.focused_browsing_context_id) + }) + .map(|(id, _)| id); + let _ = resp_chan.send(focused_context); }, // Perform a navigation previously requested by script, if approved by the embedder. // If there is already a pending page (self.pending_changes), it will not be overridden; diff --git a/tests/wpt/meta/MANIFEST.json b/tests/wpt/meta/MANIFEST.json index d4ae9d452f6..a30e793a3d4 100644 --- a/tests/wpt/meta/MANIFEST.json +++ b/tests/wpt/meta/MANIFEST.json @@ -510216,7 +510216,7 @@ [] ], "servodriver.py": [ - "bd16d7987e539a3325d88876982462ea1a3eb638", + "7121e1dafcc2d55ebc18bdf3e922ce9978b94ee1", [] ], "webkit.py": [ diff --git a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/servodriver.py b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/servodriver.py index bd16d7987e5..7121e1dafcc 100644 --- a/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/servodriver.py +++ b/tests/wpt/tests/tools/wptrunner/wptrunner/browsers/servodriver.py @@ -101,7 +101,7 @@ class ServoWebDriverBrowser(WebDriverBrowser): # For some reason rustls does not like the certificate generated by the WPT tooling. "--ignore-certificate-errors", "--window-size", "800x600", - "data:,", + "about:blank", ] ca_cert_path = server_config.ssl_config["ca_cert_path"]