1// META: global=window,worker 2// META: script=/resources/WebIDLParser.js 3// META: script=/resources/idlharness.js 4// META: timeout=long 5 6// https://w3c.github.io/user-timing/ 7 8'use strict'; 9 10idl_test( 11 ['user-timing'], 12 ['hr-time', 'performance-timeline', 'dom'], 13 idl_array => { 14 try { 15 performance.mark('test'); 16 performance.measure('test'); 17 for (const m of performance.getEntriesByType('mark')) { 18 self.mark = m; 19 } 20 for (const m of performance.getEntriesByType('measure')) { 21 self.measure = m; 22 } 23 } catch (e) { 24 // Will be surfaced when mark is undefined below. 25 } 26 27 idl_array.add_objects({ 28 Performance: ['performance'], 29 PerformanceMark: ['mark'], 30 PerformanceMeasure: ['measure'], 31 }); 32 } 33); 34