idlharness.any.js (723B)
1 // META: global=window,worker,shadowrealm-in-window 2 // META: script=/resources/WebIDLParser.js 3 // META: script=/resources/idlharness.js 4 5 // https://w3c.github.io/performance-timeline/ 6 7 'use strict'; 8 9 idl_test( 10 ['performance-timeline'], 11 ['hr-time', 'dom'], 12 async idl_array => { 13 if (self.GLOBAL.isShadowRealm()) { 14 return; 15 } 16 17 idl_array.add_objects({ 18 Performance: ['performance'], 19 PerformanceObserver: ['observer'], 20 PerformanceObserverEntryList: ['entryList'], 21 }); 22 23 self.entryList = await new Promise((resolve, reject) => { 24 self.observer = new PerformanceObserver(resolve); 25 observer.observe({ entryTypes: ['mark'] }); 26 performance.mark('test'); 27 }); 28 } 29 );