Bug 1142212 - import skip_if_b2g from marionette instead of marionette.marionette_test; r?maja_zf draft
authorDecky Coss <coss@cosstropolis.com>
Fri, 11 Mar 2016 15:35:44 -0700
changeset 339647 2810223714387bbfc847c342680fe3653d11eadc
parent 339537 946ed22cad04431c75ab5093989dfedf1bae5a3e
child 516033 0f67dd4a8638ca3802cdaf49b9c8dff974babe23
push id12781
push userbmo:coss@cosstropolis.com
push dateFri, 11 Mar 2016 22:40:36 +0000
reviewersmaja_zf
bugs1142212
milestone48.0a1
Bug 1142212 - import skip_if_b2g from marionette instead of marionette.marionette_test; r?maja_zf MozReview-Commit-ID: D2mW2A8cViA
testing/marionette/harness/marionette/__init__.py
testing/marionette/harness/marionette/tests/unit/test_elementsize.py
testing/marionette/harness/marionette/tests/unit/test_execute_script.py
testing/marionette/harness/marionette/tests/unit/test_key_actions.py
testing/marionette/harness/marionette/tests/unit/test_navigation.py
testing/marionette/harness/marionette/tests/unit/test_pagesource.py
testing/marionette/harness/marionette/tests/unit/test_typing.py
testing/marionette/harness/marionette/tests/unit/test_window_title.py
--- a/testing/marionette/harness/marionette/__init__.py
+++ b/testing/marionette/harness/marionette/__init__.py
@@ -5,16 +5,17 @@
 __version__ = '2.2.0'
 
 from .marionette_test import (
     CommonTestCase,
     expectedFailure,
     MarionetteJSTestCase,
     MarionetteTestCase,
     skip,
+    skip_if_b2g,
     SkipTest,
     skip_unless_protocol,
 )
 from .runner import (
     B2GTestCaseMixin,
     B2GTestResultMixin,
     BaseMarionetteArguments,
     BaseMarionetteTestRunner,
--- a/testing/marionette/harness/marionette/tests/unit/test_elementsize.py
+++ b/testing/marionette/harness/marionette/tests/unit/test_elementsize.py
@@ -1,13 +1,13 @@
 # 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.marionette_test import MarionetteTestCase, skip_if_b2g
+from marionette 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
--- a/testing/marionette/harness/marionette/tests/unit/test_execute_script.py
+++ b/testing/marionette/harness/marionette/tests/unit/test_execute_script.py
@@ -1,17 +1,17 @@
 # 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
 import os
 
 from marionette_driver import By, errors
-from marionette.marionette_test import MarionetteTestCase, skip_if_b2g
+from marionette 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>")
 
--- a/testing/marionette/harness/marionette/tests/unit/test_key_actions.py
+++ b/testing/marionette/harness/marionette/tests/unit/test_key_actions.py
@@ -1,13 +1,13 @@
 # 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.marionette_test import MarionetteTestCase, skip_if_b2g
+from marionette import MarionetteTestCase, skip_if_b2g
 from marionette_driver.keys import Keys
 from marionette_driver.marionette import Actions
 
 class TestKeyActions(MarionetteTestCase):
 
     def setUp(self):
         MarionetteTestCase.setUp(self)
         if self.marionette.session_capabilities['platformName'] == 'Darwin':
--- a/testing/marionette/harness/marionette/tests/unit/test_navigation.py
+++ b/testing/marionette/harness/marionette/tests/unit/test_navigation.py
@@ -1,13 +1,13 @@
 # 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.marionette_test import MarionetteTestCase, skip_if_b2g
+from marionette import MarionetteTestCase, skip_if_b2g
 from marionette_driver.errors import MarionetteException, TimeoutException
 
 class TestNavigate(MarionetteTestCase):
     def setUp(self):
         MarionetteTestCase.setUp(self)
         self.marionette.execute_script("window.location.href = 'about:blank'")
         self.assertEqual("about:blank", self.location_href)
         self.test_doc = self.marionette.absolute_url("test.html")
--- a/testing/marionette/harness/marionette/tests/unit/test_pagesource.py
+++ b/testing/marionette/harness/marionette/tests/unit/test_pagesource.py
@@ -1,13 +1,13 @@
 # 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.marionette_test import MarionetteTestCase, skip_if_b2g
+from marionette import MarionetteTestCase, skip_if_b2g
 
 class TestPageSource(MarionetteTestCase):
     def testShouldReturnTheSourceOfAPage(self):
         test_html = self.marionette.absolute_url("testPageSource.html")
         self.marionette.navigate(test_html)
         source = self.marionette.page_source
         self.assertTrue("<html" in source)
         self.assertTrue("PageSource" in source)
--- a/testing/marionette/harness/marionette/tests/unit/test_typing.py
+++ b/testing/marionette/harness/marionette/tests/unit/test_typing.py
@@ -1,15 +1,15 @@
 # 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.marionette_test import MarionetteTestCase, skip_if_b2g
+from marionette import MarionetteTestCase, skip_if_b2g
 from marionette_driver.keys import Keys
 from marionette_driver.errors import ElementNotVisibleException
 
 
 def inline(doc):
     return "data:text/html;charset=utf-8,%s" % urllib.quote(doc)
 
 
--- a/testing/marionette/harness/marionette/tests/unit/test_window_title.py
+++ b/testing/marionette/harness/marionette/tests/unit/test_window_title.py
@@ -1,13 +1,13 @@
 # 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.marionette_test import MarionetteTestCase, skip_if_b2g
+from marionette import MarionetteTestCase, skip_if_b2g
 
 @skip_if_b2g
 class TestTitleChrome(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/test.xul', 'foo', 'chrome,centerscreen');")