Bug 1500001 -Fix some differences with upstream in wpt tooling, r=automatedtester
authorJames Graham <james@hoppipolla.co.uk>
Thu, 18 Oct 2018 13:42:43 +0000
changeset 500387 048da8a3c95146d4d94d8a8a47d2ff723792abdf
parent 500386 7cf3a024e668a21da95252827dca09e193e6f3e7
child 500388 2025f3b4871b7030c10a69b2386d1fe406774bf8
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester
bugs1500001
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1500001 -Fix some differences with upstream in wpt tooling, r=automatedtester These came from a combination of botched merges and cases where we fixed up a commit for upstream CI failures and didn't apply the changes correctly. Differential Revision: https://phabricator.services.mozilla.com/D9081
testing/web-platform/tests/tools/manifest/tests/test_manifest.py
testing/web-platform/tests/tools/manifest/update.py
testing/web-platform/tests/tools/webdriver/webdriver/__init__.py
testing/web-platform/tests/tools/wpt/browser.py
testing/web-platform/tests/tools/wpt/run.py
testing/web-platform/tests/tools/wpt/wpt.py
testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/base.py
--- a/testing/web-platform/tests/tools/manifest/tests/test_manifest.py
+++ b/testing/web-platform/tests/tools/manifest/tests/test_manifest.py
@@ -1,9 +1,8 @@
-import platform
 import os
 
 import mock
 
 import hypothesis as h
 import hypothesis.strategies as hs
 
 import pytest
--- a/testing/web-platform/tests/tools/manifest/update.py
+++ b/testing/web-platform/tests/tools/manifest/update.py
@@ -1,13 +1,11 @@
 #!/usr/bin/env python
 import argparse
-import imp
 import os
-import sys
 
 import manifest
 from . import vcs
 from .log import get_logger
 from .download import download_from_github
 
 here = os.path.dirname(__file__)
 
--- a/testing/web-platform/tests/tools/webdriver/webdriver/__init__.py
+++ b/testing/web-platform/tests/tools/webdriver/webdriver/__init__.py
@@ -1,9 +1,10 @@
 # flake8: noqa
+
 from client import (
     Cookies,
     Element,
     Find,
     Frame,
     Session,
     Timeouts,
     Window)
--- a/testing/web-platform/tests/tools/wpt/browser.py
+++ b/testing/web-platform/tests/tools/wpt/browser.py
@@ -1,22 +1,19 @@
 import logging
 import os
 import platform
 import re
 import shutil
 import stat
 import subprocess
-import sys
 import tempfile
 from abc import ABCMeta, abstractmethod
-from ConfigParser import RawConfigParser
 from datetime import datetime, timedelta
 from distutils.spawn import find_executable
-from io import BytesIO
 
 from utils import call, get, untar, unzip
 
 logger = logging.getLogger(__name__)
 
 uname = platform.uname()
 
 
@@ -651,20 +648,16 @@ class Safari(Browser):
     def version(self, binary):
         return None
 
 
 class SafariWebDriver(Safari):
     product = "safari_webdriver"
 
 
-class SafariWebDriver(Safari):
-    product = "safari_webdriver"
-
-
 class Servo(Browser):
     """Servo-specific interface."""
 
     product = "servo"
     requirements = "requirements_servo.txt"
 
     def platform_components(self):
         platform = {
--- a/testing/web-platform/tests/tools/wpt/run.py
+++ b/testing/web-platform/tests/tools/wpt/run.py
@@ -1,15 +1,12 @@
 import argparse
 import os
 import platform
-import shutil
-import subprocess
 import sys
-import tarfile
 from distutils.spawn import find_executable
 
 wpt_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
 sys.path.insert(0, os.path.abspath(os.path.join(wpt_root, "tools")))
 
 from . import browser, install, utils, virtualenv
 from ..serve import serve
 
@@ -290,20 +287,16 @@ class ChromeAndroid(BrowserSetup):
                 print("Using webdriver binary %s" % webdriver_binary)
 
             if webdriver_binary:
                 kwargs["webdriver_binary"] = webdriver_binary
             else:
                 raise WptrunError("Unable to locate or install chromedriver binary")
 
 
-class ChromeWebDriver(Chrome):
-    name = "chrome_webdriver"
-    browser_cls = browser.ChromeWebDriver
-
 class Opera(BrowserSetup):
     name = "opera"
     browser_cls = browser.Opera
 
     def setup_kwargs(self, kwargs):
         if kwargs["webdriver_binary"] is None:
             webdriver_binary = self.browser.find_webdriver()
 
@@ -343,21 +336,16 @@ https://developer.microsoft.com/en-us/mi
             kwargs["webdriver_binary"] = webdriver_binary
 
 
 class EdgeWebDriver(Edge):
     name = "edge_webdriver"
     browser_cls = browser.EdgeWebDriver
 
 
-class EdgeWebDriver(Edge):
-    name = "edge_webdriver"
-    browser_cls = browser.EdgeWebDriver
-
-
 class InternetExplorer(BrowserSetup):
     name = "ie"
     browser_cls = browser.InternetExplorer
 
     def install(self, venv, channel=None):
         raise NotImplementedError
 
     def setup_kwargs(self, kwargs):
@@ -391,21 +379,16 @@ class Safari(BrowserSetup):
             kwargs["webdriver_binary"] = webdriver_binary
 
 
 class SafariWebDriver(Safari):
     name = "safari_webdriver"
     browser_cls = browser.SafariWebDriver
 
 
-class SafariWebDriver(Safari):
-    name = "safari_webdriver"
-    browser_cls = browser.SafariWebDriver
-
-
 class Sauce(BrowserSetup):
     name = "sauce"
     browser_cls = browser.Sauce
 
     def install(self, venv, channel=None):
         raise NotImplementedError
 
     def setup_kwargs(self, kwargs):
@@ -548,13 +531,13 @@ def main():
 
         return run(venv, vars(args))
     except WptrunError as e:
         exit(e.message)
 
 
 if __name__ == "__main__":
     import pdb
-    from tools import localpaths
+    from tools import localpaths  # noqa: flake8
     try:
         main()
     except Exception:
         pdb.post_mortem()
--- a/testing/web-platform/tests/tools/wpt/wpt.py
+++ b/testing/web-platform/tests/tools/wpt/wpt.py
@@ -1,15 +1,15 @@
 import argparse
 import json
 import logging
 import os
 import sys
 
-from tools import localpaths  #noqa: flake8
+from tools import localpaths  # noqa: flake8
 
 from six import iteritems
 from . import virtualenv
 
 
 here = os.path.dirname(__file__)
 wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir))
 
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/base.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/base.py
@@ -1,15 +1,15 @@
 import os
 import platform
 import socket
 from abc import ABCMeta, abstractmethod
 from copy import deepcopy
 
-from ..wptcommandline import require_arg
+from ..wptcommandline import require_arg  # noqa: F401
 
 here = os.path.split(__file__)[0]
 
 
 def inherit(super_module, child_globals, product_name):
     super_wptrunner = super_module.__wptrunner__
     child_globals["__wptrunner__"] = child_wptrunner = deepcopy(super_wptrunner)