mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
a27d245698
PR-URL: https://github.com/nodejs/node/pull/39532 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe>
30 lines
829 B
JavaScript
30 lines
829 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const { WPTRunner } = require('../common/wpt');
|
|
|
|
const runner = new WPTRunner('performance-timeline');
|
|
|
|
// Needed to access to DOMException.
|
|
runner.setFlags(['--expose-internals']);
|
|
|
|
runner.setInitScript(`
|
|
const {
|
|
PerformanceMark,
|
|
PerformanceMeasure,
|
|
PerformanceObserver,
|
|
PerformanceObserverEntryList,
|
|
performance,
|
|
} = require('perf_hooks');
|
|
global.PerformanceMark = performance;
|
|
global.PerformanceMeasure = performance;
|
|
global.PerformanceObserver = PerformanceObserver;
|
|
global.PerformanceObserverEntryList = PerformanceObserverEntryList;
|
|
global.performance = performance;
|
|
|
|
const { internalBinding } = require('internal/test/binding');
|
|
const { DOMException } = internalBinding('messaging');
|
|
global.DOMException = DOMException;
|
|
`);
|
|
|
|
runner.runJsTests();
|