OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script> | |
4 | |
5 if (window.testRunner) | |
6 testRunner.dumpAsText(); | |
7 if (window.internals) | |
8 internals.setJavaScriptProfilingEnabled(true); | |
9 | |
10 function pageFunction() | |
11 { | |
12 console.profile(); // Untitled | |
13 console.profile("titled"); | |
14 console.profileEnd(); | |
15 console.profileEnd(); | |
16 } | |
17 | |
18 function startTest() | |
19 { | |
20 pageFunction(); | |
21 printResult(); | |
22 if (window.testRunner) | |
23 testRunner.notifyDone(); | |
24 } | |
25 | |
26 function printResult() | |
27 { | |
28 var preElement = document.createElement("pre"); | |
29 preElement.appendChild(document.createTextNode("\n")); | |
30 | |
31 var profiles = console.profiles; | |
32 preElement.appendChild(document.createTextNode("Profiles count: " + profiles
.length + "\n")); | |
33 for (var i = 0; i < profiles.length; ++i) { | |
34 if (profiles[i].title === "titled") | |
35 preElement.appendChild(document.createTextNode("Titled profile found
.\n")); | |
36 } | |
37 document.getElementById("output").appendChild(preElement); | |
38 } | |
39 | |
40 </script> | |
41 </head> | |
42 <body onload="startTest()"> | |
43 <p> | |
44 Tests that "console.profileEnd()" do not cause crash.<br> | |
45 <a href="https://bugs.webkit.org/show_bug.cgi?id=105759">Bug 105759.</a><br> | |
46 <div id="output"></div> | |
47 </p> | |
48 </body> | |
49 </html> | |
OLD | NEW |