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

Unified Diff: test/inspector/cpu-profiler/enable-disable.js

Issue 2379303002: Revert "[inspector] added inspector test runner [part 3-5]" (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: test/inspector/cpu-profiler/enable-disable.js
diff --git a/test/inspector/cpu-profiler/enable-disable.js b/test/inspector/cpu-profiler/enable-disable.js
deleted file mode 100644
index dbf7c1df9edab7e4ace964db2baf201be4290b6b..0000000000000000000000000000000000000000
--- a/test/inspector/cpu-profiler/enable-disable.js
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2016 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-print("Test that profiling can only be started when Profiler was enabled and that Profiler.disable command will stop recording all profiles.");
-
-InspectorTest.sendCommand("Profiler.start", {}, didFailToStartWhenDisabled);
-disallowConsoleProfiles();
-
-function disallowConsoleProfiles()
-{
- InspectorTest.eventHandler["Profiler.consoleProfileStarted"] = function(messageObject)
- {
- InspectorTest.log("FAIL: console profile started " + JSON.stringify(messageObject, null, 4));
- }
- InspectorTest.eventHandler["Profiler.consoleProfileFinished"] = function(messageObject)
- {
- InspectorTest.log("FAIL: unexpected profile received " + JSON.stringify(messageObject, null, 4));
- }
-}
-function allowConsoleProfiles()
-{
- InspectorTest.eventHandler["Profiler.consoleProfileStarted"] = function(messageObject)
- {
- InspectorTest.log("PASS: console initiated profile started");
- }
- InspectorTest.eventHandler["Profiler.consoleProfileFinished"] = function(messageObject)
- {
- InspectorTest.log("PASS: console initiated profile received");
- }
-}
-function didFailToStartWhenDisabled(messageObject)
-{
- if (!InspectorTest.expectedError("didFailToStartWhenDisabled", messageObject))
- return;
- allowConsoleProfiles();
- InspectorTest.sendCommand("Profiler.enable", {});
- InspectorTest.sendCommand("Profiler.start", {}, didStartFrontendProfile);
-}
-function didStartFrontendProfile(messageObject)
-{
- if (!InspectorTest.expectedSuccess("didStartFrontendProfile", messageObject))
- return;
- InspectorTest.sendCommand("Runtime.evaluate", {expression: "console.profile('p1');"}, didStartConsoleProfile);
-}
-
-function didStartConsoleProfile(messageObject)
-{
- if (!InspectorTest.expectedSuccess("didStartConsoleProfile", messageObject))
- return;
- InspectorTest.sendCommand("Profiler.disable", {}, didDisableProfiler);
-}
-
-function didDisableProfiler(messageObject)
-{
- if (!InspectorTest.expectedSuccess("didDisableProfiler", messageObject))
- return;
- InspectorTest.sendCommand("Profiler.enable", {});
- InspectorTest.sendCommand("Profiler.stop", {}, didStopFrontendProfile);
-}
-
-function didStopFrontendProfile(messageObject)
-{
- if (!InspectorTest.expectedError("no front-end initiated profiles found", messageObject))
- return;
- disallowConsoleProfiles();
- InspectorTest.sendCommand("Runtime.evaluate", {expression: "console.profileEnd();"}, didStopConsoleProfile);
-}
-
-function didStopConsoleProfile(messageObject)
-{
- if (!InspectorTest.expectedSuccess("didStopConsoleProfile", messageObject))
- return;
- InspectorTest.completeTest();
-}
« no previous file with comments | « test/inspector/cpu-profiler/console-profile-expected.txt ('k') | test/inspector/cpu-profiler/enable-disable-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698