Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: LayoutTests/fast/performance/performance-measure-exceptions.html

Issue 22311011: Improve 'performance.{mark,measure} exception messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698