当前位置: 首页>>代码示例>>Python>>正文


Python firefox_ui_harness.FirefoxTestCase类代码示例

本文整理汇总了Python中firefox_ui_harness.FirefoxTestCase的典型用法代码示例。如果您正苦于以下问题:Python FirefoxTestCase类的具体用法?Python FirefoxTestCase怎么用?Python FirefoxTestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了FirefoxTestCase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

    def setUp(self):
        FirefoxTestCase.setUp(self)

        self.url = 'https://ssl-dv.mozqa.com/data/firefox/security/unencryptedsearch.html'
        self.test_string = 'mozilla'

        self.prefs.set_pref('security.warn_submit_insecure', True)
开发者ID:IamAdiSri,项目名称:firefox-ui-tests,代码行数:7,代码来源:test_submit_unencrypted_info_warning.py

示例2: setUp

    def setUp(self):
        FirefoxTestCase.setUp(self)

        self.locationbar = self.browser.navbar.locationbar
        self.identity_popup = self.locationbar.identity_popup

        self.url = 'https://ssl-ev.mozqa.com/'
开发者ID:Pike,项目名称:firefox-ui-tests,代码行数:7,代码来源:test_ev_certificate.py

示例3: tearDown

 def tearDown(self):
     try:
         self.browser.switch_to()
         self.identity_popup.close(force=True)
         self.windows.close_all([self.browser])
     finally:
         FirefoxTestCase.tearDown(self)
开发者ID:Pike,项目名称:firefox-ui-tests,代码行数:7,代码来源:test_ev_certificate.py

示例4: setUp

    def setUp(self):
        FirefoxTestCase.setUp(self)

        self.test_data = [
            # Phishing URL info
            {
                'button_property': 'safebrowsing.notAForgeryButton.label',
                'report_page': 'www.google.com/safebrowsing/report_error',
                'unsafe_page': 'https://www.itisatrap.org/firefox/its-a-trap.html'
            },
            # Malware URL object
            {
                'button_property': 'safebrowsing.notAnAttackButton.label',
                'report_page': 'www.stopbadware.org',
                'unsafe_page': 'https://www.itisatrap.org/firefox/its-an-attack.html'
            }
        ]

        self.prefs.set_pref('browser.safebrowsing.enabled', True)
        self.prefs.set_pref('browser.safebrowsing.malware.enabled', True)

        # Give the browser a little time, because SafeBrowsing.jsm takes a while
        # between start up and adding the example urls to the db.
        # hg.mozilla.org/mozilla-central/file/46aebcd9481e/browser/base/content/browser.js#l1194
        time.sleep(3)

        # TODO: Bug 1139544: While we don't have a reliable way to close the safe browsing
        # notification bar when a test fails, run this test in a new tab.
        self.browser.tabbar.open_tab()
开发者ID:IamAdiSri,项目名称:firefox-ui-tests,代码行数:29,代码来源:test_safe_browsing_notification.py

示例5: setUp

    def setUp(self):
        FirefoxTestCase.setUp(self)

        self.locationbar = self.browser.navbar.locationbar
        self.identity_popup = self.locationbar.identity_popup

        self.url = self.marionette.absolute_url('layout/mozilla.html')
开发者ID:myrdd,项目名称:firefox-ui-tests,代码行数:7,代码来源:test_no_certificate.py

示例6: setUp

    def setUp(self):
        FirefoxTestCase.setUp(self)

        self.test_data = (
            {
                'url': 'https://ssl-dv.mozqa.com',
                'identity': '',
                'type': 'verifiedDomain'
            },
            {
                'url': 'https://ssl-ev.mozqa.com/',
                'identity': 'Mozilla Corporation',
                'type': 'verifiedIdentity'
            },
            {
                'url': 'https://ssl-ov.mozqa.com/',
                'identity': '',
                'type': 'verifiedDomain'
            }
        )

        # Set browser to restore previous session
        self.prefs.set_pref('browser.startup.page', 3)

        self.identity_popup = self.browser.navbar.locationbar.identity_popup
开发者ID:IamAdiSri,项目名称:firefox-ui-tests,代码行数:25,代码来源:test_ssl_status_after_restart.py

