| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 </head> |
| 5 <body> |
| 6 <script src="../js/resources/js-test-pre.js"></script> |
| 7 <script> |
| 8 description("This tests that 'performance.measure' throws exceptions wit
h reasonable messages."); |
| 9 |
| 10 shouldThrow('window.performance.measure("DoesNotExist", "AlsoDoesNotExis
t")', '"SyntaxError: The mark \'AlsoDoesNotExist\' does not exist."'); |
| 11 |
| 12 window.performance.mark('mark'); |
| 13 |
| 14 var allTheExceptionalThings = [ |
| 15 'unloadEventStart', |
| 16 'unloadEventEnd', |
| 17 'redirectStart', |
| 18 'redirectEnd', |
| 19 'secureConnectionStart', |
| 20 'domInteractive', |
| 21 'domContentLoadedEventStart', |
| 22 'domContentLoadedEventEnd', |
| 23 'domComplete', |
| 24 'loadEventStart', |
| 25 'loadEventEnd', |
| 26 ]; |
| 27 allTheExceptionalThings.forEach(function(name) { |
| 28 shouldThrow('window.performance.measure("measuring", \'' + name + '\
', "mark")', '"InvalidAccessError: \'' + name + '\' is empty: either the event h
asn\'t happened yet, or it would provide cross-origin timing information."'); |
| 29 }); |
| 30 </script> |
| 31 <script src="../js/resources/js-test-post.js"></script> |
| 32 </body> |
| 33 </html> |
| OLD | NEW |