mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Rework webdriver session (#38225)
Reimplement webdriver session for better match to spec: - Add `create_session`: [spec](https://www.w3.org/TR/webdriver2/#dfn-create-a-session) - Refactor `handle_new_session` - Replace `PageLoadStrategy` string by enum --------- Signed-off-by: batu_hoang <hoang.binh.trong@huawei.com>
This commit is contained in:
parent
ae69646371
commit
f5ee72f89a
6 changed files with 314 additions and 202 deletions
|
@ -27,7 +27,7 @@ impl ServoCapabilities {
|
|||
set_window_rect: true,
|
||||
strict_file_interactability: false,
|
||||
accept_proxy: false,
|
||||
accept_custom: false,
|
||||
accept_custom: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,13 @@ impl BrowserCapabilities for ServoCapabilities {
|
|||
Ok(self.set_window_rect)
|
||||
}
|
||||
|
||||
fn strict_file_interactability(&mut self, _: &Capabilities) -> WebDriverResult<bool> {
|
||||
fn strict_file_interactability(&mut self, value: &Capabilities) -> WebDriverResult<bool> {
|
||||
if let Some(Value::Bool(strict_file_interactability)) =
|
||||
value.get("strictFileInteractability")
|
||||
{
|
||||
self.strict_file_interactability = *strict_file_interactability;
|
||||
}
|
||||
|
||||
Ok(self.strict_file_interactability)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue