1'use strict'; 2 3const { WPTRunner } = require('../common/wpt'); 4 5const runner = new WPTRunner('performance-timeline'); 6 7// Needed to access to DOMException. 8runner.setFlags(['--expose-internals']); 9 10runner.setInitScript(` 11 const { 12 PerformanceMark, 13 PerformanceMeasure, 14 PerformanceObserver, 15 PerformanceObserverEntryList, 16 performance, 17 } = require('perf_hooks'); 18 global.PerformanceMark = performance; 19 global.PerformanceMeasure = performance; 20 global.PerformanceObserver = PerformanceObserver; 21 global.PerformanceObserverEntryList = PerformanceObserverEntryList; 22 global.performance = performance; 23 24 const { internalBinding } = require('internal/test/binding'); 25 const { DOMException } = internalBinding('messaging'); 26 global.DOMException = DOMException; 27`); 28 29runner.runJsTests(); 30