зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
d4dfc6b9d9
Коммит
bcc1d76033
|
@ -398541,9 +398541,9 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"workers/WorkerGlobalScope_requestAnimationFrame.htm": [
|
||||
"workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.js": [
|
||||
[
|
||||
"/workers/WorkerGlobalScope_requestAnimationFrame.htm",
|
||||
"/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
|
@ -651006,8 +651006,8 @@
|
|||
"d99cecdc6a5109a7e664035726985235ba1248c3",
|
||||
"testharness"
|
||||
],
|
||||
"workers/WorkerGlobalScope_requestAnimationFrame.htm": [
|
||||
"c5efd53c210a72b7e188b74794ebfd044ca9a701",
|
||||
"workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.js": [
|
||||
"e1b0b9f15a696237a135696b0f010067a77d4bea",
|
||||
"testharness"
|
||||
],
|
||||
"workers/WorkerGlobalScope_setInterval.htm": [
|
||||
|
|
|
@ -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>
|
|
@ -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();
|
Загрузка…
Ссылка в новой задаче