Esempio n. 1
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     if self.marionette.session_capabilities['platformName'] == 'DARWIN':
         self.mod_key = Keys.META
     else:
         self.mod_key = Keys.CONTROL
     self.action = Actions(self.marionette)
Esempio n. 2
0
 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', '_blank', 'chrome,centerscreen');"
     )
Esempio n. 3
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     if self.marionette.session_capabilities['platformName'] == 'DARWIN':
         self.mod_key = Keys.META
     else:
         self.mod_key = Keys.CONTROL
     self.action = Actions(self.marionette)
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.enforce_gecko_prefs({
         "marionette.test.bool": True,
         "marionette.test.string": "testing",
         "marionette.test.int": 3
     })
Esempio n. 5
0
 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');")
     self.marionette.switch_to_window('foo')
     self.assertNotEqual(self.win, self.marionette.current_window_handle)
Esempio n. 6
0
 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', '_blank', 'chrome,centerscreen');"
     )
Esempio n. 7
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     test_url = self.marionette.absolute_url('test.html')
     self.marionette.navigate(test_url)
     self.COOKIE_A = {"name": "foo",
                      "value": "bar",
                      "path": "/",
                      "secure": False}
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.linter = Linter(
         ResourceUriFileReader(self.marionette),
         JSHintEngine(self.marionette,
                      self._read_local_file(self.JSHINT_PATH),
                      self._read_local_file(self.JSHINTRC_PATH)),
         self._get_extended_error_message)
Esempio n. 9
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.linter = Linter(
         ResourceUriFileReader(self.marionette),
         JSHintEngine(self.marionette,
                      self._read_local_file(self.JSHINT_PATH),
                      self._read_local_file(self.JSHINTRC_PATH)),
         self._get_extended_error_message)
Esempio n. 10
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context("chrome")
     self.win = self.marionette.get_window()
     #need to get the file:// path for xul
     unit = os.path.abspath(os.path.join(os.path.realpath(__file__), os.path.pardir))
     tests = os.path.abspath(os.path.join(unit, os.path.pardir))
     mpath = os.path.abspath(os.path.join(tests, os.path.pardir))
     xul = "file://" + os.path.join(mpath, "www", "test.xul")
     self.marionette.execute_script("window.open('" + xul +"', '_blank', 'chrome,centerscreen');")
Esempio n. 11
0
    def setUp(self):
        MarionetteTestCase.setUp(self)

        if self.marionette.session_capabilities['platformName'] == 'DARWIN':
            self.mod_key = Keys.META
        else:
            self.mod_key = Keys.CONTROL

        self.remote_uri = self.marionette.absolute_url("javascriptPage.html")
        self.marionette.navigate(self.remote_uri)
Esempio n. 12
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context("chrome")
     self.win = self.marionette.get_window()
     #need to get the file:// path for xul
     unit = os.path.abspath(os.path.join(os.path.realpath(__file__), os.path.pardir))
     tests = os.path.abspath(os.path.join(unit, os.path.pardir))
     mpath = os.path.abspath(os.path.join(tests, os.path.pardir))
     xul = "file://" + os.path.join(mpath, "www", "test.xul")
     self.marionette.execute_script("window.open('" + xul +"', '_blank', 'chrome,centerscreen');")
Esempio n. 13
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     test_url = self.marionette.absolute_url('test.html')
     self.marionette.navigate(test_url)
     self.COOKIE_A = {
         "name": "foo",
         "value": "bar",
         "path": "/",
         "secure": False
     }
Esempio n. 14
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     if self.marionette.session_capabilities['platformName'] == 'DARWIN':
         self.mod_key = Keys.META
     else:
         self.mod_key = Keys.CONTROL
     test_html = self.marionette.absolute_url("javascriptPage.html")
     self.marionette.navigate(test_html)
     self.reporter_element = self.marionette.find_element("id", "keyReporter")
     self.reporter_element.click()
     self.key_action = Actions(self.marionette)
