author | Chris Manchester <cmanchester@mozilla.com> |
Thu, 08 Jan 2015 19:13:30 -0500 | |
changeset 222744 | 5da7240111cc742b5af6ac22d8eddfda754e24e5 |
parent 222743 | f1b76a42c9105853ee54c8f99b88c08affda6708 |
child 222745 | 536e7f7a6d276ae7c8e0e934202d70308fce3d39 |
push id | 53718 |
push user | cmanchester@mozilla.com |
push date | Fri, 09 Jan 2015 00:13:37 +0000 |
treeherder | mozilla-inbound@5da7240111cc [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | automatedtester |
bugs | 1114793 |
milestone | 37.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
|
--- a/testing/marionette/client/marionette/marionette.py +++ b/testing/marionette/client/marionette/marionette.py @@ -891,30 +891,30 @@ class Marionette(object): :returns: unique window handle :rtype: string """ self.window = self._send_message("getWindowHandle", "value") return self.window @property - def chrome_window_handle(self): + def current_chrome_window_handle(self): """Get the current chrome window's handle. Corresponds to a chrome window that may itself contain tabs identified by window_handles. Returns an opaque server-assigned identifier to this window that uniquely identifies it within this Marionette instance. This can be used to switch to this window at a later point. :returns: unique window handle :rtype: string """ - self.chrome_window = self._send_message("getChromeWindowHandle", "value") + self.chrome_window = self._send_message("getCurrentChromeWindowHandle", "value") return self.chrome_window def get_window_position(self): """Get the current window's position Return a dictionary with the keys x and y :returns: a dictionary with x and y """
--- a/testing/marionette/client/marionette/tests/unit/test_window_handles.py +++ b/testing/marionette/client/marionette/tests/unit/test_window_handles.py @@ -88,67 +88,67 @@ class TestWindowHandles(MarionetteTestCa self.marionette.close_chrome_window() self.assertEqual(len(self.marionette.chrome_window_handles), 1) self.assertEqual(len(self.marionette.window_handles), 1) self.marionette.switch_to_window(start_tab) def test_tab_and_window_handles(self): start_tab = self.marionette.current_window_handle - start_chrome_window = self.marionette.chrome_window_handle + start_chrome_window = self.marionette.current_chrome_window_handle tab_open_page = self.marionette.absolute_url("windowHandles.html") window_open_page = self.marionette.absolute_url("test_windows.html") # Open a new tab and switch to it. self.marionette.navigate(tab_open_page) link = self.marionette.find_element("id", "new-tab") link.click() self.wait_for_condition(lambda mn: len(mn.window_handles) == 2) self.assertEqual(len(self.marionette.chrome_window_handles), 1) - self.assertEqual(self.marionette.chrome_window_handle, start_chrome_window) + self.assertEqual(self.marionette.current_chrome_window_handle, start_chrome_window) handles = self.marionette.window_handles handles.remove(start_tab) new_tab = handles.pop() self.marionette.switch_to_window(new_tab) self.assertEqual(self.marionette.get_url(), "about:blank") # Open a new window from the new tab. self.marionette.navigate(window_open_page) link = self.marionette.find_element("link text", "Open new window") link.click() self.wait_for_condition(lambda mn: len(mn.window_handles) == 3) self.assertEqual(len(self.marionette.chrome_window_handles), 2) - self.assertEqual(self.marionette.chrome_window_handle, start_chrome_window) + self.assertEqual(self.marionette.current_chrome_window_handle, start_chrome_window) # Find the new window and switch to it. handles = self.marionette.window_handles handles.remove(start_tab) handles.remove(new_tab) new_window = handles.pop() self.marionette.switch_to_window(new_window) results_page = self.marionette.absolute_url("resultPage.html") self.assertEqual(self.marionette.get_url(), results_page) self.assertEqual(len(self.marionette.chrome_window_handles), 2) - self.assertNotEqual(self.marionette.chrome_window_handle, start_chrome_window) + self.assertNotEqual(self.marionette.current_chrome_window_handle, start_chrome_window) # Return to our original tab and close it. self.marionette.switch_to_window(start_tab) self.marionette.close() self.assertEquals(len(self.marionette.window_handles), 2) # Close the opened window and carry on in our new tab. self.marionette.switch_to_window(new_window) self.marionette.close() self.assertEqual(len(self.marionette.window_handles), 1) self.marionette.switch_to_window(new_tab) self.assertEqual(self.marionette.get_url(), results_page) self.marionette.navigate("about:blank") self.assertEqual(len(self.marionette.chrome_window_handles), 1) - self.assertEqual(self.marionette.chrome_window_handle, start_chrome_window) + self.assertEqual(self.marionette.current_chrome_window_handle, start_chrome_window)
--- a/testing/marionette/marionette-server.js +++ b/testing/marionette/marionette-server.js @@ -3053,16 +3053,17 @@ MarionetteServerConnection.prototype.req "getCurrentUrl": MarionetteServerConnection.prototype.getCurrentUrl, "getUrl": MarionetteServerConnection.prototype.getCurrentUrl, // deprecated "goBack": MarionetteServerConnection.prototype.goBack, "goForward": MarionetteServerConnection.prototype.goForward, "refresh": MarionetteServerConnection.prototype.refresh, "getWindowHandle": MarionetteServerConnection.prototype.getWindowHandle, "getCurrentWindowHandle": MarionetteServerConnection.prototype.getWindowHandle, // Selenium 2 compat "getChromeWindowHandle": MarionetteServerConnection.prototype.getChromeWindowHandle, + "getCurrentChromeWindowHandle": MarionetteServerConnection.prototype.getChromeWindowHandle, "getWindow": MarionetteServerConnection.prototype.getWindowHandle, // deprecated "getWindowHandles": MarionetteServerConnection.prototype.getWindowHandles, "getChromeWindowHandles": MarionetteServerConnection.prototype.getChromeWindowHandles, "getCurrentWindowHandles": MarionetteServerConnection.prototype.getWindowHandles, // Selenium 2 compat "getWindows": MarionetteServerConnection.prototype.getWindowHandles, // deprecated "getWindowPosition": MarionetteServerConnection.prototype.getWindowPosition, "setWindowPosition": MarionetteServerConnection.prototype.setWindowPosition, "getActiveFrame": MarionetteServerConnection.prototype.getActiveFrame,