Unverified Commit 810b992c authored by boklm's avatar boklm
Browse files

Bug 18887: Update marionette_client and marionette_driver

Also, stop using the FirefoxTestCase class from marionette/firefox-ui-tests.
parent 0f443b1c
[submodule "mozmill-tests/mozilla-mozmill-tests"]
path = mozmill-tests/mozilla-mozmill-tests
url = https://github.com/boklm/mozilla-mozmill-tests
[submodule "marionette/firefox-ui-tests"]
path = marionette/firefox-ui-tests
url = https://github.com/mozilla/firefox-ui-tests
Subproject commit 0258610df1fd2f7233807d338436781f6504f67a
from setuptools import setup, find_packages
PACKAGE_VERSION = '0.2'
PACKAGE_VERSION = '0.3'
deps = [
'marionette-client == 1.0.0',
'marionette-driver == 1.0.0',
'marionette_client == 2.2.0',
'marionette_driver == 1.3.0',
'mozfile == 1.2',
'mozinfo == 0.8',
'mozlog == 3.0',
'mozlog == 3.1',
]
setup(name='tor-browser-tests',
......
import os
import sys
from marionette.runtests import cli as mn_cli
from mozlog import structured
def cli():
mn_cli()
from marionette import BaseMarionetteArguments
from marionette import BaseMarionetteTestRunner
from firefox_ui_harness import FirefoxTestCase
def cli(runner_class=BaseMarionetteTestRunner, parser_class=BaseMarionetteArguments):
parser = parser_class(usage='%(prog)s [options] test_file_or_dir <test_file_or_dir> ...')
structured.commandline.add_logging_group(parser)
args = parser.parse_args()
parser.verify_usage(args)
logger = structured.commandline.setup_logging(
args.logger_name, args, {'mach': sys.stdout})
args.logger = logger
try:
runner = runner_class(**vars(args))
runner.test_handlers = [FirefoxTestCase]
runner.run_tests(args.tests)
if runner.failed > 0:
sys.exit(10)
except Exception:
logger.error('Failure during execution test.', exc_info=True)
sys.exit(1)
from marionette_driver import By, Wait
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
import testsuite
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def setUp(self):
FirefoxTestCase.setUp(self)
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.test_page_url = '%s/acid3/' % ts.t['options']['test_data_url']
......
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def test_check_tpo(self):
with self.marionette.using_context('content'):
driver = self.marionette
......
......@@ -7,15 +7,15 @@
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
import testsuite
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def setUp(self):
FirefoxTestCase.setUp(self)
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts = ts
......
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
# expected values for navigation properties
nav_props = {"appCodeName": "Mozilla",
......@@ -47,7 +47,7 @@ nav_props = {"appCodeName": "Mozilla",
}
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def test_navigator(self):
with self.marionette.using_context('content'):
self.marionette.navigate('about:robots')
......
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def test_plugins(self):
with self.marionette.using_context('content'):
self.marionette.navigate('about:robots')
......
......@@ -2,9 +2,9 @@
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def test_screen_coords(self):
# https://gitweb.torproject.org/torbrowser.git/blob/HEAD:/src/current-patches/firefox/0021-Do-not-expose-physical-screen-info.-via-window-and-w.patch
with self.marionette.using_context('content'):
......
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def test_screen_dims(self):
with self.marionette.using_context('content'):
# https://gitweb.torproject.org/torbrowser.git/blob/HEAD:/src/current-patches/firefox/0021-Do-not-expose-physical-screen-info.-via-window-and-w.patch
......
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def test_useragent(self):
with self.marionette.using_context('content'):
self.marionette.navigate('about:robots')
......
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
import testsuite
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def setUp(self):
FirefoxTestCase.setUp(self)
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts = ts
......@@ -20,7 +20,7 @@ class Test(FirefoxTestCase):
def test_https_everywhere(self):
self.assertEqual(self.prefs.get_pref(self.PREF_ENABLE_HE), \
self.assertEqual(self.marionette.get_pref(self.PREF_ENABLE_HE), \
self.ts.t['test']['name'] == 'https-everywhere')
with self.marionette.using_context('content'):
......
......@@ -6,12 +6,12 @@
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def setUp(self):
FirefoxTestCase.setUp(self)
MarionetteTestCase.setUp(self)
self.TEST_URL = "https://www.mediawiki.org/wiki/MediaWiki"
......
......@@ -3,15 +3,15 @@
from marionette_driver import By
from marionette_driver.errors import MarionetteException, NoSuchElementException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
import testsuite
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def setUp(self):
FirefoxTestCase.setUp(self)
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts = ts
......@@ -21,11 +21,11 @@ class Test(FirefoxTestCase):
def test_noscript(self):
self.assertEqual(self.prefs.get_pref('noscript.global'), False,
self.assertEqual(self.marionette.get_pref('noscript.global'), False,
msg="pref noscript.global is not false")
self.assertEqual(self.prefs.get_pref('noscript.globalHttpsWhitelist'), True,
self.assertEqual(self.marionette.get_pref('noscript.globalHttpsWhitelist'), True,
msg="pref noscript.globalHttpsWhitelist is not true")
self.assertEqual(self.prefs.get_pref('noscript.cascadePermissions'), True,
self.assertEqual(self.marionette.get_pref('noscript.cascadePermissions'), True,
msg="pref noscript.cascadePermissions is not true")
self.marionette.set_search_timeout(1000)
......
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
import testsuite
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def setUp(self):
FirefoxTestCase.setUp(self)
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts = ts
......
......@@ -6,12 +6,12 @@
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def setUp(self):
FirefoxTestCase.setUp(self)
MarionetteTestCase.setUp(self)
self.TEST_URL = "https://www.mediawiki.org/wiki/MediaWiki"
self.RESOURCE_URL = "https://upload.wikimedia.org/wikipedia/mediawiki/b/bc/Wiki.png"
......
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
import testsuite
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def setUp(self):
FirefoxTestCase.setUp(self)
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts = ts
......
......@@ -9,15 +9,15 @@
from marionette_driver import By, Wait
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
import testsuite
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def setUp(self):
FirefoxTestCase.setUp(self)
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
def test_searchengines(self):
......
from marionette_driver import By
from marionette_driver.errors import MarionetteException
from firefox_ui_harness import FirefoxTestCase
from marionette import MarionetteTestCase
import testsuite
class Test(FirefoxTestCase):
class Test(MarionetteTestCase):
def setUp(self):
FirefoxTestCase.setUp(self)
MarionetteTestCase.setUp(self)
ts = testsuite.TestSuite()
self.ts = ts
......@@ -212,8 +212,8 @@ class Test(FirefoxTestCase):
errors = ''
for name, val in settings.iteritems():
if self.prefs.get_pref(name) != val:
errors += "%s: %s != %s\n" % (name, self.prefs.get_pref(name), val)
if self.marionette.get_pref(name) != val:
errors += "%s: %s != %s\n" % (name, self.marionette.get_pref(name), val)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment