mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
[webdriver] Move Webdriver to ServoShell (#36714)
Moving `webdriver` to `servoshell`: - Let `servoshell` manage lifecycle of `webdriver` - One by one, move the handling of webdriver commands from `constellation` to `embedder` Partially fix: https://github.com/servo/servo/issues/37370 Partially fix webdriver test timeout with `no_top_browsing_context` cc: @xiaochengh --------- Signed-off-by: batu_hoang <longvatrong111@gmail.com>
This commit is contained in:
parent
d55e2c4c90
commit
d0100797e8
9 changed files with 156 additions and 35 deletions
|
@ -4536,8 +4536,8 @@ where
|
|||
// Find the script channel for the given parent pipeline,
|
||||
// and pass the event to that script thread.
|
||||
match msg {
|
||||
WebDriverCommandMsg::CloseWebView(webview_id) => {
|
||||
self.handle_close_top_level_browsing_context(webview_id);
|
||||
WebDriverCommandMsg::CloseWebView(..) => {
|
||||
unreachable!("This command should be send directly to the embedder.");
|
||||
},
|
||||
WebDriverCommandMsg::NewWebView(
|
||||
originating_webview_id,
|
||||
|
@ -4575,9 +4575,8 @@ where
|
|||
WebDriverCommandMsg::FocusWebView(webview_id) => {
|
||||
self.handle_focus_web_view(webview_id);
|
||||
},
|
||||
WebDriverCommandMsg::IsWebViewOpen(webview_id, response_sender) => {
|
||||
let is_open = self.webviews.get(webview_id).is_some();
|
||||
let _ = response_sender.send(is_open);
|
||||
WebDriverCommandMsg::IsWebViewOpen(..) => {
|
||||
unreachable!("This command should be send directly to the embedder.");
|
||||
},
|
||||
WebDriverCommandMsg::IsBrowsingContextOpen(browsing_context_id, response_sender) => {
|
||||
let is_open = self.browsing_contexts.contains_key(&browsing_context_id);
|
||||
|
|
|
@ -247,6 +247,7 @@ mod from_script {
|
|||
Self::FinishJavaScriptEvaluation(..) => {
|
||||
target_variant!("FinishJavaScriptEvaluation")
|
||||
},
|
||||
Self::WebDriverCommand(..) => target_variant!("WebDriverCommand"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue