Bug 1225909 - Update web-platform-tests to revision 623c1536821f7536d8ee2859bbeaf0d9738ea707, a=testonly
authorJames Graham <james@hoppipolla.co.uk>
Mon, 16 Nov 2015 17:03:31 +0000
changeset 273108 52daae1502f101f92442a6a51e235bb4d39f830e
parent 273107 8a5885fca6ae8cbf5610549150a5a3f559504ba4
child 273109 26be6acedc4084f13fbdf7598827b02528a15ec3
push id68170
push userjames@hoppipolla.co.uk
push dateWed, 18 Nov 2015 17:21:49 +0000
treeherdermozilla-inbound@26be6acedc40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1225909
milestone45.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 1225909 - Update web-platform-tests to revision 623c1536821f7536d8ee2859bbeaf0d9738ea707, a=testonly
testing/web-platform/meta/MANIFEST.json
testing/web-platform/meta/mozilla-sync
testing/web-platform/tests/.gitmodules
testing/web-platform/tests/content-security-policy/blink-contrib/self-doesnt-match-blob.sub.html
testing/web-platform/tests/content-security-policy/blink-contrib/star-doesnt-match-blob.sub.html
testing/web-platform/tests/hr-time/basic.worker.js
testing/web-platform/tests/mixed-content/generic/common.js
testing/web-platform/tests/tools/.gitignore
testing/web-platform/tests/tools/manifest/item.py
testing/web-platform/tests/url/resources/testharness-extras.js
testing/web-platform/tests/url/urlsearchparams-append.html
testing/web-platform/tests/url/urlsearchparams-constructor.html
testing/web-platform/tests/url/urlsearchparams-delete.html
testing/web-platform/tests/url/urlsearchparams-get.html
testing/web-platform/tests/url/urlsearchparams-getall.html
testing/web-platform/tests/url/urlsearchparams-has.html
testing/web-platform/tests/url/urlsearchparams-set.html
testing/web-platform/tests/url/urlsearchparams-stringifier.html
testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm
testing/web-platform/tests/workers/constructors/SharedWorker/same-origin.html
testing/web-platform/tests/workers/constructors/Worker/same-origin.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -14677,16 +14677,20 @@
         "path": "geolocation-API/watchPosition_permission_deny.html",
         "url": "/geolocation-API/watchPosition_permission_deny.html"
       },
       {
         "path": "hr-time/basic.html",
         "url": "/hr-time/basic.html"
       },
       {
+        "path": "hr-time/basic.worker.js",
+        "url": "/hr-time/basic.worker"
+      },
+      {
         "path": "hr-time/idlharness.html",
         "url": "/hr-time/idlharness.html"
       },
       {
         "path": "hr-time/monotonic-clock.html",
         "url": "/hr-time/monotonic-clock.html"
       },
       {
@@ -26241,16 +26245,48 @@
         "path": "url/interfaces.html",
         "url": "/url/interfaces.html"
       },
       {
         "path": "url/url-constructor.html",
         "url": "/url/url-constructor.html"
       },
       {
+        "path": "url/urlsearchparams-append.html",
+        "url": "/url/urlsearchparams-append.html"
+      },
+      {
+        "path": "url/urlsearchparams-constructor.html",
+        "url": "/url/urlsearchparams-constructor.html"
+      },
+      {
+        "path": "url/urlsearchparams-delete.html",
+        "url": "/url/urlsearchparams-delete.html"
+      },
+      {
+        "path": "url/urlsearchparams-get.html",
+        "url": "/url/urlsearchparams-get.html"
+      },
+      {
+        "path": "url/urlsearchparams-getall.html",
+        "url": "/url/urlsearchparams-getall.html"
+      },
+      {
+        "path": "url/urlsearchparams-has.html",
+        "url": "/url/urlsearchparams-has.html"
+      },
+      {
+        "path": "url/urlsearchparams-set.html",
+        "url": "/url/urlsearchparams-set.html"
+      },
+      {
+        "path": "url/urlsearchparams-stringifier.html",
+        "url": "/url/urlsearchparams-stringifier.html"
+      },
+      {
         "path": "user-timing/idlharness.html",
         "url": "/user-timing/idlharness.html"
       },
       {
         "path": "user-timing/test_user_timing_clear_marks.html",
         "url": "/user-timing/test_user_timing_clear_marks.html"
       },
       {
@@ -35415,12 +35451,12 @@
             "/webvtt/rendering/cues-with-video/processing-model/too_many_cues_wrapped-ref.html",
             "=="
           ]
         ],
         "url": "/webvtt/rendering/cues-with-video/processing-model/too_many_cues_wrapped.html"
       }
     ]
   },
-  "rev": "a5f15d6bdbeeec010465dc906e542873d64797ec",
+  "rev": "623c1536821f7536d8ee2859bbeaf0d9738ea707",
   "url_base": "/",
   "version": 2
 }
