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

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

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 7 years 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 </head> 4 </head>
5 <body> 5 <body>
6 <script src="../../resources/js-test.js"></script> 6 <script src="../../resources/js-test.js"></script>
7 <script> 7 <script>
8 description("This tests that 'performance.measure' throws exceptions wit h reasonable messages."); 8 description("This tests that 'performance.measure' throws exceptions wit h reasonable messages.");
9 9
10 shouldThrow('window.performance.measure("DoesNotExist", "AlsoDoesNotExis t")', '"SyntaxError: The mark \'AlsoDoesNotExist\' does not exist."'); 10 shouldThrow('window.performance.measure("DoesNotExist", "AlsoDoesNotExis t")', '"SyntaxError: Failed to execute \'measure\' on \'Performance\': The mark \'AlsoDoesNotExist\' does not exist."');
11 11
12 window.performance.mark('mark'); 12 window.performance.mark('mark');
13 13
14 var allTheExceptionalThings = [ 14 var allTheExceptionalThings = [
15 'unloadEventStart', 15 'unloadEventStart',
16 'unloadEventEnd', 16 'unloadEventEnd',
17 'redirectStart', 17 'redirectStart',
18 'redirectEnd', 18 'redirectEnd',
19 'secureConnectionStart', 19 'secureConnectionStart',
20 'domInteractive', 20 'domInteractive',
21 'domContentLoadedEventStart', 21 'domContentLoadedEventStart',
22 'domContentLoadedEventEnd', 22 'domContentLoadedEventEnd',
23 'domComplete', 23 'domComplete',
24 'loadEventStart', 24 'loadEventStart',
25 'loadEventEnd', 25 'loadEventEnd',
26 ]; 26 ];
27 allTheExceptionalThings.forEach(function(name) { 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."'); 28 shouldThrow('window.performance.measure("measuring", \'' + name + '\ ', "mark")', '"InvalidAccessError: Failed to execute \'measure\' on \'Performanc e\': \'' + name + '\' is empty: either the event hasn\'t happened yet, or it wou ld provide cross-origin timing information."');
29 }); 29 });
30 </script> 30 </script>
31 </body> 31 </body>
32 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698