Exemple #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)
Exemple #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');"
     )
Exemple #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
     })
Exemple #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)
Exemple #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');"
     )
Exemple #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)
Exemple #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)
Exemple #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');")
    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)
 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');")
Exemple #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
     }
 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)
Exemple #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)
 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)
    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")
Exemple #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")
Exemple #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 = []
    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 = []
Exemple #22
0
 def tearDown(self):
     self.marionette.execute_script("window.close();")
     self.marionette.switch_to_window(self.win)
     MarionetteTestCase.tearDown(self)
Exemple #23
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context("chrome")
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_script_timeout(30000)
     self.marionette.set_context("chrome")
Exemple #25
0
 def tearDown(self):
     self.marionette.delete_all_cookies()
     MarionetteTestCase.tearDown(self)
Exemple #26
0
    def setUp(self):
        MarionetteTestCase.setUp(self)

        self.screen = self.marionette.emulator.screen
        self.screen.initialize()
Exemple #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})
Exemple #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'))
 def setUp(self):
     # Code to execute before a tests are run.
     MarionetteTestCase.setUp(self)
     self.actions = Actions(self.marionette)
Exemple #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)
Exemple #33
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context("chrome")
Exemple #34
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context(Marionette.CONTEXT_CHROME)
Exemple #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)
Exemple #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)
 def setUp(self):
     try:
         self.testVar['test']
     except KeyError:
         raise SkipTest('email key not present in dict, skip ...')
     MarionetteTestCase.setUp(self)
 def setUp(self):
     # Code to execute before a tests are run.
     MarionetteTestCase.setUp(self)
     self.actions = Actions(self.marionette)
 def tearDown(self):
     self.loop_test_servers.shutdown()
     MarionetteTestCase.tearDown(self)
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_context(Marionette.CONTEXT_CHROME)
Exemple #44
0
 def tearDown(self):
     #ensure that we close the window, regardless of pass/failure
     self.close_new_window()
     MarionetteTestCase.tearDown(self)
Exemple #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
 def setUp(self):
     MarionetteTestCase.setUp(self)
Exemple #47
0
 def tearDown(self):
     # Code to execute after a test is being run.
     self.expiration_time = self.original_expiration_time
     MarionetteTestCase.tearDown(self)
Exemple #48
0
 def setUp(self):
     MarionetteTestCase.setUp(self)
     self.marionette.set_script_timeout(30000)
     self.marionette.set_context("chrome")
Exemple #49
0
 def setUp(self):
     try:
         self.testVar["test"]
     except KeyError:
         raise SkipTest("email key not present in dict, skip ...")
     MarionetteTestCase.setUp(self)
Exemple #50
0
 def tearDown(self):
     self.marionette.execute_script("window.close();")
     self.marionette.switch_to_window(self.win)
     MarionetteTestCase.tearDown(self)
Exemple #51
0
 def tearDown(self):
     MarionetteTestCase.tearDown(self)
Exemple #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)
Exemple #53
0
 def tearDown(self):
     self.marionette.delete_all_cookies()
     MarionetteTestCase.tearDown(self)