--- a/testing/web-platform/meta/mozilla-sync
+++ b/testing/web-platform/meta/mozilla-sync
@@ -1,1 +1,1 @@
-1e125923b6586c58492f54dc396e6cbfd09c6ae2
\ No newline at end of file
+f0cc59cdba5802f6981f9325129c4ac4f3c7b805
\ No newline at end of file
--- a/testing/web-platform/tests/.gitmodules
+++ b/testing/web-platform/tests/.gitmodules
@@ -1,7 +1,8 @@
 [submodule "resources"]
 	path = resources
 	url = https://github.com/w3c/testharness.js.git
 	ignore = dirty
 [submodule "tools"]
 	path = tools
 	url = https://github.com/w3c/wpt-tools.git
+	ignore = dirty
\ No newline at end of file
--- a/testing/web-platform/tests/content-security-policy/blink-contrib/self-doesnt-match-blob.sub.html
+++ b/testing/web-platform/tests/content-security-policy/blink-contrib/self-doesnt-match-blob.sub.html
@@ -26,16 +26,20 @@ connect-src 'self'; script-src 'self' 'u
                 "postMessage('TEST COMPLETE');"
                 ],
                 {type : 'application/javascript'});
             var url = URL.createObjectURL(blob);
             var worker = new Worker(url);
             worker.onmessage = function(event) {
                 alert_assert(event.data);
             };
+            worker.onerror = function(event) {
+                alert_assert('TEST COMPLETE');
+                event.preventDefault();
+            }
         } catch (e) {
             alert_assert('TEST COMPLETE');
         }
         function timeout() {
             alert_assert('TEST COMPLETE');
         }
     </script>
     <div id="log"></div>
--- a/testing/web-platform/tests/content-security-policy/blink-contrib/star-doesnt-match-blob.sub.html
+++ b/testing/web-platform/tests/content-security-policy/blink-contrib/star-doesnt-match-blob.sub.html
@@ -26,16 +26,20 @@ connect-src 'self'; script-src 'self' 'u
                 "postMessage('TEST COMPLETE');"
                 ],
                 {type : 'application/javascript'});
             var url = URL.createObjectURL(blob);
             var worker = new Worker(url);
             worker.onmessage = function(event) {
                 alert_assert(event.data);
             };
+            worker.onerror = function(event) {
+                event.preventDefault();
+                alert_assert('TEST COMPLETE');
+            }
         } catch (e) {
             alert_assert('TEST COMPLETE');
         }
         function timeout() {
             alert_assert('TEST COMPLETE');
         }
     </script>
     <div id="log"></div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/hr-time/basic.worker.js
