mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
webdriver: Simplify webview related steps that are guaranteed to succeed (#38855)
Testing: Semantically it is the same. But still run the test locally and
in [try](https://github.com/yezhizhen/servo/actions/runs/17159323926) as
I was worried about some unexpected side effect from
176e42d36d
. But seems everything is good.
---------
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
parent
4082f57003
commit
f323e67024
2 changed files with 31 additions and 38 deletions
|
@ -60,6 +60,7 @@ pub struct WebDriverSession {
|
|||
|
||||
strict_file_interactability: bool,
|
||||
|
||||
/// <https://w3c.github.io/webdriver/#dfn-user-prompt-handler>
|
||||
user_prompt_handler: UserPromptHandler,
|
||||
|
||||
/// <https://w3c.github.io/webdriver/#dfn-input-state-map>
|
||||
|
@ -84,12 +85,12 @@ impl WebDriverSession {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn set_webview_id(&mut self, webview_id: Option<WebViewId>) {
|
||||
self.webview_id = webview_id;
|
||||
pub fn set_webview_id(&mut self, webview_id: WebViewId) {
|
||||
self.webview_id = Some(webview_id);
|
||||
}
|
||||
|
||||
pub fn set_browsing_context_id(&mut self, browsing_context_id: Option<BrowsingContextId>) {
|
||||
self.browsing_context_id = browsing_context_id;
|
||||
pub fn set_browsing_context_id(&mut self, browsing_context_id: BrowsingContextId) {
|
||||
self.browsing_context_id = Some(browsing_context_id);
|
||||
}
|
||||
|
||||
pub fn current_webview_id(&self) -> Option<WebViewId> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue