summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/resource-timing/idlharness.any.js
blob: aa860d3dd16a712fb3e81b5393c5ca2f3dccfde7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: timeout=long

'use strict';

// https://w3c.github.io/resource-timing/

idl_test(
  ['resource-timing'],
  ['performance-timeline', 'hr-time', 'dom', 'html'],
  idl_array => {
    try {
      self.resource = performance.getEntriesByType('resource')[0];
    } catch (e) {
      // Will be surfaced when resource is undefined below.
    }

    idl_array.add_objects({
      Performance: ['performance'],
      PerformanceResourceTiming: ['resource']
    });
  }
);