Esempio n. 15
0
    def setUp(self):
        MarionetteTestCase.setUp(self)

        # shortcuts to improve readability of these tests
        self.chrome = self.marionette.CONTEXT_CHROME
        self.content = self.marionette.CONTEXT_CONTENT

        test_url = self.marionette.absolute_url('empty.html')
        self.marionette.navigate(test_url)
        self.marionette.set_context(self.content)
        self.assertEquals(self.get_context(), self.content)
Esempio n. 16
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     if self.marionette.session_capabilities['platformName'] == 'DARWIN':
         self.mod_key = Keys.META
     else:
         self.mod_key = Keys.CONTROL
     test_html = self.marionette.absolute_url("javascriptPage.html")
     self.marionette.navigate(test_html)
     self.reporter_element = self.marionette.find_element(
         "id", "keyReporter")
     self.reporter_element.click()
     self.key_action = Actions(self.marionette)
Esempio n. 17
0
    def setUp(self):
        # start server
        self.loop_test_servers = LoopTestServers()

        MarionetteTestCase.setUp(self)

        # Unfortunately, enforcing preferences currently comes with the side
        # effect of launching and restarting the browser before running the
        # real functional tests.  Bug 1048554 has been filed to track this.
        self.marionette.enforce_gecko_prefs(FIREFOX_PREFERENCES)

        # this is browser chrome, kids, not the content window just yet
        self.marionette.set_context("chrome")
    def setUp(self):
        # start server
        self.loop_test_servers = LoopTestServers()

        MarionetteTestCase.setUp(self)

        # Unfortunately, enforcing preferences currently comes with the side
        # effect of launching and restarting the browser before running the
        # real functional tests.  Bug 1048554 has been filed to track this.
        self.marionette.enforce_gecko_prefs(FIREFOX_PREFERENCES)

        # this is browser chrome, kids, not the content window just yet
        self.marionette.set_context("chrome")
Esempio n. 19
0
    def setUp(self):
        # start server
        self.loop_test_servers = LoopTestServers()

        MarionetteTestCase.setUp(self)

        # Unfortunately, enforcing preferences currently comes with the side
        # effect of launching and restarting the browser before running the
        # real functional tests.  Bug 1048554 has been filed to track this.
        preferences = {"loop.server": "http://localhost:" + str(LOOP_SERVER_PORT)}
        self.marionette.enforce_gecko_prefs(preferences)

        # this is browser chrome, kids, not the content window just yet
        self.marionette.set_context("chrome")
Esempio n. 20
0
    def __init__(self, marionette_weakref, **kwargs):
        if 'runner' in kwargs:
            self.runner = kwargs['runner']
            del kwargs['runner']

        update_test_js = os.path.join(os.path.dirname(__file__), 'atoms',
                                      'b2g_update_test.js')
        with open(update_test_js, 'r') as f:
            self.update_test_js = f.read()

        self.b2g_pid = self.runner.find_b2g_pid()
        if not self.b2g_pid:
            raise Exception('B2G PID could not be found for update test')
        MarionetteTestCase.__init__(self, marionette_weakref, **kwargs)

        self.testvars = self.testvars or {}
        self.status_newline = True
        self.loglines = []
Esempio n. 21
0
    def __init__(self, marionette_weakref, **kwargs):
        if 'runner' in kwargs:
            self.runner = kwargs['runner']
            del kwargs['runner']

        update_test_js = os.path.join(os.path.dirname(__file__), 'atoms',
                                      'b2g_update_test.js')
        with open(update_test_js, 'r') as f:
            self.update_test_js = f.read()

        self.b2g_pid = self.runner.find_b2g_pid()
        if not self.b2g_pid:
            raise Exception('B2G PID could not be found for update test')
        MarionetteTestCase.__init__(self, marionette_weakref, **kwargs)

        self.testvars = self.testvars or {}
        self.status_newline = True
        self.loglines = []
Esempio n. 22
0
 def tearDown(self):
     self.marionette.execute_script("window.close();")
     self.marionette.switch_to_window(self.win)
     MarionetteTestCase.tearDown(self)
Esempio n. 23
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context("chrome")
Esempio n. 24
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_script_timeout(30000)
     self.marionette.set_context("chrome")
