| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -526,36 +526,6 @@ class WPTRunner { | |||
| 526 | 526 | this.globalThisInitScripts.push(script); | |
| 527 | 527 | } | |
| 528 | 528 | ||
| 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 | - | ||
| 559 | 529 | // TODO(joyeecheung): work with the upstream to port more tests in .html | |
| 560 | 530 | // to .js. | |
| 561 | 531 | async runJsTests() { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,11 @@ | |||
| 1 | 1 | { | |
| 2 | + "idlharness.any.js": { | ||
| 3 | + "fail": { | ||
| 4 | + "expected": [ | ||
| 5 | + "Window interface: attribute performance" | ||
| 6 | + ] | ||
| 7 | + } | ||
| 8 | + }, | ||
| 2 | 9 | "window-worker-timeOrigin.window.js": { | |
| 3 | 10 | "skip": "depends on URL.createObjectURL(blob)" | |
| 4 | 11 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,6 +6,5 @@ const { WPTRunner } = require('../common/wpt'); | |||
| 6 | 6 | const runner = new WPTRunner('hr-time'); | |
| 7 | 7 | ||
| 8 | 8 | runner.pretendGlobalThisAs('Window'); | |
| 9 | - runner.brandCheckGlobalScopeAttribute('performance'); | ||
| 10 | 9 | ||
| 11 | 10 | runner.runJsTests(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,6 @@ const { WPTRunner } = require('../common/wpt'); | |||
| 5 | 5 | const runner = new WPTRunner('performance-timeline'); | |
| 6 | 6 | ||
| 7 | 7 | runner.pretendGlobalThisAs('Window'); | |
| 8 | - runner.brandCheckGlobalScopeAttribute('performance'); | ||
| 9 | 8 | runner.setInitScript(` | |
| 10 | 9 | // Create a dummy resource timing entry to mimic how the browser would | |
| 11 | 10 | // record the initial page load. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,6 +6,5 @@ const { WPTRunner } = require('../common/wpt'); | |||
| 6 | 6 | const runner = new WPTRunner('user-timing'); | |
| 7 | 7 | ||
| 8 | 8 | runner.pretendGlobalThisAs('Window'); | |
| 9 | - runner.brandCheckGlobalScopeAttribute('performance'); | ||
| 10 | 9 | ||
| 11 | 10 | runner.runJsTests(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments