4 <meta charset="utf-8" />
5 <title>exception test of performance.mark</title>
6 <link rel="author" title="Intel" href="http://www.intel.com/" />
7 <link rel="help" href="http://www.w3.org/TR/user-timing/#extensions-performance-interface"/>
8 <script src="../../resources/testharness.js"></script>
9 <script src="../../resources/testharnessreport.js"></script>
10 <script src="resources/webperftestharness.js"></script>
11 <script src="resources/webperftestharnessextension.js"></script>
13 setup({explicit_done: true});
16 function onload_test() {
17 if (window.performance !== undefined && window.performance.timing !== undefined && window.performance.timing.secureConnectionStart !== undefined)
19 var context = new PerformanceContext(window.performance);
20 var optionalAttribute = "secureConnectionStart";
23 context.mark(optionalAttribute);
25 "window.performance.mark(\"" + optionalAttribute + "\") threw an exception when " +
26 optinalAttribute + " attribute of Navigation Timing is supported.");
31 "window.performance.mark(\"" + optionalAttribute + "\") threw an exception when " +
32 optionalAttribute + " attribute of Navigation Timing is supported.");
34 // confirm that a SYNTAX_ERR exception is thrown and not any other exception
37 "window.performance.mark(\"" + optionalAttribute + "\") threw a SYNTAX_ERR when " +
38 optionalAttribute + " attribute of Navigation Timing is supported.");
44 "This test is ignored when secureConnectionStart attribute of Navigation Timing is not supported.");
50 <body onload=onload_test()>
52 <p>This test validates exception scenarios of invoking performance.mark() with param of "secureConnectionStart".</p>