@@ -0,0 +1,18 @@
+importScripts("/resources/testharness.js");
+
+test(function() {
+  assert_true((performance !== undefined), "WorkerGlobalScope.performance exists");
+  assert_equals((typeof performance.now), "function");
+}, "WorkerGlobalScope.performance.now() is a function");
+
+test(function() {
+  assert_true(performance.now() > 0);
+}, "WorkerGlobalScope.performance.now() returns a positive number");
+
+test(function() {
+    var now1 = performance.now();
+    var now2 = performance.now();
+    assert_true((now2-now1) >= 0);
+  }, "WorkerGlobalScope.performance.now() difference is not negative");
+
+done();
--- a/testing/web-platform/tests/mixed-content/generic/common.js
+++ b/testing/web-platform/tests/mixed-content/generic/common.js
@@ -78,17 +78,18 @@ function setAttributes(el, attrs) {
  * @param {object} element An object supporting events on which to bind the
  *     promise.
  * @param {string} resolveEventName [="load"] The event name to bind resolve to.
  * @param {string} rejectEventName [="error"] The event name to bind reject to.
  */
 function bindEvents(element, resolveEventName, rejectEventName) {
   element.eventPromise = new Promise(function(resolve, reject) {
     element.addEventListener(resolveEventName  || "load", resolve);
-    element.addEventListener(rejectEventName || "error", reject);
+    element.addEventListener(rejectEventName || "error",
+                             function(e) { e.preventDefault(); reject(); } );
   });
 }
 
 /**
  * Creates a new DOM element.
  * @param {string} tagName The type of the DOM element.
  * @param {object} attrs A JSON with attributes to apply to the element.
  * @param {DOMElement} parent Optional - an existing DOM element to append to
--- a/testing/web-platform/tests/tools/.gitignore
+++ b/testing/web-platform/tests/tools/.gitignore
@@ -1,6 +1,6 @@
 *#
 *.py[co]
 *.sw[po]
 *~
 \#*
-
+runner/MANIFEST.json
--- a/testing/web-platform/tests/tools/manifest/item.py
+++ b/testing/web-platform/tests/tools/manifest/item.py
@@ -1,27 +1,38 @@
+import os
 import urlparse
 from abc import ABCMeta, abstractmethod, abstractproperty
 
 item_types = ["testharness", "reftest", "manual", "stub", "wdspec"]
 
+
+def from_os_path(path):
+    return path.replace(os.path.sep, "/")
+
+
+def to_os_path(path):
+    return path.replace("/", os.path.sep)
+
+
 def get_source_file(source_files, tests_root, manifest, path):
     def make_new():
         from sourcefile import SourceFile
 
         return SourceFile(tests_root, path, manifest.url_base)
 
     if source_files is None:
         return make_new()
 
     if path not in source_files:
         source_files[path] = make_new()
 
     return source_files[path]
 
+
 class ManifestItem(object):
     __metaclass__ = ABCMeta
 
     item_type = None
 
     def __init__(self, source_file, manifest=None):
         self.manifest = manifest
         self.source_file = source_file
@@ -53,17 +64,17 @@ class ManifestItem(object):
         if not hasattr(other, "key"):
             return False
         return self.key() == other.key()
 
     def __hash__(self):
         return hash(self.key() + self.meta_key())
 
     def to_json(self):
-        return {"path": self.path}
+        return {"path": from_os_path(self.path)}
 
     @classmethod
     def from_json(self, manifest, tests_root, obj, source_files=None):
         raise NotImplementedError
 
 
 class URLManifestItem(ManifestItem):
     def __init__(self, source_file, url, url_base="/", manifest=None):
@@ -81,17 +92,18 @@ class URLManifestItem(ManifestItem):
 
     def to_json(self):
         rv = ManifestItem.to_json(self)
         rv["url"] = self._url
         return rv
 
     @classmethod
     def from_json(cls, manifest, tests_root, obj, source_files=None):
-        source_file = get_source_file(source_files, tests_root, manifest, obj["path"])
+        source_file = get_source_file(source_files, tests_root, manifest,
+                                      to_os_path(obj["path"]))
         return cls(source_file,
                    obj["url"],
                    url_base=manifest.url_base,
                    manifest=manifest)
 
 
 class TestharnessTest(URLManifestItem):
     item_type = "testharness"
@@ -106,17 +118,18 @@ class TestharnessTest(URLManifestItem):
     def to_json(self):
         rv = URLManifestItem.to_json(self)
         if self.timeout is not None:
             rv["timeout"] = self.timeout
         return rv
 
     @classmethod
     def from_json(cls, manifest, tests_root, obj, source_files=None):
-        source_file = get_source_file(source_files, tests_root, manifest, obj["path"])
+        source_file = get_source_file(source_files, tests_root, manifest,
+                                      to_os_path(obj["path"]))
         return cls(source_file,
                    obj["url"],
                    url_base=manifest.url_base,
                    timeout=obj.get("timeout"),
                    manifest=manifest)
 
 
 class RefTest(URLManifestItem):
@@ -142,17 +155,18 @@ class RefTest(URLManifestItem):
         rv = URLManifestItem.to_json(self)
         rv["references"] = self.references
         if self.timeout is not None:
             rv["timeout"] = self.timeout
         return rv
 
     @classmethod
     def from_json(cls, manifest, tests_root, obj, source_files=None):
-        source_file = get_source_file(source_files, tests_root, manifest, obj["path"])
+        source_file = get_source_file(source_files, tests_root, manifest,
+                                      to_os_path(obj["path"]))
         return cls(source_file,
                    obj["url"],
                    obj["references"],
                    url_base=manifest.url_base,
                    timeout=obj.get("timeout"),
                    manifest=manifest)
 
 
@@ -166,10 +180,11 @@ class WebdriverSpecTest(ManifestItem):
     item_type = "wdspec"
 
     @property
     def id(self):
         return self.path
 
     @classmethod
     def from_json(cls, manifest, tests_root, obj, source_files=None):
-        source_file = get_source_file(source_files, tests_root, manifest, obj["path"])
+        source_file = get_source_file(source_files, tests_root, manifest,
+                                      to_os_path(obj["path"]))
         return cls(source_file, manifest=manifest)
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/url/resources/testharness-extras.js
@@ -0,0 +1,11 @@
+/*
+Extending the W3C testharness.js with locally useful functionality.
+*/
+
+function assert_type_error(f, msg) {
+    assert_throws(TypeError(), f, msg);
+}
+
+function assert_syntax_error(f, msg) {
+    assert_throws(SyntaxError(), f, msg);
+}
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/url/urlsearchparams-append.html
@@ -0,0 +1,51 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf8">
+<link rel="help" href="http://url.spec.whatwg.org/#dom-urlsearchparams-append">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/testharness-extras.js"></script>
+<script>
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', 'b');
+    assert_equals(params + '', 'a=b');
+    params.append('a', 'b');
+    assert_equals(params + '', 'a=b&a=b');
+    params.append('a', 'c');
+    assert_equals(params + '', 'a=b&a=b&a=c');
+}, 'Append same name');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('', '');
+    assert_equals(params + '', '=');
+    params.append('', '');
+    assert_equals(params + '', '=&=');
+}, 'Append empty strings');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append(null, null);
+    assert_equals(params + '', 'null=null');
+    params.append(null, null);
+    assert_equals(params + '', 'null=null&null=null');
+}, 'Append null');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('first', 1);
+    params.append('second', 2);
+    params.append('third', '');
+    params.append('first', 10);
+    assert_true(params.has('first'), 'Search params object has name "first"');
+    assert_equals(params.get('first'), '1', 'Search params object has name "first" with value "1"');
+    assert_equals(params.get('second'), '2', 'Search params object has name "second" with value "2"');
+    assert_equals(params.get('third'), '', 'Search params object has name "third" with value ""');
+    params.append('first', 10);
+    assert_equals(params.get('first'), '1', 'Search params object has name "first" with value "1"');
+}, 'Append multiple');
+</script>
+</head>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/url/urlsearchparams-constructor.html
@@ -0,0 +1,129 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf8">
+<link rel="help" href="http://url.spec.whatwg.org/#urlsearchparams">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/testharness-extras.js"></script>
+<script>
+test(function() {
+    var params = new URLSearchParams();
+    assert_equals(params + '', '');
+    params = new URLSearchParams('');
+    assert_equals(params + '', '');
+    params = new URLSearchParams('a=b');
+    assert_equals(params + '', 'a=b');
+    params = new URLSearchParams(params);
+    assert_equals(params + '', 'a=b');
+}, 'Basic URLSearchParams construction');
+
+test(function() {
+    assert_type_error(function () { URLSearchParams(); }, 'Failed to construct \'URLSearchParams\': Please use the \'new\' operator, this DOM object constructor cannot be called as a function.');
+    assert_type_error(function () { new URLSearchParams(DOMException.prototype); });
+    var params = new URLSearchParams('');
+    assert_true(params != null, 'constructor returned non-null value.');
+    assert_equals(params.__proto__, URLSearchParams.prototype, 'expected URLSearchParams.prototype as prototype.');
+    params = new URLSearchParams({});
+    assert_equals(params + '', '%5Bobject+Object%5D=');
+}, 'URLSearchParams constructor, empty.');
+
+test(function() {
+    var params = new URLSearchParams('a=b');
+    assert_true(params != null, 'constructor returned non-null value.');
+    assert_true(params.has('a'), 'Search params object has name "a"');
+    assert_false(params.has('b'), 'Search params object has not got name "b"');
+    var params = new URLSearchParams('a=b&c');
+    assert_true(params != null, 'constructor returned non-null value.');
+    assert_true(params.has('a'), 'Search params object has name "a"');
+    assert_true(params.has('c'), 'Search params object has name "c"');
+    var params = new URLSearchParams('&a&&& &&&&&a+b=& c&m%c3%b8%c3%b8');
+    assert_true(params != null, 'constructor returned non-null value.');
+    assert_true(params.has('a'), 'Search params object has name "a"');
+    assert_true(params.has('a b'), 'Search params object has name "a b"');
+    assert_true(params.has(' '), 'Search params object has name " "');
+    assert_false(params.has('c'), 'Search params object did not have the name "c"');
+    assert_true(params.has(' c'), 'Search params object has name " c"');
+    assert_true(params.has('møø'), 'Search params object has name "møø"');
+}, 'URLSearchParams constructor, string.');
+
+test(function() {
+    var seed = new URLSearchParams('a=b&c=d');
+    var params = new URLSearchParams(seed);
+    assert_true(params != null, 'constructor returned non-null value.');
+    assert_equals(params.get('a'), 'b');
+    assert_equals(params.get('c'), 'd');
+    assert_false(params.has('d'));
+    // The name-value pairs are copied when created; later updates
+    // should not be observable.
+    seed.append('e', 'f');
+    assert_false(params.has('e'));
+    params.append('g', 'h');
+    assert_false(seed.has('g'));
+}, 'URLSearchParams constructor, object.');
+
+test(function() {
+    var params = new URLSearchParams('a=b+c');
+    assert_equals(params.get('a'), 'b c');
+    params = new URLSearchParams('a+b=c');
+    assert_equals(params.get('a b'), 'c');
+}, 'Parse +');
+
+test(function() {
+    var params = new URLSearchParams('a=b c');
+    assert_equals(params.get('a'), 'b c');
+    params = new URLSearchParams('a b=c');
+    assert_equals(params.get('a b'), 'c');
+}, 'Parse space');
+
+test(function() {
+    var params = new URLSearchParams('a=b%20c');
+    assert_equals(params.get('a'), 'b c');
+    params = new URLSearchParams('a%20b=c');
+    assert_equals(params.get('a b'), 'c');
+}, 'Parse %20');
+
+test(function() {
+    var params = new URLSearchParams('a=b\0c');
+    assert_equals(params.get('a'), 'b\0c');
+    params = new URLSearchParams('a\0b=c');
+    assert_equals(params.get('a\0b'), 'c');
+}, 'Parse \\0');
+
+test(function() {
+    var params = new URLSearchParams('a=b%00c');
+    assert_equals(params.get('a'), 'b\0c');
+    params = new URLSearchParams('a%00b=c');
+    assert_equals(params.get('a\0b'), 'c');
+}, 'Parse %00');
+
+test(function() {
+    var params = new URLSearchParams('a=b\u2384');
+    assert_equals(params.get('a'), 'b\u2384');
+    params = new URLSearchParams('a\u2384b=c');
+    assert_equals(params.get('a\u2384b'), 'c');
+}, 'Parse \u2384');  // Unicode Character 'COMPOSITION SYMBOL' (U+2384)
+
+test(function() {
+    var params = new URLSearchParams('a=b%e2%8e%84');
+    assert_equals(params.get('a'), 'b\u2384');
+    params = new URLSearchParams('a%e2%8e%84b=c');
+    assert_equals(params.get('a\u2384b'), 'c');
+}, 'Parse %e2%8e%84');  // Unicode Character 'COMPOSITION SYMBOL' (U+2384)
+
+test(function() {
+    var params = new URLSearchParams('a=b\uD83D\uDCA9c');
+    assert_equals(params.get('a'), 'b\uD83D\uDCA9c');
+    params = new URLSearchParams('a\uD83D\uDCA9b=c');
+    assert_equals(params.get('a\uD83D\uDCA9b'), 'c');
+}, 'Parse \uD83D\uDCA9');  // Unicode Character 'PILE OF POO' (U+1F4A9)
+
+test(function() {
+    var params = new URLSearchParams('a=b%f0%9f%92%a9c');
+    assert_equals(params.get('a'), 'b\uD83D\uDCA9c');
+    params = new URLSearchParams('a%f0%9f%92%a9b=c');
+    assert_equals(params.get('a\uD83D\uDCA9b'), 'c');
+}, 'Parse %f0%9f%92%a9');  // Unicode Character 'PILE OF POO' (U+1F4A9)
+</script>
+</head>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/url/urlsearchparams-delete.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf8">
+<link rel="help" href="http://url.spec.whatwg.org/#dom-urlsearchparams-delete">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/testharness-extras.js"></script>
+<script>
+test(function() {
+    var params = new URLSearchParams('a=b&c=d');
+    params.delete('a');
+    assert_equals(params + '', 'c=d');
+    params = new URLSearchParams('a=a&b=b&a=a&c=c');
+    params.delete('a');
+    assert_equals(params + '', 'b=b&c=c');
+    params = new URLSearchParams('a=a&=&b=b&c=c');
+    params.delete('');
+    assert_equals(params + '', 'a=a&b=b&c=c');
+    params = new URLSearchParams('a=a&null=null&b=b');
+    params.delete(null);
+    assert_equals(params + '', 'a=a&b=b');
+    params = new URLSearchParams('a=a&undefined=undefined&b=b');
+    params.delete(undefined);
+    assert_equals(params + '', 'a=a&b=b');
+}, 'Delete basics');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('first', 1);
+    assert_true(params.has('first'), 'Search params object has name "first"');
+    assert_equals(params.get('first'), '1', 'Search params object has name "first" with value "1"');
+    params.delete('first');
+    assert_false(params.has('first'), 'Search params object has no "first" name');
+    params.append('first', 1);
+    params.append('first', 10);
+    params.delete('first');
+    assert_false(params.has('first'), 'Search params object has no "first" name');
+}, 'Deleting appended multiple');
+</script>
+</head>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/url/urlsearchparams-get.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf8">
+<link rel="help" href="http://url.spec.whatwg.org/#dom-urlsearchparams-get">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/testharness-extras.js"></script>
+<script>
+test(function() {
+    var params = new URLSearchParams('a=b&c=d');
+    assert_equals(params.get('a'), 'b');
+    assert_equals(params.get('c'), 'd');
+    assert_equals(params.get('e'), null);
+    params = new URLSearchParams('a=b&c=d&a=e');
+    assert_equals(params.get('a'), 'b');
+    params = new URLSearchParams('=b&c=d');
+    assert_equals(params.get(''), 'b');
+    params = new URLSearchParams('a=&c=d&a=e');
+    assert_equals(params.get('a'), '');
+}, 'Get basics');
+
+test(function() {
+    var params = new URLSearchParams('first=second&third&&');
+    assert_true(params != null, 'constructor returned non-null value.');
+    assert_true(params.has('first'), 'Search params object has name "first"');
+    assert_equals(params.get('first'), 'second', 'Search params object has name "first" with value "second"');
+    assert_equals(params.get('third'), '', 'Search params object has name "third" with the empty value.');
+    assert_equals(params.get('fourth'), null, 'Search params object has no "fourth" name and value.');
+}, 'More get() basics');
+</script>
+</head>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/url/urlsearchparams-getall.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf8">
+<link rel="help" href="http://url.spec.whatwg.org/#dom-urlsearchparams-getAll">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/testharness-extras.js"></script>
+<script>
+test(function() {
+    var params = new URLSearchParams('a=b&c=d');
+    assert_array_equals(params.getAll('a'), ['b']);
+    assert_array_equals(params.getAll('c'), ['d']);
+    assert_array_equals(params.getAll('e'), []);
+    params = new URLSearchParams('a=b&c=d&a=e');
+    assert_array_equals(params.getAll('a'), ['b', 'e']);
+    params = new URLSearchParams('=b&c=d');
+    assert_array_equals(params.getAll(''), ['b']);
+    params = new URLSearchParams('a=&c=d&a=e');
+    assert_array_equals(params.getAll('a'), ['', 'e']);
+}, 'getAll() basics');
+
+test(function() {
+    var params = new URLSearchParams('a=1&a=2&a=3&a');
+    assert_true(params.has('a'), 'Search params object has name "a"');
+    var matches = params.getAll('a');
+    assert_true(matches && matches.length == 4, 'Search params object has values for name "a"');
+    assert_array_equals(matches, ['1', '2', '3', ''], 'Search params object has expected name "a" values');
+    params.set('a', 'one');
+    assert_equals(params.get('a'), 'one', 'Search params object has name "a" with value "one"');
+    var matches = params.getAll('a');
+    assert_true(matches && matches.length == 1, 'Search params object has values for name "a"');
+    assert_array_equals(matches, ['one'], 'Search params object has expected name "a" values');
+}, 'getAll() multiples');
+</script>
+</head>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/url/urlsearchparams-has.html
@@ -0,0 +1,36 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf8">
+<link rel="help" href="http://url.spec.whatwg.org/#dom-urlsearchparams-has">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/testharness-extras.js"></script>
+<script>
+test(function() {
+    var params = new URLSearchParams('a=b&c=d');
+    assert_true(params.has('a'));
+    assert_true(params.has('c'));
+    assert_false(params.has('e'));
+    params = new URLSearchParams('a=b&c=d&a=e');
+    assert_true(params.has('a'));
+    params = new URLSearchParams('=b&c=d');
+    assert_true(params.has(''));
+    params = new URLSearchParams('null=a');
+    assert_true(params.has(null));
+}, 'Has basics');
+
+test(function() {
+    var params = new URLSearchParams('a=b&c=d&&');
+    params.append('first', 1);
+    params.append('first', 2);
+    assert_true(params.has('a'), 'Search params object has name "a"');
+    assert_true(params.has('c'), 'Search params object has name "c"');
+    assert_true(params.has('first'), 'Search params object has name "first"');
+    assert_false(params.has('d'), 'Search params object has no name "d"');
+    params.delete('first');
+    assert_false(params.has('first'), 'Search params object has no name "first"');
+}, 'has() following delete()');
+</script>
+</head>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/url/urlsearchparams-set.html
@@ -0,0 +1,35 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf8">
+<link rel="help" href="http://url.spec.whatwg.org/#dom-urlsearchparams-set">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/testharness-extras.js"></script>
+<script>
+test(function() {
+    var params = new URLSearchParams('a=b&c=d');
+    params.set('a', 'B');
+    assert_equals(params + '', 'a=B&c=d');
+    params = new URLSearchParams('a=b&c=d&a=e');
+    params.set('a', 'B');
+    assert_equals(params + '', 'a=B&c=d')
+    params.set('e', 'f');
+    assert_equals(params + '', 'a=B&c=d&e=f')
+}, 'Set basics');
+
+test(function() {
+    var params = new URLSearchParams('a=1&a=2&a=3');
+    assert_true(params.has('a'), 'Search params object has name "a"');
+    assert_equals(params.get('a'), '1', 'Search params object has name "a" with value "1"');
+    params.set('first', 4);
+    assert_true(params.has('a'), 'Search params object has name "a"');
+    assert_equals(params.get('a'), '1', 'Search params object has name "a" with value "1"');
+    params.set('a', 4);
+    assert_true(params.has('a'), 'Search params object has name "a"');
+    assert_equals(params.get('a'), '4', 'Search params object has name "a" with value "4"');
+}, 'URLSearchParams.set');
+</script>
+</head>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/url/urlsearchparams-stringifier.html
@@ -0,0 +1,123 @@
+<!doctype html>
+<html>
+<head>
+<meta charset="utf8">
+<link rel="help" href="http://url.spec.whatwg.org/#dom-urlsearchparams-set">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/testharness-extras.js"></script>
+<script>
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', 'b c');
+    assert_equals(params + '', 'a=b+c');
+    params.delete('a');
+    params.append('a b', 'c');
+    assert_equals(params + '', 'a+b=c');
+}, 'Serialize space');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', '');
+    assert_equals(params + '', 'a=');
+    params.append('a', '');
+    assert_equals(params + '', 'a=&a=');
+    params.append('', 'b');
+    assert_equals(params + '', 'a=&a=&=b');
+    params.append('', '');
+    assert_equals(params + '', 'a=&a=&=b&=');
+    params.append('', '');
+    assert_equals(params + '', 'a=&a=&=b&=&=');
+}, 'Serialize empty value');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('', 'b');
+    assert_equals(params + '', '=b');
+    params.append('', 'b');
+    assert_equals(params + '', '=b&=b');
+}, 'Serialize empty name');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('', '');
+    assert_equals(params + '', '=');
+    params.append('', '');
+    assert_equals(params + '', '=&=');
+}, 'Serialize empty name and value');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', 'b+c');
+    assert_equals(params + '', 'a=b%2Bc');
+    params.delete('a');
+    params.append('a+b', 'c');
+    assert_equals(params + '', 'a%2Bb=c');
+}, 'Serialize +');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('=', 'a');
+    assert_equals(params + '', '%3D=a');
+    params.append('b', '=');
+    assert_equals(params + '', '%3D=a&b=%3D');
+}, 'Serialize =');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('&', 'a');
+    assert_equals(params + '', '%26=a');
+    params.append('b', '&');
+    assert_equals(params + '', '%26=a&b=%26');
+}, 'Serialize &');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', '*-._');
+    assert_equals(params + '', 'a=*-._');
+    params.delete('a');
+    params.append('*-._', 'c');
+    assert_equals(params + '', '*-._=c');
+}, 'Serialize *-._');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', 'b%c');
+    assert_equals(params + '', 'a=b%25c');
+    params.delete('a');
+    params.append('a%b', 'c');
+    assert_equals(params + '', 'a%25b=c');
+}, 'Serialize %');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', 'b\0c');
+    assert_equals(params + '', 'a=b%00c');
+    params.delete('a');
+    params.append('a\0b', 'c');
+    assert_equals(params + '', 'a%00b=c');
+}, 'Serialize \\0');
+
+test(function() {
+    var params = new URLSearchParams();
+    params.append('a', 'b\uD83D\uDCA9c');
+    assert_equals(params + '', 'a=b%F0%9F%92%A9c');
+    params.delete('a');
+    params.append('a\uD83D\uDCA9b', 'c');
+    assert_equals(params + '', 'a%F0%9F%92%A9b=c');
+}, 'Serialize \uD83D\uDCA9');  // Unicode Character 'PILE OF POO' (U+1F4A9)
+
+test(function() {
+    var params;
+    params = new URLSearchParams('a=b&c=d&&e&&');
+    assert_equals(params.toString(), 'a=b&c=d&e=');
+    params = new URLSearchParams('a = b &a=b&c=d%20');
+    assert_equals(params.toString(), 'a+=+b+&a=b&c=d+');
+    // The lone '=' _does_ survive the roundtrip.
+    params = new URLSearchParams('a=&a=b');
+    assert_equals(params.toString(), 'a=&a=b');
+}, 'URLSearchParams.toString');
+</script>
+</head>
+</html>
+
--- a/testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm
+++ b/testing/web-platform/tests/workers/Worker_cross_origin_security_err.htm
@@ -1,12 +1,17 @@
 <!DOCTYPE html>
 <title> Worker cross-origin URL </title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id=log></div>
 <script>
