6 <script src=
"../../resources/js-test.js"></script>
8 description("This tests that 'performance.measure' throws exceptions with reasonable messages.");
10 shouldThrow('window.performance.measure("DoesNotExist", "AlsoDoesNotExist")', '"SyntaxError: Failed to execute \'measure\' on \'Performance\': The mark \'AlsoDoesNotExist\' does not exist."');
12 window
.performance
.mark('mark');
14 var allTheExceptionalThings
= [
19 'secureConnectionStart',
21 'domContentLoadedEventStart',
22 'domContentLoadedEventEnd',
27 allTheExceptionalThings
.forEach(function(name
) {
28 shouldThrow('window.performance.measure("measuring", \'' + name
+ '\', "mark")', '"InvalidAccessError: Failed to execute \'measure\' on \'Performance\': \'' + name
+ '\' is empty: either the event hasn\'t happened yet, or it would provide cross-origin timing information."');