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

Side by Side Diff: test/inspector/cpu-profiler/record-cpu-profile.js

Issue 2713023004: [inspector] added reconnect method for tests (Closed)
Patch Set: rebased Created 3 years, 9 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
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 print("Test that profiler is able to record a profile. Also it tests that profil er returns an error when it unable to find the profile."); 5 InspectorTest.log("Test that profiler is able to record a profile. Also it tests that profiler returns an error when it unable to find the profile.");
6 6
7 Protocol.Profiler.enable(); 7 Protocol.Profiler.enable();
8 Protocol.Profiler.start().then(didStartFrontendProfile); 8 Protocol.Profiler.start().then(didStartFrontendProfile);
9 function didStartFrontendProfile(messageObject) 9 function didStartFrontendProfile(messageObject)
10 { 10 {
11 if (!InspectorTest.expectedSuccess("startFrontendProfile", messageObject)) 11 if (!InspectorTest.expectedSuccess("startFrontendProfile", messageObject))
12 return; 12 return;
13 Protocol.Runtime.evaluate({expression: "console.profile('Profile 1');"}).then( didStartConsoleProfile); 13 Protocol.Runtime.evaluate({expression: "console.profile('Profile 1');"}).then( didStartConsoleProfile);
14 } 14 }
15 15
(...skipping 23 matching lines...) Expand all
39 if (!InspectorTest.expectedSuccess("startFrontendProfileSecondTime", messageOb ject)) 39 if (!InspectorTest.expectedSuccess("startFrontendProfileSecondTime", messageOb ject))
40 return; 40 return;
41 Protocol.Profiler.stop().then(didStopFrontendProfile2); 41 Protocol.Profiler.stop().then(didStopFrontendProfile2);
42 } 42 }
43 43
44 function didStopFrontendProfile2(messageObject) 44 function didStopFrontendProfile2(messageObject)
45 { 45 {
46 InspectorTest.expectedSuccess("stopFrontendProfileSecondTime", messageObject) 46 InspectorTest.expectedSuccess("stopFrontendProfileSecondTime", messageObject)
47 InspectorTest.completeTest(); 47 InspectorTest.completeTest();
48 } 48 }
OLDNEW
« no previous file with comments | « test/inspector/cpu-profiler/enable-disable.js ('k') | test/inspector/cpu-profiler/stop-without-preceeding-start.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698