Bug 1255051 - Remove skip_under_xvfb from firefox-ui-tests; r=maja_zf
authornagma <nagmakapoor@gmail.com>
Tue, 15 Mar 2016 20:49:37 -0400
changeset 289036 149e047e916c4b4e882287a80386313408d1c2f0
parent 289035 28ec277c75ac72f0a27a4440d0ce6dbba551d380
child 289037 fc205e345b6062f18a22b78aa192b107621ca4f5
push id30096
push usercbook@mozilla.com
push dateThu, 17 Mar 2016 10:00:34 +0000
treeherdermozilla-central@fefe2bc3e54f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1255051
milestone48.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 1255051 - Remove skip_under_xvfb from firefox-ui-tests; r=maja_zf MozReview-Commit-ID: 5orLGNjaHtw
testing/firefox-ui/harness/firefox_ui_harness/decorators.py
testing/firefox-ui/tests/functional/locationbar/test_access_locationbar.py
testing/firefox-ui/tests/functional/locationbar/test_escape_autocomplete.py
testing/firefox-ui/tests/functional/locationbar/test_favicon_in_autocomplete.py
testing/firefox-ui/tests/functional/locationbar/test_suggest_bookmarks.py
testing/firefox-ui/tests/functional/security/test_dv_certificate.py
testing/firefox-ui/tests/functional/security/test_ev_certificate.py
testing/firefox-ui/tests/functional/security/test_mixed_content_page.py
testing/firefox-ui/tests/functional/security/test_mixed_script_content_blocking.py
testing/firefox-ui/tests/functional/security/test_no_certificate.py
testing/firefox-ui/tests/functional/security/test_ssl_status_after_restart.py
testing/firefox-ui/tests/puppeteer/test_toolbars.py
deleted file mode 100644
--- a/testing/firefox-ui/harness/firefox_ui_harness/decorators.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# 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 SkipTest
-import os
-
-
-def skip_under_xvfb(target):
-    def wrapper(self, *args, **kwargs):
-        if os.environ.get('MOZ_XVFB'):
-            raise SkipTest("Skipping due to running under xvfb")
-        return target(self, *args, **kwargs)
-    return wrapper
--- a/testing/firefox-ui/tests/functional/locationbar/test_access_locationbar.py
+++ b/testing/firefox-ui/tests/functional/locationbar/test_access_locationbar.py
@@ -1,15 +1,14 @@
 # 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_driver import Wait
 
-from firefox_ui_harness.decorators import skip_under_xvfb
 from firefox_puppeteer.testcases import FirefoxTestCase
 
 
 class TestAccessLocationBar(FirefoxTestCase):
 
     def setUp(self):
         FirefoxTestCase.setUp(self)
 
@@ -23,17 +22,16 @@ class TestAccessLocationBar(FirefoxTestC
         ]
         self.test_urls = [self.marionette.absolute_url(t)
                           for t in self.test_urls]
 
         self.locationbar = self.browser.navbar.locationbar
         self.autocomplete_results = self.locationbar.autocomplete_results
         self.urlbar = self.locationbar.urlbar
 
-    @skip_under_xvfb
     def test_access_locationbar_history(self):
 
         # Open some local pages, then about:blank
         def load_urls():
             with self.marionette.using_context('content'):
                 for url in self.test_urls:
                     self.marionette.navigate(url)
         self.places.wait_for_visited(self.test_urls, load_urls)
--- a/testing/firefox-ui/tests/functional/locationbar/test_escape_autocomplete.py
+++ b/testing/firefox-ui/tests/functional/locationbar/test_escape_autocomplete.py
@@ -1,15 +1,14 @@
 # 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_driver import Wait
 
-from firefox_ui_harness.decorators import skip_under_xvfb
 from firefox_puppeteer.testcases import FirefoxTestCase
 
 
 class TestEscapeAutocomplete(FirefoxTestCase):
 
     def setUp(self):
         FirefoxTestCase.setUp(self)
 
