Index: LayoutTests/inspector/profiler/cpu-profiler-profiling-without-inspector.html |
diff --git a/LayoutTests/inspector/profiler/cpu-profiler-profiling-without-inspector.html b/LayoutTests/inspector/profiler/cpu-profiler-profiling-without-inspector.html |
deleted file mode 100644 |
index 22e3a997d7a698fd960e2cca56c711efff9ec879..0000000000000000000000000000000000000000 |
--- a/LayoutTests/inspector/profiler/cpu-profiler-profiling-without-inspector.html |
+++ /dev/null |
@@ -1,84 +0,0 @@ |
-<html> |
-<head> |
-<script> |
- |
-if (window.testRunner) |
- testRunner.dumpAsText(); |
-if (window.internals) |
- internals.setJavaScriptProfilingEnabled(true); |
- |
-function pageFunction() |
-{ |
- console.profile("outer"); |
- console.profile("inner"); // [Chromium] Make sure we capture the current callstack. |
- console.profileEnd("outer"); |
- console.profileEnd("inner"); |
-} |
- |
-function startTest() |
-{ |
- pageFunction(); |
- printResult(); |
- if (window.testRunner) |
- testRunner.notifyDone(); |
-} |
- |
-function printResult() |
-{ |
- var preElement = document.createElement("pre"); |
- preElement.appendChild(document.createTextNode("\n")); |
- |
- var profiles = console.profiles; |
- for (var i = 0; i < profiles.length; ++i) { |
- var profile = profiles[i]; |
- if (profile.title !== "inner") |
- continue; |
- var functionName = "pageFunction"; |
- if (findFunctionInProfile(profile.head, functionName)) |
- preElement.appendChild(document.createTextNode("Found " + functionName)); |
- else { |
- preElement.appendChild(document.createTextNode("!!! Not found " + functionName)); |
- preElement.appendChild(document.createTextNode("\n\n")); |
- printProfileNodeWithoutTime(preElement, profile.head, ""); |
- } |
- preElement.appendChild(document.createTextNode("\n")); |
- } |
- |
- document.getElementById("output").appendChild(preElement); |
-} |
- |
-function printProfileNodeWithoutTime(preElement, node, space) |
-{ |
- if (!node.visible) |
- return; |
- |
- var line = space + node.functionName + " (line " + node.lineNumber + ")\n"; |
- preElement.appendChild(document.createTextNode(line)); |
- |
- var children = node.children(); |
- for (var i = 0; i < children.length; ++i) |
- printProfileNodeWithoutTime(preElement, children[i], space + " "); |
-} |
- |
-function findFunctionInProfile(node, functionName) |
-{ |
- if (node.functionName === functionName) |
- return true; |
- var children = node.children(); |
- for (var i = 0; i < children.length; ++i) |
- if (findFunctionInProfile(children[i], functionName)) |
- return true; |
- return false; |
-} |
- |
-</script> |
-</head> |
-<body onload="startTest()"> |
-<p> |
-Tests that CPU profiling works.<br> |
-Doesn't open Inspector, uses <b>console.profile...</b>. |
- |
-<div id="output"></div> |
-</p> |
-</body> |
-</html> |