webdriver: command, httpapi: rename Close to CloseWindow (#44)
authorAndreas Tolfsen <ato@mozilla.com>
Mon, 24 Oct 2016 17:46:33 +0100
changeset 428086 470146fab45d67eda94addbd875af5b8f53aaa23
parent 428085 fac4373faedc5a0ff63f6d497ff7bc4f99e4c81d
child 428087 56d4680c1c54bed497e15b7e7e892212f00b2551
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
webdriver: command, httpapi: rename Close to CloseWindow (#44) Close Window is the official name of the command for closing windows. I believe it used to be called just Close some iterations ago. Source-Repo: https://github.com/mozilla/webdriver-rust Source-Revision: fa6961c34db424e98259f3d392dcba07d1e87695 committer: jgraham <james@hoppipolla.co.uk>
testing/webdriver/src/command.rs
testing/webdriver/src/httpapi.rs
--- a/testing/webdriver/src/command.rs
+++ b/testing/webdriver/src/command.rs
@@ -15,17 +15,17 @@ pub enum WebDriverCommand<T: WebDriverEx
     GetCurrentUrl,
     GoBack,
     GoForward,
     Refresh,
     GetTitle,
     GetPageSource,
     GetWindowHandle,
     GetWindowHandles,
-    Close,
+    CloseWindow,
     GetWindowSize,
     SetWindowSize(WindowSizeParameters),
     GetWindowPosition,
     SetWindowPosition(WindowPositionParameters),
     MaximizeWindow,
 //    FullscreenWindow // Not supported in marionette
     SwitchToWindow(SwitchToWindowParameters),
     SwitchToFrame(SwitchToFrameParameters),
@@ -120,17 +120,17 @@ impl <U: WebDriverExtensionRoute> WebDri
             Route::GetCurrentUrl => WebDriverCommand::GetCurrentUrl,
             Route::GoBack => WebDriverCommand::GoBack,
             Route::GoForward => WebDriverCommand::GoForward,
             Route::Refresh => WebDriverCommand::Refresh,
             Route::GetTitle => WebDriverCommand::GetTitle,
             Route::GetPageSource => WebDriverCommand::GetPageSource,
             Route::GetWindowHandle => WebDriverCommand::GetWindowHandle,
             Route::GetWindowHandles => WebDriverCommand::GetWindowHandles,
-            Route::Close => WebDriverCommand::Close,
+            Route::CloseWindow => WebDriverCommand::CloseWindow,
             Route::SetTimeouts => {
                 let parameters: TimeoutsParameters = try!(Parameters::from_json(&body_data));
                 WebDriverCommand::SetTimeouts(parameters)
             },
             Route::GetWindowSize => WebDriverCommand::GetWindowSize,
             Route::SetWindowSize => {
                 let parameters: WindowSizeParameters = try!(Parameters::from_json(&body_data));
                 WebDriverCommand::SetWindowSize(parameters)
@@ -341,17 +341,17 @@ impl <U:WebDriverExtensionRoute> ToJson 
             WebDriverCommand::GetCurrentUrl |
             WebDriverCommand::GoBack |
             WebDriverCommand::GoForward |
             WebDriverCommand::Refresh |
             WebDriverCommand::GetTitle |
             WebDriverCommand::GetPageSource |
             WebDriverCommand::GetWindowHandle |
             WebDriverCommand::GetWindowHandles |
-            WebDriverCommand::Close |
+            WebDriverCommand::CloseWindow |
             WebDriverCommand::GetWindowSize |
             WebDriverCommand::GetWindowPosition |
             WebDriverCommand::MaximizeWindow |
             WebDriverCommand::SwitchToParentFrame |
             WebDriverCommand::GetActiveElement |
             WebDriverCommand::IsDisplayed(_) |
             WebDriverCommand::IsSelected(_) |
             WebDriverCommand::GetElementAttribute(_, _) |
--- a/testing/webdriver/src/httpapi.rs
+++ b/testing/webdriver/src/httpapi.rs
@@ -15,17 +15,17 @@ fn standard_routes<U:WebDriverExtensionR
                 (Get, "/session/{sessionId}/url", Route::GetCurrentUrl),
                 (Post, "/session/{sessionId}/back", Route::GoBack),
                 (Post, "/session/{sessionId}/forward", Route::GoForward),
                 (Post, "/session/{sessionId}/refresh", Route::Refresh),
                 (Get, "/session/{sessionId}/title", Route::GetTitle),
                 (Get, "/session/{sessionId}/source", Route::GetPageSource),
                 (Get, "/session/{sessionId}/window", Route::GetWindowHandle),
                 (Get, "/session/{sessionId}/window/handles", Route::GetWindowHandles),
-                (Delete, "/session/{sessionId}/window", Route::Close),
+                (Delete, "/session/{sessionId}/window", Route::CloseWindow),
                 (Get, "/session/{sessionId}/window/size", Route::GetWindowSize),
                 (Post, "/session/{sessionId}/window/size", Route::SetWindowSize),
                 (Get, "/session/{sessionId}/window/position", Route::GetWindowPosition),
                 (Post, "/session/{sessionId}/window/position", Route::SetWindowPosition),
                 (Post, "/session/{sessionId}/window/maximize", Route::MaximizeWindow),
                 (Post, "/session/{sessionId}/window", Route::SwitchToWindow),
                 (Post, "/session/{sessionId}/frame", Route::SwitchToFrame),
                 (Post, "/session/{sessionId}/frame/parent", Route::SwitchToParentFrame),
@@ -64,17 +64,17 @@ fn standard_routes<U:WebDriverExtensionR
                 // TODO Remove this when > v0.5 is released. There for compatibility reasons with existing
                 //      Webdriver implementations.
                 (Get, "/session/{sessionId}/alert_text", Route::GetAlertText),
                 (Post, "/session/{sessionId}/alert_text", Route::SendAlertText),
                 (Post, "/session/{sessionId}/accept_alert", Route::AcceptAlert),
                 (Post, "/session/{sessionId}/dismiss_alert", Route::DismissAlert),
                 (Get, "/session/{sessionId}/window_handle", Route::GetWindowHandle),
                 (Get, "/session/{sessionId}/window_handles", Route::GetWindowHandles),
-                (Delete, "/session/{sessionId}/window_handle", Route::Close),
+                (Delete, "/session/{sessionId}/window_handle", Route::CloseWindow),
                 (Post, "/session/{sessionId}/execute_async", Route::ExecuteAsyncScript),
                 (Post, "/session/{sessionId}/execute", Route::ExecuteScript),
                 (Get, "/status", Route::Status),]
 }
 
 #[derive(Clone, Copy)]
 pub enum Route<U:WebDriverExtensionRoute> {
     NewSession,
@@ -83,17 +83,17 @@ pub enum Route<U:WebDriverExtensionRoute
     GetCurrentUrl,
     GoBack,
     GoForward,
     Refresh,
     GetTitle,
     GetPageSource,
     GetWindowHandle,
     GetWindowHandles,
-    Close,
+    CloseWindow,
     GetWindowSize,
     SetWindowSize,
     GetWindowPosition,
     SetWindowPosition,
     MaximizeWindow,
     SwitchToWindow,
     SwitchToFrame,
     SwitchToParentFrame,