xref: /third_party/node/test/wpt/test-user-timing.js (revision 1cb0ef41)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/wpt/
1'use strict';
2
3const { WPTRunner } = require('../common/wpt');
4
5const runner = new WPTRunner('user-timing');
6
7// Needed to access to DOMException.
8runner.setFlags(['--expose-internals']);
9
10runner.setInitScript(`
11  const {
12    PerformanceMark,
13    PerformanceMeasure,
14    PerformanceObserver,
15    performance,
16  } = require('perf_hooks');
17  global.PerformanceMark = performance;
18  global.PerformanceMeasure = performance;
19  global.PerformanceObserver = PerformanceObserver;
20  global.performance = performance;
21
22  const { internalBinding } = require('internal/test/binding');
23  const { DOMException } = internalBinding('messaging');
24  global.DOMException = DOMException;
25`);
26
27runner.runJsTests();
28

Indexes created Thu Nov 07 10:32:03 CST 2024