diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/user-timing/test_user_timing_mark_with_name_of_navigation_timing_optional_attribute.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/user-timing/test_user_timing_mark_with_name_of_navigation_timing_optional_attribute.html')
-rw-r--r-- | testing/web-platform/tests/user-timing/test_user_timing_mark_with_name_of_navigation_timing_optional_attribute.html | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/testing/web-platform/tests/user-timing/test_user_timing_mark_with_name_of_navigation_timing_optional_attribute.html b/testing/web-platform/tests/user-timing/test_user_timing_mark_with_name_of_navigation_timing_optional_attribute.html new file mode 100644 index 000000000..9532964ef --- /dev/null +++ b/testing/web-platform/tests/user-timing/test_user_timing_mark_with_name_of_navigation_timing_optional_attribute.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8" /> + <title>exception test of performance.mark</title> + <link rel="author" title="Intel" href="http://www.intel.com/" /> + <link rel="help" href="http://www.w3.org/TR/user-timing/#extensions-performance-interface"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="resources/webperftestharness.js"></script> + <script src="resources/webperftestharnessextension.js"></script> + <script> + setup({explicit_done: true}); + test_namespace(); + + function onload_test() { + if (window.performance !== undefined && window.performance.timing !== undefined && window.performance.timing.secureConnectionStart !== undefined) + { + var context = new PerformanceContext(window.performance); + var optionalAttribute = "secureConnectionStart"; + try + { + context.mark(optionalAttribute); + test_true(false, + "window.performance.mark(\"" + optionalAttribute + "\") threw an exception when " + + optinalAttribute + " attribute of Navigation Timing is supported."); + } + catch(e) + { + test_true(true, + "window.performance.mark(\"" + optionalAttribute + "\") threw an exception when " + + optionalAttribute + " attribute of Navigation Timing is supported."); + + // confirm that a SYNTAX_ERR exception is thrown and not any other exception + test_equals(e.code, + e.SYNTAX_ERR, + "window.performance.mark(\"" + optionalAttribute + "\") threw a SYNTAX_ERR when " + + optionalAttribute + " attribute of Navigation Timing is supported."); + } + } + else + { + test_true(true, + "This test is ignored when secureConnectionStart attribute of Navigation Timing is not supported."); + } + done(); + } + </script> + </head> + <body onload=onload_test()> + <h1>Description</h1> + <p>This test validates exception scenarios of invoking performance.mark() with param of "secureConnectionStart".</p> + <div id="log"></div> + </body> +</html> |