Skip to content

Commit 0bf08b6

Browse files
lukebjerringfoolip
authored andcommitted
Update the hr-time IDL file + test (web-platform-tests#11862)
1 parent e9a34c1 commit 0bf08b6

File tree

3 files changed

+27
-47
lines changed

3 files changed

+27
-47
lines changed

hr-time/idlharness.any.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// META: global=window,worker
2+
// META: script=/resources/WebIDLParser.js
3+
// META: script=/resources/idlharness.js
4+
5+
'use strict';
6+
7+
// https://w3c.github.io/hr-time/
8+
9+
idl_test(
10+
['hr-time'],
11+
['html', 'dom'],
12+
async idl_array => {
13+
if (self.GLOBAL.isWorker()) {
14+
idl_array.add_objects({ WorkerGlobalScope: ['self'] });
15+
} else {
16+
idl_array.add_objects({ Window: ['self'] });
17+
}
18+
idl_array.add_objects({
19+
Performance: ['performance'],
20+
});
21+
}
22+
);

hr-time/idlharness.html

-43
This file was deleted.

interfaces/hr-time.idl

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
// GENERATED CONTENT - DO NOT EDIT
2-
// Content of this file was automatically extracted from the High Resolution Time spec.
3-
// See https://w3c.github.io/hr-time/
2+
// Content of this file was automatically extracted from the
3+
// "High Resolution Time Level 2" spec.
4+
// See: https://w3c.github.io/hr-time/
45

56
typedef double DOMHighResTimeStamp;
67

78
[Exposed=(Window,Worker)]
89
interface Performance : EventTarget {
9-
DOMHighResTimeStamp now ();
10+
DOMHighResTimeStamp now();
1011
readonly attribute DOMHighResTimeStamp timeOrigin;
1112
[Default] object toJSON();
1213
};
1314

14-
partial interface WindowOrWorkerGlobalScope {
15+
partial interface mixin WindowOrWorkerGlobalScope {
1516
[Replaceable]
1617
readonly attribute Performance performance;
1718
};

0 commit comments

Comments
 (0)