Esempio n. 25
0
 def tearDown(self):
     self.marionette.delete_all_cookies()
     MarionetteTestCase.tearDown(self)
Esempio n. 26
0
    def setUp(self):
        MarionetteTestCase.setUp(self)

        self.screen = self.marionette.emulator.screen
        self.screen.initialize()
Esempio n. 27
0
 def tearDown(self):
     # Code to execute after a test is being run.
     self.expiration_time = self.original_expiration_time
     MarionetteTestCase.tearDown(self)
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.enforce_gecko_prefs({"marionette.test.bool": True, "marionette.test.string": "testing", "marionette.test.int": 3})
Esempio n. 29
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.enforce_gecko_prefs({"prompts.tab_modal.enabled": False})
     self.marionette.navigate(self.marionette.absolute_url('modal_dialogs.html'))
Esempio n. 30
0
 def setUp(self):
     # Code to execute before a tests are run.
     MarionetteTestCase.setUp(self)
     self.actions = Actions(self.marionette)
Esempio n. 31
0
    def setUp(self):
        MarionetteTestCase.setUp(self)

        self.screen = self.marionette.emulator.screen
        self.screen.initialize()
 def setUp(self):
     MarionetteTestCase.setUp(self)
     # Sets an appropriate timeout for this test.
     # P.S. The timeout of next test wouldn't be affected by this statement.
     self.marionette.timeouts(self.marionette.TIMEOUT_PAGE, 90000)
Esempio n. 33
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context("chrome")
Esempio n. 34
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context(Marionette.CONTEXT_CHROME)
Esempio n. 35
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
 def tearDown(self):
     MarionetteTestCase.tearDown(self)
 def tearDown(self):
     #ensure that we close the window, regardless of pass/failure
     self.close_new_window()
     MarionetteTestCase.tearDown(self)
Esempio n. 38
0
 def setUp(self):
     # Code to execute before a test is being run.
     MarionetteTestCase.setUp(self)
     self.actions = Actions(self.marionette)
     self.original_expiration_time = self.expiration_time
 def tearDown(self):
     self.loop_test_servers.shutdown()
     MarionetteTestCase.tearDown(self)
Esempio n. 40
0
 def setUp(self):
     try:
         self.testVar['test']
     except KeyError:
         raise SkipTest('email key not present in dict, skip ...')
     MarionetteTestCase.setUp(self)
Esempio n. 41
0
 def setUp(self):
     # Code to execute before a tests are run.
     MarionetteTestCase.setUp(self)
     self.actions = Actions(self.marionette)
Esempio n. 42
0
 def tearDown(self):
     self.loop_test_servers.shutdown()
     MarionetteTestCase.tearDown(self)
Esempio n. 43
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context(Marionette.CONTEXT_CHROME)
Esempio n. 44
0
 def tearDown(self):
     #ensure that we close the window, regardless of pass/failure
     self.close_new_window()
     MarionetteTestCase.tearDown(self)
Esempio n. 45
0
 def setUp(self):
     # Code to execute before a test is being run.
     MarionetteTestCase.setUp(self)
     self.actions = Actions(self.marionette)
     self.original_expiration_time = self.expiration_time
Esempio n. 46
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
Esempio n. 47
0
 def tearDown(self):
     # Code to execute after a test is being run.
     self.expiration_time = self.original_expiration_time
     MarionetteTestCase.tearDown(self)
Esempio n. 48
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_script_timeout(30000)
     self.marionette.set_context("chrome")
Esempio n. 49
0
 def setUp(self):
     try:
         self.testVar["test"]
     except KeyError:
         raise SkipTest("email key not present in dict, skip ...")
     MarionetteTestCase.setUp(self)
Esempio n. 50
0
 def tearDown(self):
     self.marionette.execute_script("window.close();")
     self.marionette.switch_to_window(self.win)
     MarionetteTestCase.tearDown(self)
Esempio n. 51
0
 def tearDown(self):
     MarionetteTestCase.tearDown(self)
Esempio n. 52
0
 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)
Esempio n. 53
0
 def tearDown(self):
     self.marionette.delete_all_cookies()
     MarionetteTestCase.tearDown(self)