Index: third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html |
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html b/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html |
deleted file mode 100644 |
index c66013ee8d0f4ecc9e03e1d6ce557d1859f32c39..0000000000000000000000000000000000000000 |
--- a/third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/console-profile.html |
+++ /dev/null |
@@ -1,67 +0,0 @@ |
-<html> |
-<head> |
-<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> |
-<script> |
-function collectProfiles() |
-{ |
- console.profile("outer"); |
- console.profile(42); |
- console.profileEnd("outer"); |
- console.profileEnd(42); |
-} |
- |
-function test() |
-{ |
- InspectorTest.fail = function(message) |
- { |
- InspectorTest.log("FAIL: " + message); |
- InspectorTest.completeTest(); |
- } |
- |
- InspectorTest.sendCommand("Profiler.enable", {}); |
- InspectorTest.sendCommand("Runtime.evaluate", { expression: "collectProfiles()"}, didCollectProfiles); |
- |
- var headers = []; |
- InspectorTest.eventHandler["Profiler.consoleProfileFinished"] = function(messageObject) |
- { |
- headers.push({ |
- profile: messageObject["params"]["profile"], |
- title: messageObject["params"]["title"] |
- }); |
- } |
- |
- function didCollectProfiles(messageObject) |
- { |
- if (headers.length !== 2) |
- return InspectorTest.fail("Cannot retrive headers: " + JSON.stringify(messageObject, null, 4)); |
- for (var i = 0; i < headers.length; i++) { |
- if (headers[i].title === "42") { |
- checkInnerProfile(headers[i].profile); |
- return; |
- } |
- } |
- InspectorTest.fail("Cannot find '42' profile header"); |
- } |
- |
- function checkInnerProfile(profile) |
- { |
- InspectorTest.log("SUCCESS: retrieved '42' profile"); |
- if (!findFunctionInProfile(profile.nodes, "collectProfiles")) |
- return InspectorTest.fail("collectProfiles function not found in the profile: " + JSON.stringify(profile, null, 4)); |
- InspectorTest.log("SUCCESS: found 'collectProfiles' function in the profile"); |
- InspectorTest.completeTest(); |
- } |
- |
- function findFunctionInProfile(nodes, functionName) |
- { |
- return nodes.some(n => n.callFrame.functionName === functionName); |
- } |
-} |
-</script> |
-</head> |
-<body onload="runTest()"> |
-<p> |
-Tests that console.profile/profileEnd will record CPU profile when inspector front-end is connected.<br> |
-</p> |
-</body> |
-</html> |