Python 3: Fix some old-style/urlparse imports.
diff --git a/tools/wpt/browser.py b/tools/wpt/browser.py
index 3ee98d9..6dd2f5c 100644
--- a/tools/wpt/browser.py
+++ b/tools/wpt/browser.py
@@ -6,14 +6,14 @@
 import errno
 import subprocess
 import tempfile
-import urlparse
 from abc import ABCMeta, abstractmethod
 from datetime import datetime, timedelta
 from distutils.spawn import find_executable
 
+from six.moves.urllib.parse import urlsplit
 import requests
 
-from utils import call, get, untar, unzip
+from .utils import call, get, untar, unzip
 
 uname = platform.uname()
 
@@ -172,7 +172,7 @@
                 filename = filenames[0]
 
         if not filename:
-            filename = urlparse.urlsplit(resp.url).path.rsplit("/", 1)[1]
+            filename = urlsplit(resp.url).path.rsplit("/", 1)[1]
 
         if not filename:
             filename = "firefox.tar.bz2"
diff --git a/tools/wpt/install.py b/tools/wpt/install.py
index 24915f0..3da697e 100644
--- a/tools/wpt/install.py
+++ b/tools/wpt/install.py
@@ -1,6 +1,6 @@
 import argparse
-import browser
 import sys
+from . import browser
 
 
 latest_channels = {
diff --git a/tools/wptrunner/wptrunner/executors/executormarionette.py b/tools/wptrunner/wptrunner/executors/executormarionette.py
index 0130639..837329f 100644
--- a/tools/wptrunner/wptrunner/executors/executormarionette.py
+++ b/tools/wptrunner/wptrunner/executors/executormarionette.py
@@ -3,9 +3,10 @@
 import threading
 import time
 import traceback
-import urlparse
 import uuid
 
+from six.moves.urllib.parse import urljoin
+
 errors = None
 marionette = None
 pytestrunner = None
@@ -132,8 +133,7 @@
         # Check if we previously had a test window open, and if we did make sure it's closed
         if self.runner_handle:
             self._close_windows()
-        url = urlparse.urljoin(self.parent.executor.server_url(url_protocol),
-                               "/testharness_runner.html")
+        url = urljoin(self.parent.executor.server_url(url_protocol), "/testharness_runner.html")
         self.logger.debug("Loading %s" % url)
         try:
             self.dismiss_alert(lambda: self.marionette.navigate(url))
@@ -893,7 +893,7 @@
     def setup(self, screenshot="unexpected"):
         data = {"screenshot": screenshot}
         if self.executor.group_metadata is not None:
-            data["urlCount"] = {urlparse.urljoin(self.executor.server_url(key[0]), key[1]):value
+            data["urlCount"] = {urljoin(self.executor.server_url(key[0]), key[1]):value
                                 for key, value in self.executor.group_metadata.get("url_count", {}).iteritems()
                                 if value > 1}
         self.executor.protocol.marionette.set_context(self.executor.protocol.marionette.CONTEXT_CHROME)
diff --git a/tools/wptrunner/wptrunner/wpttest.py b/tools/wptrunner/wptrunner/wpttest.py
index d650e98..bff61f3 100644
--- a/tools/wptrunner/wptrunner/wpttest.py
+++ b/tools/wptrunner/wptrunner/wpttest.py
@@ -93,7 +93,7 @@
         self._update_mozinfo(metadata_root)
         self.update(mozinfo.info)
 
-        from update.tree import GitTree
+        from .update.tree import GitTree
         try:
             # GitTree.__init__ throws if we are not in a git tree.
             rev = GitTree(log_error=False).rev