Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3daf508

Browse filesBrowse files
panvatargos
authored andcommitted
test: stop faking performance idlharness
PR-URL: #46794 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent c7f056c commit 3daf508
Copy full SHA for 3daf508

File tree

Expand file treeCollapse file tree

5 files changed

+7
-33
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+7
-33
lines changed
Open diff view settings
Collapse file

‎test/common/wpt.js‎

Copy file name to clipboardExpand all lines: test/common/wpt.js
-30Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -526,36 +526,6 @@ class WPTRunner {
526526
this.globalThisInitScripts.push(script);
527527
}
528528

529-
brandCheckGlobalScopeAttribute(name) {
530-
// TODO(legendecas): idlharness GlobalScope attribute receiver validation.
531-
const script = `
532-
const desc = Object.getOwnPropertyDescriptor(globalThis, '${name}');
533-
function getter() {
534-
// Mimic GlobalScope instance brand check.
535-
if (this !== globalThis) {
536-
throw new TypeError('Illegal invocation');
537-
}
538-
return desc.get();
539-
}
540-
Object.defineProperty(getter, 'name', { value: 'get ${name}' });
541-
542-
function setter(value) {
543-
// Mimic GlobalScope instance brand check.
544-
if (this !== globalThis) {
545-
throw new TypeError('Illegal invocation');
546-
}
547-
desc.set(value);
548-
}
549-
Object.defineProperty(setter, 'name', { value: 'set ${name}' });
550-
551-
Object.defineProperty(globalThis, '${name}', {
552-
get: getter,
553-
set: setter,
554-
});
555-
`;
556-
this.globalThisInitScripts.push(script);
557-
}
558-
559529
// TODO(joyeecheung): work with the upstream to port more tests in .html
560530
// to .js.
561531
async runJsTests() {
Collapse file

‎test/wpt/status/hr-time.json‎

Copy file name to clipboardExpand all lines: test/wpt/status/hr-time.json
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
2+
"idlharness.any.js": {
3+
"fail": {
4+
"expected": [
5+
"Window interface: attribute performance"
6+
]
7+
}
8+
},
29
"window-worker-timeOrigin.window.js": {
310
"skip": "depends on URL.createObjectURL(blob)"
411
}
Collapse file

‎test/wpt/test-hr-time.js‎

Copy file name to clipboardExpand all lines: test/wpt/test-hr-time.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ const { WPTRunner } = require('../common/wpt');
66
const runner = new WPTRunner('hr-time');
77

88
runner.pretendGlobalThisAs('Window');
9-
runner.brandCheckGlobalScopeAttribute('performance');
109

1110
runner.runJsTests();
Collapse file

‎test/wpt/test-performance-timeline.js‎

Copy file name to clipboardExpand all lines: test/wpt/test-performance-timeline.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const { WPTRunner } = require('../common/wpt');
55
const runner = new WPTRunner('performance-timeline');
66

77
runner.pretendGlobalThisAs('Window');
8-
runner.brandCheckGlobalScopeAttribute('performance');
98
runner.setInitScript(`
109
// Create a dummy resource timing entry to mimic how the browser would
1110
// record the initial page load.
Collapse file

‎test/wpt/test-user-timing.js‎

Copy file name to clipboardExpand all lines: test/wpt/test-user-timing.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ const { WPTRunner } = require('../common/wpt');
66
const runner = new WPTRunner('user-timing');
77

88
runner.pretendGlobalThisAs('Window');
9-
runner.brandCheckGlobalScopeAttribute('performance');
109

1110
runner.runJsTests();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.