Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / performance / performance-mark-exceptions.html
blobb33f45c07c7119f5505f60ba56e9ee31bfe4ff1b
1 <!DOCTYPE html>
2 <html>
3 <head>
4 </head>
5 <body>
6 <script src="../../resources/js-test.js"></script>
7 <script>
8 description("This tests that 'performance.mark' throws exceptions with reasonable messages.");
10 var allTheThings = [
11 'navigationStart',
12 'unloadEventStart',
13 'unloadEventEnd',
14 'redirectStart',
15 'redirectEnd',
16 'fetchStart',
17 'domainLookupStart',
18 'domainLookupEnd',
19 'connectStart',
20 'connectEnd',
21 'secureConnectionStart',
22 'requestStart',
23 'responseStart',
24 'responseEnd',
25 'domLoading',
26 'domInteractive',
27 'domContentLoadedEventStart',
28 'domContentLoadedEventEnd',
29 'domComplete',
30 'loadEventStart',
31 'loadEventEnd',
33 allTheThings.forEach(function(name) {
34 shouldThrow('window.performance.mark(\'' + name + '\')', '"SyntaxError: Failed to execute \'mark\' on \'Performance\': \'' + name + '\' is part of the PerformanceTiming interface, and cannot be used as a mark name."');
35 });
36 </script>
37 </body>
38 </html>