| <!DOCTYPE html> |
| <html> |
| <head> |
| </head> |
| <body> |
| <script src="../../resources/js-test.js"></script> |
| <script> |
| description("This tests that 'performance.measure' throws exceptions with reasonable messages."); |
| |
| window.performance.mark('mark'); |
| const argAndConvertedArgs = { |
| "null": "\'null\'", |
| }; |
| Object.entries(argAndConvertedArgs).forEach(function(pair) { |
| shouldThrow('window.performance.measure("measuring", ' + pair[0] + ', "mark")', '"SyntaxError: Failed to execute \'measure\' on \'Performance\': The mark ' + pair[1]+ ' does not exist."'); |
| }); |
| </script> |
| </body> |
| </html> |