Bug 1107706: Part 9: Disable XUL component tests on B2G
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 12 Mar 2015 18:12:05 +0000
changeset 264852 6af978a7ee3238b1794fe15969ab7f97287dfb81
parent 264851 4ef84ad178b563d452e5561b91e119705d987163
child 264853 6dcbd23298dedea9e616b274f220c1b4430e5ef2
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1107706
milestone39.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 1107706: Part 9: Disable XUL component tests on B2G
testing/marionette/client/marionette/tests/unit/test_elementsize.py
testing/marionette/client/marionette/tests/unit/test_execute_script.py
--- a/testing/marionette/client/marionette/tests/unit/test_elementsize.py
+++ b/testing/marionette/client/marionette/tests/unit/test_elementsize.py
@@ -1,29 +1,33 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-from marionette import MarionetteTestCase
+from marionette.marionette_test import MarionetteTestCase, skip_if_b2g
+
 
 class TestElementSize(MarionetteTestCase):
     def testShouldReturnTheSizeOfALink(self):
         test_html = self.marionette.absolute_url("testSize.html")
         self.marionette.navigate(test_html)
         shrinko = self.marionette.find_element('id', 'linkId')
         size = shrinko.rect
         self.assertTrue(size['width'] > 0)
         self.assertTrue(size['height'] > 0)
 
+
+@skip_if_b2g
 class TestElementSizeChrome(MarionetteTestCase):
     def setUp(self):
         MarionetteTestCase.setUp(self)
         self.marionette.set_context("chrome")
         self.win = self.marionette.current_window_handle
-        self.marionette.execute_script("window.open('chrome://marionette/content/test2.xul', 'foo', 'chrome,centerscreen');")
+        self.marionette.execute_script(
+            "window.open('chrome://marionette/content/test2.xul', 'foo', 'chrome,centerscreen');")
         self.marionette.switch_to_window('foo')
         self.assertNotEqual(self.win, self.marionette.current_window_handle)
 
     def tearDown(self):
         self.assertNotEqual(self.win, self.marionette.current_window_handle)
         self.marionette.execute_script("window.close();")
         self.marionette.switch_to_window(self.win)
         MarionetteTestCase.tearDown(self)
@@ -32,9 +36,8 @@ class TestElementSizeChrome(MarionetteTe
         wins = self.marionette.window_handles
         wins.remove(self.win)
         newWin = wins.pop()
         self.marionette.switch_to_window(newWin)
         shrinko = self.marionette.find_element('id', 'textInput')
         size = shrinko.rect
         self.assertTrue(size['width'] > 0)
         self.assertTrue(size['height'] > 0)
-
--- a/testing/marionette/client/marionette/tests/unit/test_execute_script.py
+++ b/testing/marionette/client/marionette/tests/unit/test_execute_script.py
@@ -1,16 +1,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import urllib
 
 from marionette_driver import By, errors
-from marionette import MarionetteTestCase
+from marionette.marionette_test import MarionetteTestCase, skip_if_b2g
 
 
 def inline(doc):
     return "data:text/html;charset=utf-8,%s" % urllib.quote(doc)
 
 
 elements = inline("<p>foo</p> <p>bar</p>")
 
@@ -94,16 +94,17 @@ let prefs = Components.classes["@mozilla
         self.assertEqual(result, expected_result)
 
     def test_null_argument(self):
         result = self.marionette.execute_script("return arguments[0]",
                                                 [None])
         self.assertIs(result, None)
 
 
+@skip_if_b2g
 class TestExecuteChrome(TestExecuteContent):
     def setUp(self):
         super(TestExecuteChrome, self).setUp()
         self.win = self.marionette.current_window_handle
         self.marionette.set_context("chrome")
         self.marionette.execute_script(
             "window.open('chrome://marionette/content/test.xul', 'xul', 'chrome')")
         self.marionette.switch_to_window("xul")