aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2016-11-03 14:15:47 -0400
committerJosh Matthews <josh@joshmatthews.net>2016-11-03 14:15:47 -0400
commitb8c425e12f201b8b557f5eec54b119285ac3c58e (patch)
tree1789ea904baa0a157fd43551e4cd757b4f4d4901
parent6ef46ab9e4ec08d5f5226d41f0cac77c3584bae9 (diff)
downloadservo-b8c425e12f201b8b557f5eec54b119285ac3c58e.tar.gz
servo-b8c425e12f201b8b557f5eec54b119285ac3c58e.zip
Update wptrunner to b79dc999a4c1a3cc46f9db7476cf3cf38809c2b5.
-rw-r--r--tests/wpt/harness/requirements_servo.txt1
-rw-r--r--tests/wpt/harness/wptrunner/browsers/firefox.py1
-rw-r--r--tests/wpt/harness/wptrunner/testharnessreport-servo.js5
-rw-r--r--tests/wpt/harness/wptrunner/wptmanifest/parser.py16
-rw-r--r--tests/wpt/harness/wptrunner/wptmanifest/tests/test_conditional.py3
-rw-r--r--tests/wpt/harness/wptrunner/wptmanifest/tests/test_static.py3
6 files changed, 15 insertions, 14 deletions
diff --git a/tests/wpt/harness/requirements_servo.txt b/tests/wpt/harness/requirements_servo.txt
index 903c07f1b73..22bcfa123a5 100644
--- a/tests/wpt/harness/requirements_servo.txt
+++ b/tests/wpt/harness/requirements_servo.txt
@@ -1,2 +1 @@
mozprocess >= 0.19
-
diff --git a/tests/wpt/harness/wptrunner/browsers/firefox.py b/tests/wpt/harness/wptrunner/browsers/firefox.py
index a3c6f3f5753..ab75eb5ce50 100644
--- a/tests/wpt/harness/wptrunner/browsers/firefox.py
+++ b/tests/wpt/harness/wptrunner/browsers/firefox.py
@@ -130,6 +130,7 @@ class FirefoxBrowser(Browser):
"marionette.defaultPrefs.port": self.marionette_port,
"dom.disable_open_during_load": False,
"network.dns.localDomains": ",".join(hostnames),
+ "network.proxy.type": 0,
"places.history.enabled": False})
if self.e10s:
self.profile.set_preferences({"browser.tabs.remote.autostart": True})
diff --git a/tests/wpt/harness/wptrunner/testharnessreport-servo.js b/tests/wpt/harness/wptrunner/testharnessreport-servo.js
index 6464436c339..f5fda2c6614 100644
--- a/tests/wpt/harness/wptrunner/testharnessreport-servo.js
+++ b/tests/wpt/harness/wptrunner/testharnessreport-servo.js
@@ -3,11 +3,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var props = {output:%(output)d};
-
+var start_loc = document.createElement('a');
+start_loc.href = location.href;
setup(props);
add_completion_callback(function (tests, harness_status) {
- var id = location.pathname + location.search + location.hash;
+ var id = start_loc.pathname + start_loc.search + start_loc.hash;
console.log("ALERT: RESULT: " + JSON.stringify([
id,
harness_status.status,
diff --git a/tests/wpt/harness/wptrunner/wptmanifest/parser.py b/tests/wpt/harness/wptrunner/wptmanifest/parser.py
index eeac66d3180..f52deb9c124 100644
--- a/tests/wpt/harness/wptrunner/wptmanifest/parser.py
+++ b/tests/wpt/harness/wptrunner/wptmanifest/parser.py
@@ -16,6 +16,8 @@
# TODO: keep comments in the tree
+from __future__ import unicode_literals
+
import types
from cStringIO import StringIO
@@ -48,8 +50,9 @@ atoms = {"True": True,
"False": False,
"Reset": object()}
-def decode(byte_str):
- return byte_str.decode("utf8")
+def decode(s):
+ assert isinstance(s, unicode)
+ return s
def precedence(operator_node):
@@ -76,7 +79,8 @@ class Tokenizer(object):
def tokenize(self, stream):
self.reset()
- if type(stream) in types.StringTypes:
+ assert not isinstance(stream, unicode)
+ if isinstance(stream, str):
stream = StringIO(stream)
if not hasattr(stream, "name"):
self.filename = ""
@@ -85,13 +89,15 @@ class Tokenizer(object):
self.next_line_state = self.line_start_state
for i, line in enumerate(stream):
+ assert isinstance(line, str)
self.state = self.next_line_state
assert self.state is not None
states = []
self.next_line_state = None
self.line_number = i + 1
self.index = 0
- self.line = line.rstrip()
+ self.line = line.decode('utf-8').rstrip()
+ assert isinstance(self.line, unicode)
while self.state != self.eol_state:
states.append(self.state)
tokens = self.state()
@@ -474,7 +480,7 @@ class Tokenizer(object):
value += self.escape_value(c)
self.consume()
- return unichr(value).encode("utf8")
+ return unichr(value)
def escape_value(self, c):
if '0' <= c <= '9':
diff --git a/tests/wpt/harness/wptrunner/wptmanifest/tests/test_conditional.py b/tests/wpt/harness/wptrunner/wptmanifest/tests/test_conditional.py
index af18f4acc71..628e8a4c663 100644
--- a/tests/wpt/harness/wptrunner/wptmanifest/tests/test_conditional.py
+++ b/tests/wpt/harness/wptrunner/wptmanifest/tests/test_conditional.py
@@ -11,9 +11,6 @@ from ..node import BinaryExpressionNode, BinaryOperatorNode, VariableNode, Numbe
class TestConditional(unittest.TestCase):
- def parse(self, input_str):
- return self.parser.parse(StringIO(input_str))
-
def compile(self, input_text):
return conditional.compile(input_text)
diff --git a/tests/wpt/harness/wptrunner/wptmanifest/tests/test_static.py b/tests/wpt/harness/wptrunner/wptmanifest/tests/test_static.py
index 5bd270d9f51..d28765edac9 100644
--- a/tests/wpt/harness/wptrunner/wptmanifest/tests/test_static.py
+++ b/tests/wpt/harness/wptrunner/wptmanifest/tests/test_static.py
@@ -13,9 +13,6 @@ from ..backends import static
class TestStatic(unittest.TestCase):
- def parse(self, input_str):
- return self.parser.parse(StringIO(input_str))
-
def compile(self, input_text, input_data):
return static.compile(input_text, input_data)