Bug 1601335 - Fix a couple of WPTs: Worker-location.sub.any.js and Worker-constructor-proto.any.js, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 04 Dec 2019 22:01:58 +0000
changeset 505563 7e3751388d71a1db2ca7e2227c8bb4455dcd7620
parent 505562 c7e0a39fdc1f09e75b755c8287ed0b4e12ff64d2
child 505564 4989bb2f4f69eae11fa05cc9386edf3d65ccb0c6
push id102346
push useramarchesini@mozilla.com
push dateWed, 04 Dec 2019 23:13:09 +0000
treeherderautoland@7e3751388d71 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1601335
milestone73.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 1601335 - Fix a couple of WPTs: Worker-location.sub.any.js and Worker-constructor-proto.any.js, r=smaug Differential Revision: https://phabricator.services.mozilla.com/D55836
testing/web-platform/meta/workers/Worker-constructor-proto.any.js.ini
testing/web-platform/meta/workers/Worker-location.sub.any.js.ini
testing/web-platform/tests/workers/Worker-constructor-proto.any.js
testing/web-platform/tests/workers/Worker-location.sub.any.js
deleted file mode 100644
--- a/testing/web-platform/meta/workers/Worker-constructor-proto.any.js.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-[Worker-constructor-proto.any.sharedworker.html]
-  [Tests that setting the proto of a built in constructor is not reset.]
-    expected: FAIL
-
-
-[Worker-constructor-proto.any.worker.html]
-  [Tests that setting the proto of a built in constructor is not reset.]
-    expected: FAIL
-
-
-[Worker-constructor-proto.any.serviceworker.html]
-  [Tests that setting the proto of a built in constructor is not reset.]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/workers/Worker-location.sub.any.js.ini
+++ /dev/null
@@ -1,9 +0,0 @@
-[Worker-location.sub.any.sharedworker.html]
-  [Test WorkerLocation properties.]
-    expected: FAIL
-
-
-[Worker-location.sub.any.worker.html]
-  [Test WorkerLocation properties.]
-    expected: FAIL
-
--- a/testing/web-platform/tests/workers/Worker-constructor-proto.any.js
+++ b/testing/web-platform/tests/workers/Worker-constructor-proto.any.js
@@ -1,7 +1,7 @@
 //META: global=!default, worker
 test(() => {
   proto = new Number(42)
-  assert_equals(String(Object.getPrototypeOf(WorkerLocation)), "function () { [native code] }");
+  assert_equals(String(Object.getPrototypeOf(WorkerLocation)).replace(/\n/g, " ").replace(/\s\s+/g, " "), "function () { [native code] }");
   WorkerLocation.__proto__ = proto;
   assert_object_equals(Object.getPrototypeOf(WorkerLocation), Object(42));
 }, 'Tests that setting the proto of a built in constructor is not reset.');
--- a/testing/web-platform/tests/workers/Worker-location.sub.any.js
+++ b/testing/web-platform/tests/workers/Worker-location.sub.any.js
@@ -1,11 +1,11 @@
 // META: global=!default, dedicatedworker, sharedworker
 test(() => {
-  assert_equals(String(WorkerLocation), "function WorkerLocation() { [native code] }");
+  assert_equals(String(WorkerLocation).replace(/\n/g, " ").replace(/\s\s+/g, " "), "function WorkerLocation() { [native code] }");
   assert_true(location instanceof Object);
   assert_equals(location.href, 'http://{{host}}:{{ports[http][0]}}/workers/Worker-location.sub.any.worker.js');
   assert_equals(location.origin, "http://{{host}}:{{ports[http][0]}}");
   assert_equals(location.protocol, "http:");
   assert_equals(location.host, "{{host}}:{{ports[http][0]}}");
   assert_equals(location.hostname, "{{host}}");
   assert_equals(location.port, "{{ports[http][0]}}");
   assert_equals(location.pathname, "/workers/Worker-location.sub.any.worker.js");