示例7: tearDown

 def tearDown(self):
     # Close the autocomplete results
     try:
         self.browser.navbar.locationbar.autocomplete_results.close()
         self.places.restore_default_bookmarks()
     finally:
         FirefoxTestCase.tearDown(self)
开发者ID:sydvicious,项目名称:firefox-ui-tests,代码行数:7,代码来源:test_suggest_bookmarks.py

示例8: setUp

    def setUp(self):
        FirefoxTestCase.setUp(self)

        # Use a fake local support URL
        support_url = 'about:blank?'
        self.prefs.set_pref('app.support.baseURL', support_url)

        self.pb_url = support_url + 'private-browsing'
开发者ID:Pike,项目名称:firefox-ui-tests,代码行数:8,代码来源:test_about_private_browsing.py

示例9: setUp

    def setUp(self):
        FirefoxTestCase.setUp(self)

        self.new_pref = 'marionette.unittest.set_pref'
        self.unknown_pref = 'marionette.unittest.unknown'

        self.bool_pref = 'browser.tabs.loadBookmarksInBackground'
        self.int_pref = 'browser.tabs.maxOpenBeforeWarn'
        self.string_pref = 'browser.newtab.url'
开发者ID:IamAdiSri,项目名称:firefox-ui-tests,代码行数:9,代码来源:test_prefs.py

示例10: tearDown

 def tearDown(self):
     try:
         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)
开发者ID:myrdd,项目名称:firefox-ui-tests,代码行数:9,代码来源:test_toolbars.py

示例11: tearDown

 def tearDown(self):
     try:
         self.identity_popup.close(force=True)
     except NoSuchElementException:
         # TODO: A NoSuchElementException may be thrown here when tests accessing the
         # identity_popup.popup element are skipped.
         pass
     finally:
         FirefoxTestCase.tearDown(self)
开发者ID:sydvicious,项目名称:firefox-ui-tests,代码行数:9,代码来源:test_toolbars.py

示例12: setUp

 def setUp(self):
     FirefoxTestCase.setUp(self)
     self.url = 'https://mozqa.com/data/firefox/security/mixed_content_blocked/index.html'
     self.test_elements = [
         ('result1', 'Insecure script one'),
         ('result2', 'Insecure script from iFrame'),
         ('result3', 'Insecure plugin'),
         ('result4', 'Insecure stylesheet'),
     ]
     self.locationbar = self.browser.navbar.locationbar
开发者ID:IamAdiSri,项目名称:firefox-ui-tests,代码行数:10,代码来源:test_mixed_script_content_blocking.py

示例13: tearDown

 def tearDown(self):
     try:
         self.identity_popup.close(force=True)
         self.windows.close_all([self.browser])
     except NoSuchElementException:
         # TODO: A NoSuchElementException may be thrown here when the test is skipped
         # as under xvfb.
         pass
     finally:
         FirefoxTestCase.tearDown(self)
开发者ID:IamAdiSri,项目名称:firefox-ui-tests,代码行数:10,代码来源:test_ev_certificate.py

示例14: setUp

    def setUp(self):
        FirefoxTestCase.setUp(self)

        self.locationbar = self.browser.navbar.locationbar
        self.identity_popup = self.locationbar.identity_popup

        self.url = 'https://ssl-ev.mozqa.com'

        with self.marionette.using_context('content'):
            self.marionette.navigate(self.url)
开发者ID:myrdd,项目名称:firefox-ui-tests,代码行数:10,代码来源:test_toolbars.py

示例15: setUp

    def setUp(self):
        FirefoxTestCase.setUp(self)

        self.test_urls = [self.marionette.absolute_url("layout/mozilla_grants.html")]

        # Disable search suggestions to only get results for history and bookmarks
        self.prefs.set_pref(self.PREF_SUGGEST_SEARCHES, False)

        with self.marionette.using_context("content"):
            self.marionette.navigate("about:blank")

        self.places.remove_all_history()
开发者ID:sydvicious,项目名称:firefox-ui-tests,代码行数:12,代码来源:test_suggest_bookmarks.py


注:本文中的firefox_ui_harness.FirefoxTestCase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。