mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
webdriver: Implement the "Get Window Handles" command (#38622)
Implment get window handles according to [spec](https://w3c.github.io/webdriver/#dfn-window-handles). - Window handles are supposed to identify `browsing context`. However, based on `get window handle command` and `get window handles command`, we only need to care about top level browsing context. - Back then, we use a random generated uuid for eacch webview id, it is not correct but still work because all commands depend on `webview id` and `browsing context id`. The only case we need window handle is is when webdriver gets window object with js script. Since the object is converted to the id of window's document node, `get window handle` should return the same thing. Action run (with updated expectation): https://github.com/longvatrong111/servo/actions/runs/16957610535 https://github.com/longvatrong111/servo/actions/runs/16957612027 Some tests may sporadically timeout due to unstable hit test. cc: @xiaochengh --------- Signed-off-by: batu_hoang <hoang.binh.trong@huawei.com>
This commit is contained in:
parent
dafb0abf31
commit
f24f225db8
13 changed files with 116 additions and 98 deletions
|
@ -157,6 +157,8 @@ pub enum WebDriverCommandMsg {
|
|||
FocusWebView(WebViewId, IpcSender<bool>),
|
||||
/// Get focused webview. For now, this is only used when start new session.
|
||||
GetFocusedWebView(IpcSender<Option<WebViewId>>),
|
||||
/// Get all webviews
|
||||
GetAllWebViews(IpcSender<Result<Vec<WebViewId>, ErrorStatus>>),
|
||||
/// Check whether top-level browsing context is open.
|
||||
IsWebViewOpen(WebViewId, IpcSender<bool>),
|
||||
/// Check whether browsing context is open.
|
||||
|
@ -249,6 +251,7 @@ pub enum WebDriverScriptCommand {
|
|||
WillSendKeys(String, String, bool, IpcSender<Result<bool, ErrorStatus>>),
|
||||
AddLoadStatusSender(WebViewId, IpcSender<WebDriverLoadStatus>),
|
||||
RemoveLoadStatusSender(WebViewId),
|
||||
GetWindowHandle(IpcSender<Result<String, ErrorStatus>>),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue