From 5a07feee6f426db3bac74887ee721128a978b49c Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Fri, 11 Nov 2016 14:37:01 +0100 Subject: [PATCH] Bug 1316851 - Testcases should directly inherit from MarionetteTestCase and PuppeteerMixin. r=maja_zf MozReview-Commit-ID: 2wu70A51NQw --HG-- extra : rebase_source : cdb7ac8cc4165aeec9f36668d2c4003c7465772b --- .../firefox_ui_harness/runners/base.py | 5 ++--- .../harness/firefox_ui_harness/testcases.py | 22 ++++--------------- .../keyboard_shortcuts/test_browser_window.py | 6 ++--- .../locationbar/test_access_locationbar.py | 6 ++--- .../locationbar/test_escape_autocomplete.py | 6 ++--- .../test_favicon_in_autocomplete.py | 6 ++--- .../locationbar/test_suggest_bookmarks.py | 6 ++--- .../test_about_private_browsing.py | 9 ++++---- .../security/test_dv_certificate.py | 6 ++--- .../security/test_enable_privilege.py | 5 ++--- .../security/test_ev_certificate.py | 6 ++--- .../security/test_mixed_content_page.py | 5 +++-- .../test_mixed_script_content_blocking.py | 6 ++--- .../security/test_no_certificate.py | 6 ++--- .../test_safe_browsing_initial_download.py | 5 +++-- .../test_safe_browsing_notification.py | 6 ++--- .../test_safe_browsing_warning_pages.py | 6 ++--- .../security/test_security_notification.py | 6 ++--- .../security/test_ssl_disabled_error_page.py | 6 ++--- .../security/test_ssl_status_after_restart.py | 8 +++---- .../test_submit_unencrypted_info_warning.py | 7 +++--- .../security/test_unknown_issuer.py | 5 ++--- .../test_untrusted_connection_error_page.py | 6 ++--- .../test_restore_windows_after_restart.py | 5 +++-- .../tests/puppeteer/test_about_window.py | 5 +++-- .../tests/puppeteer/test_appinfo.py | 6 +++-- .../firefox-ui/tests/puppeteer/test_l10n.py | 8 +++---- .../tests/puppeteer/test_menubar.py | 6 ++--- .../tests/puppeteer/test_notifications.py | 14 ++++++------ .../tests/puppeteer/test_page_info_window.py | 5 +++-- .../firefox-ui/tests/puppeteer/test_places.py | 6 ++--- .../firefox-ui/tests/puppeteer/test_prefs.py | 5 +++-- .../tests/puppeteer/test_security.py | 6 ++--- .../tests/puppeteer/test_software_update.py | 10 ++++----- .../firefox-ui/tests/puppeteer/test_tabbar.py | 8 +++---- .../tests/puppeteer/test_toolbars.py | 12 +++++----- .../tests/puppeteer/test_update_wizard.py | 5 +++-- .../firefox-ui/tests/puppeteer/test_utils.py | 5 +++-- .../tests/puppeteer/test_windows.py | 12 +++++----- 39 files changed, 132 insertions(+), 141 deletions(-) diff --git a/testing/firefox-ui/harness/firefox_ui_harness/runners/base.py b/testing/firefox-ui/harness/firefox_ui_harness/runners/base.py index 2b97774d0fea..0076235ae303 100644 --- a/testing/firefox-ui/harness/firefox_ui_harness/runners/base.py +++ b/testing/firefox-ui/harness/firefox_ui_harness/runners/base.py @@ -8,9 +8,8 @@ import tempfile import mozfile import mozinfo -from marionette import BaseMarionetteTestRunner -from firefox_ui_harness.testcases import FirefoxTestCase +from marionette import BaseMarionetteTestRunner, MarionetteTestCase class FirefoxUITestRunner(BaseMarionetteTestRunner): @@ -21,7 +20,7 @@ class FirefoxUITestRunner(BaseMarionetteTestRunner): # select the appropriate GeckoInstance self.app = 'fxdesktop' - self.test_handlers = [FirefoxTestCase] + self.test_handlers = [MarionetteTestCase] def duplicate_application(self, application_folder): """Creates a copy of the specified binary.""" diff --git a/testing/firefox-ui/harness/firefox_ui_harness/testcases.py b/testing/firefox-ui/harness/firefox_ui_harness/testcases.py index a9a21b7b9335..487bc8d930c3 100644 --- a/testing/firefox-ui/harness/firefox_ui_harness/testcases.py +++ b/testing/firefox-ui/harness/firefox_ui_harness/testcases.py @@ -8,31 +8,17 @@ from datetime import datetime import mozfile -from marionette import MarionetteTestCase -from marionette_driver import Wait -from marionette_driver.errors import NoSuchWindowException - from firefox_puppeteer import PuppeteerMixin from firefox_puppeteer.api.prefs import Preferences from firefox_puppeteer.api.software_update import SoftwareUpdate from firefox_puppeteer.ui.update_wizard import UpdateWizardDialog - -class FirefoxTestCase(PuppeteerMixin, MarionetteTestCase): - """Base TestCase class for Firefox Desktop tests. - - This class enhances the MarionetteTestCase class with PuppeteerMixin on top - of MarionetteTestCase by reordering the MRO. - - If you're extending the inheritance tree further to make specialized - TestCases, favour the use of super() as opposed to explicit calls to a - parent class. - - """ - pass +from marionette import MarionetteTestCase +from marionette_driver import Wait +from marionette_driver.errors import NoSuchWindowException -class UpdateTestCase(FirefoxTestCase): +class UpdateTestCase(PuppeteerMixin, MarionetteTestCase): TIMEOUT_UPDATE_APPLY = 300 TIMEOUT_UPDATE_CHECK = 30 diff --git a/testing/firefox-ui/tests/functional/keyboard_shortcuts/test_browser_window.py b/testing/firefox-ui/tests/functional/keyboard_shortcuts/test_browser_window.py index 1ec343373b45..3613ec202d93 100644 --- a/testing/firefox-ui/tests/functional/keyboard_shortcuts/test_browser_window.py +++ b/testing/firefox-ui/tests/functional/keyboard_shortcuts/test_browser_window.py @@ -2,12 +2,12 @@ # 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 firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import Wait -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestBrowserWindowShortcuts(FirefoxTestCase): +class TestBrowserWindowShortcuts(PuppeteerMixin, MarionetteTestCase): def test_addons_manager(self): # If an about:xyz page is visible, no new tab will be opened diff --git a/testing/firefox-ui/tests/functional/locationbar/test_access_locationbar.py b/testing/firefox-ui/tests/functional/locationbar/test_access_locationbar.py index 0988b0ff392c..6a5b359bb8f5 100644 --- a/testing/firefox-ui/tests/functional/locationbar/test_access_locationbar.py +++ b/testing/firefox-ui/tests/functional/locationbar/test_access_locationbar.py @@ -2,12 +2,12 @@ # 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 firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import Wait -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestAccessLocationBar(FirefoxTestCase): +class TestAccessLocationBar(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestAccessLocationBar, self).setUp() diff --git a/testing/firefox-ui/tests/functional/locationbar/test_escape_autocomplete.py b/testing/firefox-ui/tests/functional/locationbar/test_escape_autocomplete.py index 053535bd33d6..5fb1fc1f3038 100644 --- a/testing/firefox-ui/tests/functional/locationbar/test_escape_autocomplete.py +++ b/testing/firefox-ui/tests/functional/locationbar/test_escape_autocomplete.py @@ -2,12 +2,12 @@ # 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 firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import Wait -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestEscapeAutocomplete(FirefoxTestCase): +class TestEscapeAutocomplete(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestEscapeAutocomplete, self).setUp() diff --git a/testing/firefox-ui/tests/functional/locationbar/test_favicon_in_autocomplete.py b/testing/firefox-ui/tests/functional/locationbar/test_favicon_in_autocomplete.py index 2de80f7ca2fb..367c9df9ec54 100644 --- a/testing/firefox-ui/tests/functional/locationbar/test_favicon_in_autocomplete.py +++ b/testing/firefox-ui/tests/functional/locationbar/test_favicon_in_autocomplete.py @@ -2,12 +2,12 @@ # 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 firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import Wait -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestFaviconInAutocomplete(FirefoxTestCase): +class TestFaviconInAutocomplete(PuppeteerMixin, MarionetteTestCase): PREF_SUGGEST_SEARCHES = 'browser.urlbar.suggest.searches' PREF_SUGGEST_BOOKMARK = 'browser.urlbar.suggest.bookmark' diff --git a/testing/firefox-ui/tests/functional/locationbar/test_suggest_bookmarks.py b/testing/firefox-ui/tests/functional/locationbar/test_suggest_bookmarks.py index 36c6629db0df..7edb6821146c 100644 --- a/testing/firefox-ui/tests/functional/locationbar/test_suggest_bookmarks.py +++ b/testing/firefox-ui/tests/functional/locationbar/test_suggest_bookmarks.py @@ -2,12 +2,12 @@ # 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 firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import By, Wait -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestStarInAutocomplete(FirefoxTestCase): +class TestStarInAutocomplete(PuppeteerMixin, MarionetteTestCase): """ 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. diff --git a/testing/firefox-ui/tests/functional/private_browsing/test_about_private_browsing.py b/testing/firefox-ui/tests/functional/private_browsing/test_about_private_browsing.py index 09721c5b4f81..9117d5ee6527 100644 --- a/testing/firefox-ui/tests/functional/private_browsing/test_about_private_browsing.py +++ b/testing/firefox-ui/tests/functional/private_browsing/test_about_private_browsing.py @@ -2,14 +2,13 @@ # 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 firefox_puppeteer import PuppeteerMixin +from firefox_puppeteer.ui.browser.window import BrowserWindow +from marionette import MarionetteTestCase from marionette_driver import By, Wait -from firefox_ui_harness.testcases import FirefoxTestCase -from firefox_puppeteer.ui.browser.window import BrowserWindow - - -class TestAboutPrivateBrowsing(FirefoxTestCase): +class TestAboutPrivateBrowsing(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestAboutPrivateBrowsing, self).setUp() diff --git a/testing/firefox-ui/tests/functional/security/test_dv_certificate.py b/testing/firefox-ui/tests/functional/security/test_dv_certificate.py index 71668a5fde16..4efa9f84d222 100644 --- a/testing/firefox-ui/tests/functional/security/test_dv_certificate.py +++ b/testing/firefox-ui/tests/functional/security/test_dv_certificate.py @@ -2,12 +2,12 @@ # 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 firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import Wait -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestDVCertificate(FirefoxTestCase): +class TestDVCertificate(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestDVCertificate, self).setUp() diff --git a/testing/firefox-ui/tests/functional/security/test_enable_privilege.py b/testing/firefox-ui/tests/functional/security/test_enable_privilege.py index b812e859bc8d..c350fec42f59 100644 --- a/testing/firefox-ui/tests/functional/security/test_enable_privilege.py +++ b/testing/firefox-ui/tests/functional/security/test_enable_privilege.py @@ -2,12 +2,11 @@ # 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_driver import By -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestEnablePrivilege(FirefoxTestCase): +class TestEnablePrivilege(MarionetteTestCase): def test_enable_privilege(self): with self.marionette.using_context('content'): diff --git a/testing/firefox-ui/tests/functional/security/test_ev_certificate.py b/testing/firefox-ui/tests/functional/security/test_ev_certificate.py index adcabd6b49c3..b707c29f3d8b 100644 --- a/testing/firefox-ui/tests/functional/security/test_ev_certificate.py +++ b/testing/firefox-ui/tests/functional/security/test_ev_certificate.py @@ -2,12 +2,12 @@ # 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 firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import Wait -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestEVCertificate(FirefoxTestCase): +class TestEVCertificate(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestEVCertificate, self).setUp() diff --git a/testing/firefox-ui/tests/functional/security/test_mixed_content_page.py b/testing/firefox-ui/tests/functional/security/test_mixed_content_page.py index b948ee55ce5e..479ce642c185 100644 --- a/testing/firefox-ui/tests/functional/security/test_mixed_content_page.py +++ b/testing/firefox-ui/tests/functional/security/test_mixed_content_page.py @@ -2,10 +2,11 @@ # 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 firefox_ui_harness.testcases import FirefoxTestCase +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase -class TestMixedContentPage(FirefoxTestCase): +class TestMixedContentPage(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestMixedContentPage, self).setUp() diff --git 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 index 827a107fc658..4a5494b4c739 100644 --- 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 @@ -2,12 +2,12 @@ # 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 firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import By, Wait -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestMixedScriptContentBlocking(FirefoxTestCase): +class TestMixedScriptContentBlocking(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestMixedScriptContentBlocking, self).setUp() diff --git a/testing/firefox-ui/tests/functional/security/test_no_certificate.py b/testing/firefox-ui/tests/functional/security/test_no_certificate.py index 6ed3061ed744..3e37ad32c5d6 100644 --- a/testing/firefox-ui/tests/functional/security/test_no_certificate.py +++ b/testing/firefox-ui/tests/functional/security/test_no_certificate.py @@ -4,12 +4,12 @@ from urlparse import urlparse +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import expected, Wait -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestNoCertificate(FirefoxTestCase): +class TestNoCertificate(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestNoCertificate, self).setUp() diff --git a/testing/firefox-ui/tests/functional/security/test_safe_browsing_initial_download.py b/testing/firefox-ui/tests/functional/security/test_safe_browsing_initial_download.py index f8e74cd35da2..0e1ea11e6bdb 100644 --- a/testing/firefox-ui/tests/functional/security/test_safe_browsing_initial_download.py +++ b/testing/firefox-ui/tests/functional/security/test_safe_browsing_initial_download.py @@ -4,11 +4,12 @@ import os -from firefox_ui_harness.testcases import FirefoxTestCase +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import Wait -class TestSafeBrowsingInitialDownload(FirefoxTestCase): +class TestSafeBrowsingInitialDownload(PuppeteerMixin, MarionetteTestCase): file_extensions = [ 'pset', diff --git a/testing/firefox-ui/tests/functional/security/test_safe_browsing_notification.py b/testing/firefox-ui/tests/functional/security/test_safe_browsing_notification.py index 7246e1fecf9a..a03421ac94a4 100644 --- a/testing/firefox-ui/tests/functional/security/test_safe_browsing_notification.py +++ b/testing/firefox-ui/tests/functional/security/test_safe_browsing_notification.py @@ -4,12 +4,12 @@ import time +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import By, expected, Wait -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestSafeBrowsingNotificationBar(FirefoxTestCase): +class TestSafeBrowsingNotificationBar(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestSafeBrowsingNotificationBar, self).setUp() diff --git a/testing/firefox-ui/tests/functional/security/test_safe_browsing_warning_pages.py b/testing/firefox-ui/tests/functional/security/test_safe_browsing_warning_pages.py index 587378c82ff5..923c70451b93 100644 --- a/testing/firefox-ui/tests/functional/security/test_safe_browsing_warning_pages.py +++ b/testing/firefox-ui/tests/functional/security/test_safe_browsing_warning_pages.py @@ -4,12 +4,12 @@ import time +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import By, expected, Wait -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestSafeBrowsingWarningPages(FirefoxTestCase): +class TestSafeBrowsingWarningPages(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestSafeBrowsingWarningPages, self).setUp() diff --git a/testing/firefox-ui/tests/functional/security/test_security_notification.py b/testing/firefox-ui/tests/functional/security/test_security_notification.py index 3b3e013cb10f..8b6ef5ad7781 100644 --- a/testing/firefox-ui/tests/functional/security/test_security_notification.py +++ b/testing/firefox-ui/tests/functional/security/test_security_notification.py @@ -4,13 +4,13 @@ import time +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import By, Wait from marionette_driver.errors import MarionetteException -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestSecurityNotification(FirefoxTestCase): +class TestSecurityNotification(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestSecurityNotification, self).setUp() diff --git a/testing/firefox-ui/tests/functional/security/test_ssl_disabled_error_page.py b/testing/firefox-ui/tests/functional/security/test_ssl_disabled_error_page.py index 4878472359a0..c0880e6edce3 100644 --- a/testing/firefox-ui/tests/functional/security/test_ssl_disabled_error_page.py +++ b/testing/firefox-ui/tests/functional/security/test_ssl_disabled_error_page.py @@ -4,13 +4,13 @@ import time +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import By, expected, Wait from marionette_driver.errors import MarionetteException -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestSSLDisabledErrorPage(FirefoxTestCase): +class TestSSLDisabledErrorPage(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestSSLDisabledErrorPage, self).setUp() diff --git 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 index 82724e66b792..05597f083a83 100644 --- 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 @@ -2,13 +2,13 @@ # 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_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette.marionette_test import skip_if_e10s - -from firefox_ui_harness.testcases import FirefoxTestCase +from marionette_driver import Wait -class TestSSLStatusAfterRestart(FirefoxTestCase): +class TestSSLStatusAfterRestart(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestSSLStatusAfterRestart, self).setUp() diff --git a/testing/firefox-ui/tests/functional/security/test_submit_unencrypted_info_warning.py b/testing/firefox-ui/tests/functional/security/test_submit_unencrypted_info_warning.py index c3e519bf3b0e..16b338ca5cda 100644 --- a/testing/firefox-ui/tests/functional/security/test_submit_unencrypted_info_warning.py +++ b/testing/firefox-ui/tests/functional/security/test_submit_unencrypted_info_warning.py @@ -2,15 +2,14 @@ # 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 firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import By, expected, Wait - from marionette_driver.errors import NoAlertPresentException from marionette_driver.marionette import Alert -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestSubmitUnencryptedInfoWarning(FirefoxTestCase): +class TestSubmitUnencryptedInfoWarning(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestSubmitUnencryptedInfoWarning, self).setUp() diff --git a/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py b/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py index 08dd1ec7c974..80fcb78df901 100644 --- a/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py +++ b/testing/firefox-ui/tests/functional/security/test_unknown_issuer.py @@ -4,13 +4,12 @@ import time +from marionette import MarionetteTestCase from marionette_driver import By from marionette_driver.errors import MarionetteException -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestUnknownIssuer(FirefoxTestCase): +class TestUnknownIssuer(MarionetteTestCase): def setUp(self): super(TestUnknownIssuer, self).setUp() diff --git a/testing/firefox-ui/tests/functional/security/test_untrusted_connection_error_page.py b/testing/firefox-ui/tests/functional/security/test_untrusted_connection_error_page.py index 801a5d005a97..75450e3165c2 100644 --- a/testing/firefox-ui/tests/functional/security/test_untrusted_connection_error_page.py +++ b/testing/firefox-ui/tests/functional/security/test_untrusted_connection_error_page.py @@ -4,13 +4,13 @@ import time +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import By, Wait from marionette_driver.errors import MarionetteException -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestUntrustedConnectionErrorPage(FirefoxTestCase): +class TestUntrustedConnectionErrorPage(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestUntrustedConnectionErrorPage, self).setUp() diff --git a/testing/firefox-ui/tests/functional/sessionstore/test_restore_windows_after_restart.py b/testing/firefox-ui/tests/functional/sessionstore/test_restore_windows_after_restart.py index 8d78ddddcc99..9ce049df01af 100644 --- a/testing/firefox-ui/tests/functional/sessionstore/test_restore_windows_after_restart.py +++ b/testing/firefox-ui/tests/functional/sessionstore/test_restore_windows_after_restart.py @@ -2,10 +2,11 @@ # 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 firefox_ui_harness.testcases import FirefoxTestCase +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase -class TestRestoreWindowsAfterRestart(FirefoxTestCase): +class TestRestoreWindowsAfterRestart(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestRestoreWindowsAfterRestart, self).setUp() diff --git a/testing/firefox-ui/tests/puppeteer/test_about_window.py b/testing/firefox-ui/tests/puppeteer/test_about_window.py index 77e30639a7fa..cc9c00c0f25e 100644 --- a/testing/firefox-ui/tests/puppeteer/test_about_window.py +++ b/testing/firefox-ui/tests/puppeteer/test_about_window.py @@ -2,10 +2,11 @@ # 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 firefox_ui_harness.testcases import FirefoxTestCase +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase -class TestAboutWindow(FirefoxTestCase): +class TestAboutWindow(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestAboutWindow, self).setUp() diff --git a/testing/firefox-ui/tests/puppeteer/test_appinfo.py b/testing/firefox-ui/tests/puppeteer/test_appinfo.py index 2f62ab14d990..8f1051871a3c 100644 --- a/testing/firefox-ui/tests/puppeteer/test_appinfo.py +++ b/testing/firefox-ui/tests/puppeteer/test_appinfo.py @@ -3,10 +3,12 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. import mozversion -from firefox_ui_harness.testcases import FirefoxTestCase + +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase -class TestAppInfo(FirefoxTestCase): +class TestAppInfo(PuppeteerMixin, MarionetteTestCase): def test_valid_properties(self): binary = self.marionette.bin diff --git a/testing/firefox-ui/tests/puppeteer/test_l10n.py b/testing/firefox-ui/tests/puppeteer/test_l10n.py index 1f8ad50b15a4..66cb40acaa8f 100644 --- a/testing/firefox-ui/tests/puppeteer/test_l10n.py +++ b/testing/firefox-ui/tests/puppeteer/test_l10n.py @@ -2,14 +2,14 @@ # 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 firefox_puppeteer import PuppeteerMixin +from firefox_puppeteer.api.l10n import L10n +from marionette import MarionetteTestCase from marionette_driver import By from marionette_driver.errors import MarionetteException -from firefox_puppeteer.api.l10n import L10n -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestL10n(FirefoxTestCase): +class TestL10n(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestL10n, self).setUp() diff --git a/testing/firefox-ui/tests/puppeteer/test_menubar.py b/testing/firefox-ui/tests/puppeteer/test_menubar.py index 8a98a80cb920..846d3e4977bc 100644 --- a/testing/firefox-ui/tests/puppeteer/test_menubar.py +++ b/testing/firefox-ui/tests/puppeteer/test_menubar.py @@ -2,12 +2,12 @@ # 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 firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver.errors import NoSuchElementException -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestMenuBar(FirefoxTestCase): +class TestMenuBar(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestMenuBar, self).setUp() diff --git a/testing/firefox-ui/tests/puppeteer/test_notifications.py b/testing/firefox-ui/tests/puppeteer/test_notifications.py index 7d0c53978576..027a3f68eaed 100644 --- a/testing/firefox-ui/tests/puppeteer/test_notifications.py +++ b/testing/firefox-ui/tests/puppeteer/test_notifications.py @@ -2,17 +2,17 @@ # 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 firefox_puppeteer import PuppeteerMixin +from firefox_puppeteer.ui.browser.notifications import ( + AddOnInstallFailedNotification, + AddOnInstallConfirmationNotification, +) +from marionette import MarionetteTestCase from marionette_driver import By from marionette_driver.errors import TimeoutException -from firefox_ui_harness.testcases import FirefoxTestCase -from firefox_puppeteer.ui.browser.notifications import ( - AddOnInstallFailedNotification, - AddOnInstallConfirmationNotification -) - -class TestNotifications(FirefoxTestCase): +class TestNotifications(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestNotifications, self).setUp() diff --git a/testing/firefox-ui/tests/puppeteer/test_page_info_window.py b/testing/firefox-ui/tests/puppeteer/test_page_info_window.py index e9d6d1aaabdf..eb40304faf5c 100644 --- a/testing/firefox-ui/tests/puppeteer/test_page_info_window.py +++ b/testing/firefox-ui/tests/puppeteer/test_page_info_window.py @@ -2,10 +2,11 @@ # 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 firefox_ui_harness.testcases import FirefoxTestCase +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase -class TestPageInfoWindow(FirefoxTestCase): +class TestPageInfoWindow(PuppeteerMixin, MarionetteTestCase): def tearDown(self): try: diff --git a/testing/firefox-ui/tests/puppeteer/test_places.py b/testing/firefox-ui/tests/puppeteer/test_places.py index ddf54ac7a15a..9286c667081d 100644 --- a/testing/firefox-ui/tests/puppeteer/test_places.py +++ b/testing/firefox-ui/tests/puppeteer/test_places.py @@ -2,12 +2,12 @@ # 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 firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import By, Wait -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestPlaces(FirefoxTestCase): +class TestPlaces(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestPlaces, self).setUp() diff --git a/testing/firefox-ui/tests/puppeteer/test_prefs.py b/testing/firefox-ui/tests/puppeteer/test_prefs.py index 72b0dcbe6dea..25a83f5069b5 100644 --- a/testing/firefox-ui/tests/puppeteer/test_prefs.py +++ b/testing/firefox-ui/tests/puppeteer/test_prefs.py @@ -2,10 +2,11 @@ # 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 firefox_ui_harness.testcases import FirefoxTestCase +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase -class testPreferences(FirefoxTestCase): +class testPreferences(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(testPreferences, self).setUp() diff --git a/testing/firefox-ui/tests/puppeteer/test_security.py b/testing/firefox-ui/tests/puppeteer/test_security.py index c30996971e1d..f4be896a2859 100644 --- a/testing/firefox-ui/tests/puppeteer/test_security.py +++ b/testing/firefox-ui/tests/puppeteer/test_security.py @@ -2,12 +2,12 @@ # 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 firefox_ui_harness.testcases import FirefoxTestCase - +from firefox_puppeteer import PuppeteerMixin from firefox_puppeteer.errors import NoCertificateError +from marionette import MarionetteTestCase -class TestSecurity(FirefoxTestCase): +class TestSecurity(PuppeteerMixin, MarionetteTestCase): def test_get_address_from_certificate(self): url = 'https://ssl-ev.mozqa.com' diff --git a/testing/firefox-ui/tests/puppeteer/test_software_update.py b/testing/firefox-ui/tests/puppeteer/test_software_update.py index 185f1fe2b141..f03064a432a1 100644 --- a/testing/firefox-ui/tests/puppeteer/test_software_update.py +++ b/testing/firefox-ui/tests/puppeteer/test_software_update.py @@ -4,12 +4,12 @@ import os -from firefox_ui_harness.testcases import FirefoxTestCase - +from firefox_puppeteer import PuppeteerMixin from firefox_puppeteer.api.software_update import SoftwareUpdate +from marionette import MarionetteTestCase -class TestSoftwareUpdate(FirefoxTestCase): +class TestSoftwareUpdate(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestSoftwareUpdate, self).setUp() @@ -69,7 +69,7 @@ class TestSoftwareUpdate(FirefoxTestCase): self.assertTrue(self.software_update.staging_directory) -class TestUpdateChannel(FirefoxTestCase): +class TestUpdateChannel(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestUpdateChannel, self).setUp() @@ -96,7 +96,7 @@ class TestUpdateChannel(FirefoxTestCase): self.assertEqual(self.software_update.update_channel.default_channel, 'new_channel') -class TestMARChannels(FirefoxTestCase): +class TestMARChannels(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestMARChannels, self).setUp() diff --git a/testing/firefox-ui/tests/puppeteer/test_tabbar.py b/testing/firefox-ui/tests/puppeteer/test_tabbar.py index bf652f928e20..0666e79c175b 100644 --- a/testing/firefox-ui/tests/puppeteer/test_tabbar.py +++ b/testing/firefox-ui/tests/puppeteer/test_tabbar.py @@ -2,12 +2,12 @@ # 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 firefox_ui_harness.testcases import FirefoxTestCase - +from firefox_puppeteer import PuppeteerMixin from firefox_puppeteer.errors import NoCertificateError +from marionette import MarionetteTestCase -class TestTabBar(FirefoxTestCase): +class TestTabBar(PuppeteerMixin, MarionetteTestCase): def tearDown(self): try: @@ -114,7 +114,7 @@ class TestTabBar(FirefoxTestCase): tabbar.close_tab(tabbar.tabs[1]) -class TestTab(FirefoxTestCase): +class TestTab(PuppeteerMixin, MarionetteTestCase): def tearDown(self): try: diff --git a/testing/firefox-ui/tests/puppeteer/test_toolbars.py b/testing/firefox-ui/tests/puppeteer/test_toolbars.py index f08a79ed3a2b..64f1584d70f3 100644 --- a/testing/firefox-ui/tests/puppeteer/test_toolbars.py +++ b/testing/firefox-ui/tests/puppeteer/test_toolbars.py @@ -2,13 +2,13 @@ # 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 firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase from marionette_driver import expected, By, Wait from marionette_driver.errors import NoSuchElementException -from firefox_ui_harness.testcases import FirefoxTestCase - -class TestNavBar(FirefoxTestCase): +class TestNavBar(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestNavBar, self).setUp() @@ -77,7 +77,7 @@ class TestNavBar(FirefoxTestCase): self.assertEqual(self.marionette.get_url(), self.browser.default_homepage) -class TestLocationBar(FirefoxTestCase): +class TestLocationBar(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestLocationBar, self).setUp() @@ -133,7 +133,7 @@ class TestLocationBar(FirefoxTestCase): Wait(self.marionette).until(lambda mn: mn.get_url() == data_uri) -class TestAutoCompleteResults(FirefoxTestCase): +class TestAutoCompleteResults(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestAutoCompleteResults, self).setUp() @@ -203,7 +203,7 @@ class TestAutoCompleteResults(FirefoxTestCase): self.autocomplete_results.close() -class TestIdentityPopup(FirefoxTestCase): +class TestIdentityPopup(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestIdentityPopup, self).setUp() diff --git a/testing/firefox-ui/tests/puppeteer/test_update_wizard.py b/testing/firefox-ui/tests/puppeteer/test_update_wizard.py index 21034751639d..5716642c90a1 100644 --- a/testing/firefox-ui/tests/puppeteer/test_update_wizard.py +++ b/testing/firefox-ui/tests/puppeteer/test_update_wizard.py @@ -2,11 +2,12 @@ # 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 firefox_ui_harness.testcases import FirefoxTestCase +from firefox_puppeteer import PuppeteerMixin from firefox_puppeteer.ui.update_wizard import UpdateWizardDialog +from marionette import MarionetteTestCase -class TestUpdateWizard(FirefoxTestCase): +class TestUpdateWizard(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestUpdateWizard, self).setUp() diff --git a/testing/firefox-ui/tests/puppeteer/test_utils.py b/testing/firefox-ui/tests/puppeteer/test_utils.py index e76ff6c8ef95..9af40a13b69d 100644 --- a/testing/firefox-ui/tests/puppeteer/test_utils.py +++ b/testing/firefox-ui/tests/puppeteer/test_utils.py @@ -2,10 +2,11 @@ # 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 firefox_ui_harness.testcases import FirefoxTestCase +from firefox_puppeteer import PuppeteerMixin +from marionette import MarionetteTestCase -class TestSanitize(FirefoxTestCase): +class TestSanitize(PuppeteerMixin, MarionetteTestCase): def setUp(self): super(TestSanitize, self).setUp() diff --git a/testing/firefox-ui/tests/puppeteer/test_windows.py b/testing/firefox-ui/tests/puppeteer/test_windows.py index 2e552b20720e..46ea5534e3f1 100644 --- a/testing/firefox-ui/tests/puppeteer/test_windows.py +++ b/testing/firefox-ui/tests/puppeteer/test_windows.py @@ -2,16 +2,16 @@ # 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 firefox_puppeteer.errors as errors + +from firefox_puppeteer import PuppeteerMixin +from firefox_puppeteer.ui.windows import BaseWindow +from marionette import MarionetteTestCase from marionette_driver import By, Wait from marionette_driver.errors import NoSuchWindowException -import firefox_puppeteer.errors as errors -from firefox_puppeteer.ui.windows import BaseWindow -from firefox_ui_harness.testcases import FirefoxTestCase - - -class BaseWindowTestCase(FirefoxTestCase): +class BaseWindowTestCase(PuppeteerMixin, MarionetteTestCase): def setUp(self): """