Bug 1480724 [wpt PR 12293] - Use a .worker.js test for WorkerGlobalScope_requestAnimationFrame., a=testonly
☠☠ backed out by de68b0419464 ☠ ☠
authorMs2ger <Ms2ger@gmail.com>
Fri, 10 Aug 2018 16:06:05 +0000
changeset 486218 21ac820030f7e576d3627bc801cd864ac2f03122
parent 486217 d7eaecb758f7d3eb4c7410978042d91c77d350f7
child 486219 ba42a3f7a31746799b4332ab979eb939c70a5b08
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1480724, 12293
milestone63.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 1480724 [wpt PR 12293] - Use a .worker.js test for WorkerGlobalScope_requestAnimationFrame., a=testonly Automatic update from web-platform-testsUse a .worker.js test for WorkerGlobalScope_requestAnimationFrame. -- wpt-commits: 5a3a984492dcd1b1586576790922baf0a208dfb5 wpt-pr: 12293
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/workers/WorkerGlobalScope_requestAnimationFrame.htm
testing/web-platform/tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -398536,19 +398536,19 @@
     ]
    ],
    "workers/WorkerGlobalScope_importScripts_NosniffErr.htm": [
     [
      "/workers/WorkerGlobalScope_importScripts_NosniffErr.htm",
      {}
     ]
    ],
-   "workers/WorkerGlobalScope_requestAnimationFrame.htm": [
-    [
-     "/workers/WorkerGlobalScope_requestAnimationFrame.htm",
+   "workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.js": [
+    [
+     "/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.html",
      {}
     ]
    ],
    "workers/WorkerGlobalScope_setInterval.htm": [
     [
      "/workers/WorkerGlobalScope_setInterval.htm",
      {}
     ]
@@ -651001,18 +651001,18 @@
   "workers/WorkerGlobalScope_importScripts_NetworkErr.htm": [
    "36fe6e0b2d3a5b5c93f9fd2e93a6d4f2601de5fd",
    "testharness"
   ],
   "workers/WorkerGlobalScope_importScripts_NosniffErr.htm": [
    "d99cecdc6a5109a7e664035726985235ba1248c3",
    "testharness"
   ],
-  "workers/WorkerGlobalScope_requestAnimationFrame.htm": [
-   "c5efd53c210a72b7e188b74794ebfd044ca9a701",
+  "workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.js": [
+   "e1b0b9f15a696237a135696b0f010067a77d4bea",
    "testharness"
   ],
   "workers/WorkerGlobalScope_setInterval.htm": [
    "4e147fbf60f11c43df29df42890ab4ba41782425",
    "testharness"
   ],
   "workers/WorkerGlobalScope_setTimeout.htm": [
    "89fdf3d740a891ed2354a874ea4785386e7a03c0",
deleted file mode 100644
--- a/testing/web-platform/tests/workers/WorkerGlobalScope_requestAnimationFrame.htm
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<title> WorkerGlobalScope API: requestAnimationFrame()</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id=log></div>
-<script id="worker" type="text/worker">
-const res = [];
-requestAnimationFrame((dt) => {
-  res.push(dt);
-  requestAnimationFrame((dt) => {
-    res.push(dt);
-    requestAnimationFrame((dt) => {
-      res.push(dt);
-      postMessage(res);
-    });
-  });
-});
-</script>
-<script>
-async_test(function(t) {
-  var blob = new Blob([document.getElementById('worker').textContent]);
-  var worker = new Worker(URL.createObjectURL(blob));
-  worker.addEventListener("error", t.unreached_func("No error should be reported"));
-  worker.addEventListener("message", t.step_func((ev) => {
-    const ret = ev.data;
-    assert_equals(ret.length, 3);
-    assert_true(ret[0] < ret[1]);
-    assert_true(ret[1] < ret[2]);
-    t.done();
-  }));
-});
-</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.js
@@ -0,0 +1,19 @@
+importScripts("/resources/testharness.js");
+
+async_test(t => {
+  const res = [];
+  requestAnimationFrame(t.step_func(dt => {
+    res.push(dt);
+    requestAnimationFrame(t.step_func(dt => {
+      res.push(dt);
+      requestAnimationFrame(t.step_func_done(dt => {
+        res.push(dt);
+        assert_equals(res.length, 3);
+        assert_less_than(res[0], res[1]);
+        assert_less_than(res[1], res[2]);
+      }));
+    }));
+  }));
+});
+
+done();