@@ -27,17 +26,16 @@ class TestEscapeAutocomplete(FirefoxTest
 
         self.locationbar = self.browser.navbar.locationbar
         self.autocomplete_results = self.locationbar.autocomplete_results
 
     def tearDown(self):
         self.autocomplete_results.close(force=True)
         FirefoxTestCase.tearDown(self)
 
-    @skip_under_xvfb
     def test_escape_autocomplete(self):
         # Open some local pages
         def load_urls():
             with self.marionette.using_context('content'):
                 for url in self.test_urls:
                     self.marionette.navigate(url)
         self.places.wait_for_visited(self.test_urls, load_urls)
 
--- a/testing/firefox-ui/tests/functional/locationbar/test_favicon_in_autocomplete.py
+++ b/testing/firefox-ui/tests/functional/locationbar/test_favicon_in_autocomplete.py
@@ -1,15 +1,14 @@
 # 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_driver import Wait
 
-from firefox_ui_harness.decorators import skip_under_xvfb
 from firefox_puppeteer.testcases import FirefoxTestCase
 
 
 class TestFaviconInAutocomplete(FirefoxTestCase):
 
     PREF_SUGGEST_SEARCHES = 'browser.urlbar.suggest.searches'
     PREF_SUGGEST_BOOKMARK = 'browser.urlbar.suggest.bookmark'
 
@@ -30,17 +29,16 @@ class TestFaviconInAutocomplete(FirefoxT
         self.autocomplete_results = self.browser.navbar.locationbar.autocomplete_results
 
     def tearDown(self):
         try:
             self.autocomplete_results.close(force=True)
         finally:
             FirefoxTestCase.tearDown(self)
 
-    @skip_under_xvfb
     def test_favicon_in_autocomplete(self):
         # Open the test page
         def load_urls():
             with self.marionette.using_context('content'):
                 self.marionette.navigate(self.test_urls[0])
         self.places.wait_for_visited(self.test_urls, load_urls)
 
         locationbar = self.browser.navbar.locationbar
--- a/testing/firefox-ui/tests/functional/locationbar/test_suggest_bookmarks.py
+++ b/testing/firefox-ui/tests/functional/locationbar/test_suggest_bookmarks.py
@@ -1,15 +1,14 @@
 # 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_driver import By, Wait
 
-from firefox_ui_harness.decorators import skip_under_xvfb
 from firefox_puppeteer.testcases import FirefoxTestCase
 
 
 class TestStarInAutocomplete(FirefoxTestCase):
     """ This replaces
     http://hg.mozilla.org/qa/mozmill-tests/file/default/firefox/tests/functional/testAwesomeBar/testSuggestBookmarks.js
     Check a star appears in autocomplete list for a bookmarked page.
     """
@@ -38,17 +37,16 @@ class TestStarInAutocomplete(FirefoxTest
                   arguments[0].hidePopup();
                 """, script_args=[self.bookmark_panel])
 
             self.browser.navbar.locationbar.autocomplete_results.close()
             self.places.restore_default_bookmarks()
         finally:
             FirefoxTestCase.tearDown(self)
 
-    @skip_under_xvfb
     def test_star_in_autocomplete(self):
         search_string = 'grants'
 
         def visit_urls():
             with self.marionette.using_context('content'):
                 for url in self.test_urls:
                     self.marionette.navigate(url)
 
--- a/testing/firefox-ui/tests/functional/security/test_dv_certificate.py
+++ b/testing/firefox-ui/tests/functional/security/test_dv_certificate.py
@@ -1,15 +1,14 @@
 # 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_driver import Wait
 
-from firefox_ui_harness.decorators import skip_under_xvfb
 from firefox_puppeteer.testcases import FirefoxTestCase
 
 
 class TestDVCertificate(FirefoxTestCase):
 
     def setUp(self):
         FirefoxTestCase.setUp(self)
 
@@ -21,17 +20,16 @@ class TestDVCertificate(FirefoxTestCase)
     def tearDown(self):
         try:
             self.browser.switch_to()
             self.identity_popup.close(force=True)
             self.windows.close_all([self.browser])
         finally:
             FirefoxTestCase.tearDown(self)
 
-    @skip_under_xvfb
     def test_dv_cert(self):
         with self.marionette.using_context('content'):
             self.marionette.navigate(self.url)
 
         # The lock icon should be shown
         self.assertIn('identity-secure',
                       self.locationbar.connection_icon.value_of_css_property('list-style-image'))
 
--- a/testing/firefox-ui/tests/functional/security/test_ev_certificate.py
+++ b/testing/firefox-ui/tests/functional/security/test_ev_certificate.py
@@ -1,15 +1,14 @@
 # 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_driver import Wait
 
-from firefox_ui_harness.decorators import skip_under_xvfb
 from firefox_puppeteer.testcases import FirefoxTestCase
 
 
 class TestEVCertificate(FirefoxTestCase):
 
     def setUp(self):
         FirefoxTestCase.setUp(self)
 
@@ -21,17 +20,16 @@ class TestEVCertificate(FirefoxTestCase)
     def tearDown(self):
         try:
             self.browser.switch_to()
             self.identity_popup.close(force=True)
             self.windows.close_all([self.browser])
         finally:
             FirefoxTestCase.tearDown(self)
 
-    @skip_under_xvfb
     def test_ev_certificate(self):
         with self.marionette.using_context('content'):
             self.marionette.navigate(self.url)
 
         # The lock icon should be shown
         self.assertIn('identity-secure',
                       self.locationbar.connection_icon.value_of_css_property('list-style-image'))
 
--- a/testing/firefox-ui/tests/functional/security/test_mixed_content_page.py
+++ b/testing/firefox-ui/tests/functional/security/test_mixed_content_page.py
@@ -1,15 +1,14 @@
 # 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_driver import Wait
 
-from firefox_ui_harness.decorators import skip_under_xvfb
 from firefox_puppeteer.testcases import FirefoxTestCase
 
 
 class TestMixedContentPage(FirefoxTestCase):
     def setUp(self):
         FirefoxTestCase.setUp(self)
 
         self.locationbar = self.browser.navbar.locationbar
@@ -18,17 +17,16 @@ class TestMixedContentPage(FirefoxTestCa
         self.url = 'https://mozqa.com/data/firefox/security/mixedcontent.html'
 
     def tearDown(self):
         try:
             self.identity_popup.close(force=True)
         finally:
             FirefoxTestCase.tearDown(self)
 
-    @skip_under_xvfb
     def test_mixed_content(self):
         with self.marionette.using_context('content'):
             self.marionette.navigate(self.url)
 
         self.assertIn('identity-mixed-passive-loaded',
                       self.locationbar.connection_icon.value_of_css_property('list-style-image'))
 
         # Open the identity popup
--- a/testing/firefox-ui/tests/functional/security/test_mixed_script_content_blocking.py
+++ b/testing/firefox-ui/tests/functional/security/test_mixed_script_content_blocking.py
@@ -1,15 +1,14 @@
 # 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_driver import By, Wait
 
-from firefox_ui_harness.decorators import skip_under_xvfb
 from firefox_puppeteer.testcases import FirefoxTestCase
 
 
 class TestMixedScriptContentBlocking(FirefoxTestCase):
 
     def setUp(self):
         FirefoxTestCase.setUp(self)
 
@@ -61,17 +60,16 @@ class TestMixedScriptContentBlocking(Fir
                 )
 
     def expect_protection_enabled(self):
         self._expect_protection_status(True)
 
     def expect_protection_disabled(self):
         self._expect_protection_status(False)
 
-    @skip_under_xvfb
     def test_mixed_content_page(self):
         with self.marionette.using_context('content'):
             self.marionette.navigate(self.url)
 
         self.expect_protection_enabled()
 
         # Disable mixed content blocking via identity popup
         self.locationbar.open_identity_popup()
--- a/testing/firefox-ui/tests/functional/security/test_no_certificate.py
+++ b/testing/firefox-ui/tests/functional/security/test_no_certificate.py
@@ -1,17 +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/.
 
 from urlparse import urlparse
 
 from marionette_driver import expected, Wait
 
-from firefox_ui_harness.decorators import skip_under_xvfb
 from firefox_puppeteer.testcases import FirefoxTestCase
 
 
 class TestNoCertificate(FirefoxTestCase):
 
     def setUp(self):
         FirefoxTestCase.setUp(self)
 
@@ -23,17 +22,16 @@ class TestNoCertificate(FirefoxTestCase)
     def tearDown(self):
         try:
             self.browser.switch_to()
             self.identity_popup.close(force=True)
             self.windows.close_all([self.browser])
         finally:
             FirefoxTestCase.tearDown(self)
 
-    @skip_under_xvfb
     def test_no_certificate(self):
         with self.marionette.using_context('content'):
             self.marionette.navigate(self.url)
 
         # Check the favicon
         # TODO: find a better way to check, e.g., mozmill's isDisplayed
         favicon_hidden = self.marionette.execute_script("""
           return arguments[0].hasAttribute("hidden");
--- a/testing/firefox-ui/tests/functional/security/test_ssl_status_after_restart.py
+++ b/testing/firefox-ui/tests/functional/security/test_ssl_status_after_restart.py
@@ -1,16 +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/.
 
 from marionette_driver import Wait
 from marionette.marionette_test import skip_if_e10s
 
-from firefox_ui_harness.decorators import skip_under_xvfb
 from firefox_puppeteer.testcases import FirefoxTestCase
 
 
 class TestSSLStatusAfterRestart(FirefoxTestCase):
 
     def setUp(self):
         FirefoxTestCase.setUp(self)
 
@@ -43,17 +42,16 @@ class TestSSLStatusAfterRestart(FirefoxT
             self.windows.close_all([self.browser])
             self.browser.tabbar.close_all_tabs([self.browser.tabbar.tabs[0]])
             self.browser.switch_to()
             self.identity_popup.close(force=True)
         finally:
             FirefoxTestCase.tearDown(self)
 
     @skip_if_e10s
-    @skip_under_xvfb
     def test_ssl_status_after_restart(self):
         for item in self.test_data:
             with self.marionette.using_context('content'):
                 self.marionette.navigate(item['url'])
             self.verify_certificate_status(item)
             self.browser.tabbar.open_tab()
 
         self.restart()
--- a/testing/firefox-ui/tests/puppeteer/test_toolbars.py
+++ b/testing/firefox-ui/tests/puppeteer/test_toolbars.py
@@ -1,16 +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/.
 
 from marionette_driver import expected, By, Wait
 from marionette_driver.errors import NoSuchElementException
 
-from firefox_ui_harness.decorators import skip_under_xvfb
 from firefox_puppeteer.testcases import FirefoxTestCase
 
 
 class TestNavBar(FirefoxTestCase):
 
     def setUp(self):
         FirefoxTestCase.setUp(self)
 
@@ -147,46 +146,42 @@ class TestAutoCompleteResults(FirefoxTes
             self.autocomplete_results.close(force=True)
         except NoSuchElementException:
             # TODO: A NoSuchElementException is thrown here when tests accessing the
             # autocomplete_results element are skipped.
             pass
         finally:
             FirefoxTestCase.tearDown(self)
 
-    @skip_under_xvfb
     def test_popup_elements(self):
         # TODO: This test is not very robust because it relies on the history
         # in the default profile.
         self.assertFalse(self.autocomplete_results.is_open)
         self.browser.navbar.locationbar.urlbar.send_keys('a')
         results = self.autocomplete_results.results
         Wait(self.marionette).until(lambda _: self.autocomplete_results.is_complete)
         visible_result_count = len(self.autocomplete_results.visible_results)
         self.assertTrue(visible_result_count > 0)
         self.assertEqual(visible_result_count,
                          int(results.get_attribute('itemCount')))
 
-    @skip_under_xvfb
     def test_close(self):
         self.browser.navbar.locationbar.urlbar.send_keys('a')
         Wait(self.marionette).until(lambda _: self.autocomplete_results.is_open)
         # The Wait in the library implementation will fail this if this doesn't
         # end up closing.
         self.autocomplete_results.close()
 
-    @skip_under_xvfb
     def test_force_close(self):
         self.browser.navbar.locationbar.urlbar.send_keys('a')
         Wait(self.marionette).until(lambda _: self.autocomplete_results.is_open)
         # The Wait in the library implementation will fail this if this doesn't
         # end up closing.
         self.autocomplete_results.close(force=True)
 
-    @skip_under_xvfb
     def test_matching_text(self):
         # The default profile always has links to mozilla.org. So multiple results
         # will be found with 'moz'.
         input_text = 'moz'
 
         self.browser.navbar.locationbar.urlbar.send_keys(input_text)
         Wait(self.marionette).until(lambda _: self.autocomplete_results.is_complete)
         visible_results = self.autocomplete_results.visible_results
@@ -217,17 +212,16 @@ class TestIdentityPopup(FirefoxTestCase)
             self.marionette.navigate(self.url)
 
     def tearDown(self):
         try:
             self.identity_popup.close(force=True)
         finally:
             FirefoxTestCase.tearDown(self)
 
-    @skip_under_xvfb
     def test_elements(self):
         self.locationbar.open_identity_popup()
 
         self.assertEqual(self.identity_popup.host.get_attribute('localName'), 'broadcaster')
 
         # Test main view elements
         main = self.identity_popup.view.main
         self.assertEqual(main.element.get_attribute('localName'), 'panelview')
@@ -257,29 +251,27 @@ class TestIdentityPopup(FirefoxTestCase)
 
         self.assertEqual(security.disable_mixed_content_blocking_button.get_attribute('localName'),
                          'button')
         self.assertEqual(security.enable_mixed_content_blocking_button.get_attribute('localName'),
                          'button')
 
         self.assertEqual(security.more_info_button.get_attribute('localName'), 'button')
 
-    @skip_under_xvfb
     def test_open_close(self):
         with self.marionette.using_context('content'):
             self.marionette.navigate(self.url)
 
         self.assertFalse(self.identity_popup.is_open)
 
         self.locationbar.open_identity_popup()
 
         self.identity_popup.close()
         self.assertFalse(self.identity_popup.is_open)
 
-    @skip_under_xvfb
     def test_force_close(self):
         with self.marionette.using_context('content'):
             self.marionette.navigate(self.url)
 
         self.assertFalse(self.identity_popup.is_open)
 
         self.locationbar.open_identity_popup()