File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -484,9 +484,7 @@ class WPTRunner {
484
484
pretendGlobalThisAs ( name ) {
485
485
switch ( name ) {
486
486
case 'Window' : {
487
- this . globalThisInitScripts . push (
488
- `global.Window = Object.getPrototypeOf(globalThis).constructor;
489
- self.GLOBAL.isWorker = () => false;` ) ;
487
+ this . globalThisInitScripts . push ( 'globalThis.Window = Object.getPrototypeOf(globalThis).constructor;' ) ;
490
488
this . loadLazyGlobals ( ) ;
491
489
break ;
492
490
}
Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ const { WPTRunner } = require('../common/wpt');
5
5
6
6
const runner = new WPTRunner ( 'hr-time' ) ;
7
7
8
+ runner . setInitScript ( `
9
+ self.GLOBAL.isWorker = () => false;
10
+ ` ) ;
8
11
runner . pretendGlobalThisAs ( 'Window' ) ;
9
12
10
13
runner . runJsTests ( ) ;
You can’t perform that action at this time.
0 commit comments