Bug 1141519: added test that puts marionette into a position that can cause hangs when in content scope; r=jgriffin
authorDavid Burns <dburns@mozilla.com>
Fri, 18 Sep 2015 21:39:01 +0100
changeset 263596 b2c829ea4540ee6d6b7474325f1fb487995ef3fb
parent 263595 98b43c681c1d77c3aaee352b721349895f550db5
child 263597 6d92fc2898e9b9232d1642526a4f7eb25718fbae
push id65361
push userdburns@mozilla.com
push dateMon, 21 Sep 2015 20:10:41 +0000
treeherdermozilla-inbound@88386ed1886c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin
bugs1141519
milestone44.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
Bug 1141519: added test that puts marionette into a position that can cause hangs when in content scope; r=jgriffin
testing/marionette/client/marionette/tests/unit/test_chrome.py
testing/marionette/client/marionette/tests/unit/unit-tests.ini
new file mode 100644
--- /dev/null
+++ b/testing/marionette/client/marionette/tests/unit/test_chrome.py
@@ -0,0 +1,35 @@
+#Copyright 2007-2009 WebDriver committers
+#Copyright 2007-2009 Google Inc.
+#
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+from marionette_driver import By
+from marionette_driver.errors import NoSuchElementException
+from marionette import MarionetteTestCase
+
+
+class ChromeTests(MarionetteTestCase):
+
+    def test_hang_until_timeout(self):
+        with self.marionette.using_context('chrome'):
+            start_handle = self.marionette.current_chrome_window_handle
+            menu = self.marionette.find_element(By.ID, 'aboutName')
+            menu.click()
+            handles = self.marionette.chrome_window_handles
+            handles.remove(start_handle)
+            self.marionette.switch_to_window(handles[0])
+            self.assertRaises(NoSuchElementException, self.marionette.find_element, By.ID, 'dek')
+
+            # Clean up the window
+            self.marionette.close()
+            self.marionette.switch_to_window(start_handle)
--- a/testing/marionette/client/marionette/tests/unit/unit-tests.ini
+++ b/testing/marionette/client/marionette/tests/unit/unit-tests.ini
@@ -154,8 +154,11 @@ b2g = false
 [test_file_upload.py]
 b2g = false
 skip-if = os == "win" # http://bugs.python.org/issue14574
 
 [test_execute_sandboxes.py]
 [test_using_permissions.py]
 
 [test_shadow_dom.py]
+
+[test_chrome.py]
+b2g = false