Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/fixtures/wpt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Last update:
- console: https://github.com/web-platform-tests/wpt/tree/e48251b778/console
- dom/abort: https://github.com/web-platform-tests/wpt/tree/dc928169ee/dom/abort
- dom/events: https://github.com/web-platform-tests/wpt/tree/0a811c5161/dom/events
- encoding: https://github.com/web-platform-tests/wpt/tree/1ac8deee08/encoding
- encoding: https://github.com/web-platform-tests/wpt/tree/0dc50adc2e/encoding
- fetch/data-urls/resources: https://github.com/web-platform-tests/wpt/tree/7c79d998ff/fetch/data-urls/resources
- FileAPI: https://github.com/web-platform-tests/wpt/tree/7f51301888/FileAPI
- hr-time: https://github.com/web-platform-tests/wpt/tree/34cafd797e/hr-time
- hr-time: https://github.com/web-platform-tests/wpt/tree/6b16e87e48/hr-time
- html/webappapis/atob: https://github.com/web-platform-tests/wpt/tree/f267e1dca6/html/webappapis/atob
- html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing
- html/webappapis/structured-clone: https://github.com/web-platform-tests/wpt/tree/47d3fb280c/html/webappapis/structured-clone
Expand All @@ -27,13 +27,13 @@ Last update:
- performance-timeline: https://github.com/web-platform-tests/wpt/tree/94caab7038/performance-timeline
- resource-timing: https://github.com/web-platform-tests/wpt/tree/22d38586d0/resource-timing
- resources: https://github.com/web-platform-tests/wpt/tree/1d2c5fb36a/resources
- streams: https://github.com/web-platform-tests/wpt/tree/bc9dcbbf1a/streams
- streams: https://github.com/web-platform-tests/wpt/tree/894c8d4858/streams
- url: https://github.com/web-platform-tests/wpt/tree/c928b19ab0/url
- urlpattern: https://github.com/web-platform-tests/wpt/tree/a2e15ad405/urlpattern
- user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi
- wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi
- web-locks: https://github.com/web-platform-tests/wpt/tree/10a122a6bc/web-locks
- web-locks: https://github.com/web-platform-tests/wpt/tree/0633bb21ad/web-locks
- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/c9e955840a/WebCryptoAPI
- webidl: https://github.com/web-platform-tests/wpt/tree/63ca529a02/webidl
- webidl/ecmascript-binding/es-exceptions: https://github.com/web-platform-tests/wpt/tree/2f96fa1996/webidl/ecmascript-binding/es-exceptions
Expand Down
3 changes: 3 additions & 0 deletions test/fixtures/wpt/hr-time/WEB_FEATURES.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
features:
- name: performance
files: "**"
2 changes: 0 additions & 2 deletions test/fixtures/wpt/hr-time/idlharness-shadowrealm.window.js

This file was deleted.

6 changes: 5 additions & 1 deletion test/fixtures/wpt/hr-time/idlharness.any.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// META: global=window,worker
// META: global=window,worker,shadowrealm-in-window
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: timeout=long
Expand All @@ -11,6 +11,10 @@ idl_test(
['hr-time'],
['html', 'dom'],
async idl_array => {
if (self.GLOBAL.isShadowRealm()) {
return;
}

if (self.GLOBAL.isWorker()) {
idl_array.add_objects({ WorkerGlobalScope: ['self'] });
} else {
Expand Down
36 changes: 36 additions & 0 deletions test/fixtures/wpt/hr-time/raf-coarsened-time.https.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!doctype html>
<html>
<head>
<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
/* Coarsen to 5 microseconds or coarser */
const COARSE_RESOLUTION = 0.005;

const CUSTOM_TIMELINE_DELTA = 0.002;
const FLOATING_POINT_ERROR_EPSILON = 0.01;

// Note that this test would fail if the platform introduces a jitter.
// It is recommended that platforms that implement jitter run this test
// with a flag that turns jitter off, if possible.

const customTimeline = new DocumentTimeline({originTime: CUSTOM_TIMELINE_DELTA});
promise_test(async t => {
for (let i = 0; i < 32; ++i) {
const timestamp = await new Promise(resolve => requestAnimationFrame(ts => resolve(ts)));
const coarse_timestamp = Math.round(timestamp / COARSE_RESOLUTION) * COARSE_RESOLUTION;
assert_approx_equals(timestamp, coarse_timestamp, FLOATING_POINT_ERROR_EPSILON,
"timestamp should be coarsened");
assert_approx_equals(timestamp, document.timeline.currentTime, FLOATING_POINT_ERROR_EPSILON,
"document.timeline.currentTimeline should be the same as the rAF callback");
assert_approx_equals(customTimeline.currentTime + CUSTOM_TIMELINE_DELTA,
timestamp, FLOATING_POINT_ERROR_EPSILON,
"originTime for custom timeline should not be coarsened");
}
});
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
8 changes: 4 additions & 4 deletions test/fixtures/wpt/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"path": "dom/events"
},
"encoding": {
"commit": "1ac8deee082ecfb5d3b6f9c56cf9d1688a2fc218",
"commit": "0dc50adc2e989134defaea66aacff377ab940543",
"path": "encoding"
},
"fetch/data-urls/resources": {
Expand All @@ -32,7 +32,7 @@
"path": "FileAPI"
},
"hr-time": {
"commit": "34cafd797e58dad280d20040eee012d49ccfa91f",
"commit": "6b16e87e48e6f91ac2e3c91f925b125a342f5ae8",
"path": "hr-time"
},
"html/webappapis/atob": {
Expand Down Expand Up @@ -68,7 +68,7 @@
"path": "resources"
},
"streams": {
"commit": "bc9dcbbf1a4c2c741ef47f47d6ede6458f40c4a4",
"commit": "894c8d48583be8721f8f712400929baeb9a8782f",
"path": "streams"
},
"url": {
Expand All @@ -92,7 +92,7 @@
"path": "wasm/webapi"
},
"web-locks": {
"commit": "10a122a6bc3670a44e0fa8b9a99f6aa9012d30f1",
"commit": "0633bb21ad37f95809b4dc04b8c7d56e9df5ad40",
"path": "web-locks"
},
"WebCryptoAPI": {
Expand Down
Loading