Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / inspector / console-time.html
blob6c243736d4e0627d34f7432c542de21bbb4e3173
1 <script>
2 function test() {
3 // Test 1: call timeEnd before time
4 console.log(">>>console.timeEnd(\"1\")");
5 console.timeEnd("1");
6 // Test 2: call time two times before timeEnd
7 console.log(">>>console.time(\"2\")");
8 console.time("2");
9 setTimeout(function() {
10 console.log(">>>console.time(\"2\")");
11 console.time("2");
12 console.log(">>>console.timeEnd(\"2\")");
13 console.timeEnd("2");
14 console.log("2: If it says ~1000ms the first time is not overwritten.");
15 }, 1000);
16 // Test 3: call timeEnd two times
17 console.log(">>>console.time(\"3\")");
18 console.time("3");
19 console.log(">>>console.timeEnd(\"3\")");
20 console.timeEnd("3");
21 console.log(">>>console.timeEnd(\"3\")");
22 console.timeEnd("3");
23 // Test 4: call time/timeEnd without title parameter
24 console.log(">>>console.time()");
25 console.time();
26 console.log(">>>console.timeEnd()");
27 console.timeEnd();
30 </script>
31 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19159">Bug 19159: Inspector should support console.time/console.timeEnd</a>.</p>
32 <p>Open the Inspector (right-click and choose "Inspect Element"), then click the "Run Tests" button.</p>
33 <button onclick="test()">Run Tests</button>