1<!doctype html> 2<html> 3<head> 4<script src="/resources/testharness.js"></script> 5<script src="/resources/testharnessreport.js"></script> 6</head> 7<body> 8<script> 9async_test(function(t) { 10 performance.mark('windowMark'); 11 const worker = new Worker("resources/worker-invalid-entries.js"); 12 worker.onmessage = function(event) { 13 assert_equals(event.data['invalid'], 0, 'The worker must have 0 invalid entries.'); 14 assert_equals(event.data['mark'], 1, 'The worker must have 1 mark entry.'); 15 assert_equals(event.data['measure'], 0, 'The worker must have 0 measure entries.'); 16 assert_equals(performance.getEntriesByType('invalid').length, 0, 17 'The window must have 0 invalid entries.'); 18 assert_equals(performance.getEntriesByType('mark').length, 1, 19 'The window must have 1 mark entry.'); 20 assert_equals(performance.getEntriesByType('measure').length, 0, 21 'The window must have 0 measure entries.') 22 t.done(); 23 } 24}, 'Get invalid entries from worker and window.'); 25</script> 26</body> 27</html> 28