Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: LayoutTests/inspector/profiler/cpu-profiler-parameterless-profile-end-crash.html

Issue 15816002: Remove console.profiles from window.console API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698