tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

invoke_without_parameter.html (1141B)


      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>
     17 test(function () {
     18    assert_throws_js(TypeError, function () { window.performance.mark() });
     19 }, "window.performance.mark() throws a TypeError exception when invoke without a parameter.");
     20 
     21 test(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>