-test(function() {
-  assert_throws("SECURITY_ERR", function() {
-    new Worker("ftp://example.org/support/WorkerBasic.js");
-  });
+async_test(function(t) {
+  try {
+    var w = new Worker("ftp://example.org/support/WorkerBasic.js");
+    w.onerror = t.step_func_done(function(e) {
+      assert_true(e instanceof ErrorEvent);
+    });
+  } catch (e) {
+    t.step_func_done(function(e) { assert_true(true); });
+  }
 });
 </script>
--- a/testing/web-platform/tests/workers/constructors/SharedWorker/same-origin.html
+++ b/testing/web-platform/tests/workers/constructors/SharedWorker/same-origin.html
@@ -7,42 +7,61 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 // Needed to prevent a race condition if a worker throws an exception that may or may
 // not propogate to the window before the tests finish
 setup({allow_uncaught_exception: true});
 
+function testSharedWorkerHelper(t, script) {
+  try {
+    var worker = new SharedWorker(script, '');
+    worker.onerror = t.step_func_done(function(e) {
+      assert_true(e instanceof ErrorEvent);
+    });
+  } catch (e) {
+    t.step_func_done(function(e) { assert_true(true); });
+  }
+}
+
 test(function() {
   assert_throws("SecurityError", function() { new SharedWorker('unsupported:', ''); });
 }, "unsupported_scheme");
+
 async_test(function() {
   var worker = new SharedWorker('data:,onconnect = function(e) { e.ports[0].postMessage(1); }', '');
   worker.port.onmessage = this.step_func_done(function(e) {
     assert_equals(e.data, 1);
   });
 }, "data_url");
-test(function() {
-  assert_throws("SecurityError", function() { new SharedWorker('javascript:""', ''); });
+
+async_test(function(t) {
+  testSharedWorkerHelper(this, 'javascript:""');
 }, "javascript_url");
-test(function() {
-  assert_throws("SecurityError", function() { new SharedWorker('about:blank', ''); });
+
+async_test(function(t) {
+  testSharedWorkerHelper(this, 'about:blank');
 }, "about_blank");
-test(function() {
-  assert_throws("SecurityError", function() { new SharedWorker('http://www.opera.com/', ''); });
+
+async_test(function(t) {
+  testSharedWorkerHelper(this, 'http://www.opera.com/');
 }, "opera_com");
-test(function() {
-  assert_throws("SecurityError", function() { new SharedWorker(location.protocol+'//'+location.hostname+':81/', ''); });
+
+async_test(function(t) {
+  testSharedWorkerHelper(this, location.protocol+'//'+location.hostname+':81/');
 }, "port_81");
-test(function() {
-  assert_throws("SecurityError", function() { new SharedWorker('https://'+location.hostname+':80/', ''); });
+
+async_test(function(t) {
+  testSharedWorkerHelper(this, 'https://'+location.hostname+':80/');
 }, "https_port_80");
-test(function() {
-  assert_throws("SecurityError", function() { new SharedWorker('https://'+location.hostname+':8000/', ''); });
+
+async_test(function(t) {
+  testSharedWorkerHelper(this, 'https://'+location.hostname+':8000/');
 }, "https_port_8000");
-test(function() {
-  assert_throws("SecurityError", function() { new SharedWorker('http://'+location.hostname+':8012/', ''); });
+
+async_test(function(t) {
+  testSharedWorkerHelper(this, 'http://'+location.hostname+':8012/');
 }, "http_port_8012");
 </script>
 <!--
 */
 //-->
--- a/testing/web-platform/tests/workers/constructors/Worker/same-origin.html
+++ b/testing/web-platform/tests/workers/constructors/Worker/same-origin.html
@@ -5,47 +5,59 @@
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 // Needed to prevent a race condition if a worker throws an exception that may or may
 // not propogate to the window before the tests finish
 setup({allow_uncaught_exception: true});
 
+function testSharedWorkerHelper(t, script) {
+  try {
+    var worker = new SharedWorker(script, '');
+    worker.onerror = t.step_func_done(function(e) {
+      assert_true(e instanceof ErrorEvent);
+    });
+  } catch (e) {
+    t.step_func_done(function(e) { assert_true(true); });
+  }
+}
+
 test(function() {
   assert_throws("SecurityError", function() { new Worker('unsupported:'); });
 }, "unsupported_scheme");
 
 async_test(function() {
   var worker = new Worker('data:,postMessage(1);');
   worker.onmessage = this.step_func_done(function(e) {
     assert_equals(e.data, 1);
   });
 }, "data_url");
 
-test(function() {
-  assert_throws("SecurityError", function() { new Worker('about:blank'); });
+async_test(function(t) {
+  testSharedWorkerHelper(t, 'about:blank');
 }, "about_blank");
 
-test(function() {
-  assert_throws("SecurityError", function() { new Worker('http://www.example.invalid/'); });
+async_test(function(t) {
+  testSharedWorkerHelper(t, 'http://www.example.invalid/');
 }, "example_invalid");
 
-test(function() {
-  assert_throws("SecurityError", function() { new Worker(location.protocol+'//'+location.hostname+':81/'); });
+async_test(function(t) {
+  testSharedWorkerHelper(t, location.protocol+'//'+location.hostname+':81/');
 }, "port_81");
 
-test(function() {
-  assert_throws("SecurityError", function() { new Worker('https://'+location.hostname+':80/'); });
+async_test(function(t) {
+  testSharedWorkerHelper(t, 'https://'+location.hostname+':80/');
 }, "https_port_80");
 
-test(function() {
-  assert_throws("SecurityError", function() { new Worker('https://'+location.hostname+':8000/'); });
+async_test(function(t) {
+  testSharedWorkerHelper(t, 'https://'+location.hostname+':8000/');
 }, "https_port_8000");
 
-test(function() {
-  assert_throws("SecurityError", function() { new Worker('http://'+location.hostname+':8012/'); });
+async_test(function(t) {
+  testSharedWorkerHelper(t, 'http://'+location.hostname+':8012/');
 }, "http_post_8012");
 
-test(function() {
-  assert_throws("SecurityError", function() { new Worker('javascript:""'); });
+async_test(function(t) {
+  testSharedWorkerHelper(t,'javascript:""');
 }, "javascript_url");
+
 </script>