• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html>
2<html>
3    <head>
4        <meta charset="utf-8" />
5        <title>exception test of performance.mark and performance.measure</title>
6        <link rel="author" title="Intel" href="http://www.intel.com/" />
7        <link rel="help" href="https://w3c.github.io/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    </head>
12    <body>
13        <h1>Description</h1>
14        <p>This test validates exception scenarios of invoking mark() and measure() without parameter.</p>
15        <div id="log"></div>
16        <script>
17test(function () {
18    assert_throws_js(TypeError, function () { window.performance.mark() });
19}, "window.performance.mark() throws a TypeError exception when invoke without a parameter.");
20
21test(function () {
22    assert_throws_js(TypeError, function () { window.performance.measure(); });
23}, "window.performance.measure() throws a TypeError exception when invoke without a parameter.");
24        </script>
25    </body>
26</html>
27