mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
webdriver: improve session commands (#38397)
Add timeout and strictFileInteractability capabilities to response of new session command. Allow delete session command to run without a session. Testing: Clear some unexpected results of session tests in webdriver CI and `tests/wpt/meta/webdriver/tests/classic/delete_session/delete.py.ini` --------- Signed-off-by: batu_hoang <hoang.binh.trong@huawei.com> Signed-off-by: batu_hoang <longvatrong111@gmail.com>
This commit is contained in:
parent
c836ed374c
commit
929fd0aa3c
4 changed files with 19 additions and 11 deletions
|
@ -623,8 +623,12 @@ impl Handler {
|
|||
Ok(WebDriverResponse::NewSession(response))
|
||||
}
|
||||
|
||||
/// <https://w3c.github.io/webdriver/#dfn-delete-session>
|
||||
fn handle_delete_session(&mut self) -> WebDriverResult<WebDriverResponse> {
|
||||
// Step 1. If session is http, close the session
|
||||
self.session = None;
|
||||
|
||||
// Step 2. Return success with data null
|
||||
Ok(WebDriverResponse::DeleteSession)
|
||||
}
|
||||
|
||||
|
@ -2445,7 +2449,9 @@ impl WebDriverHandler<ServoExtensionRoute> for Handler {
|
|||
// Unless we are trying to create a new session, we need to ensure that a
|
||||
// session has previously been created
|
||||
match msg.command {
|
||||
WebDriverCommand::NewSession(_) | WebDriverCommand::Status => {},
|
||||
WebDriverCommand::NewSession(_) |
|
||||
WebDriverCommand::Status |
|
||||
WebDriverCommand::DeleteSession => {},
|
||||
_ => {
|
||||
self.session()?;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue