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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/profiler/agents-disabled-check.html

Issue 2828863002: [DevTools] enable async stacks by default (Closed)
Patch Set: ac Created 3 years, 8 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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script> 4 <script>
5 5
6 function test() 6 function test()
7 { 7 {
8 Common.settingForTest("enableAsyncStackTraces").set(true);
9 var messages = []; 8 var messages = [];
10 function collectMessages(message) 9 function collectMessages(message)
11 { 10 {
12 messages.push(message); 11 messages.push(message);
13 } 12 }
14 Protocol.TargetBase.prototype._dumpProtocolMessage = collectMessages; 13 Protocol.TargetBase.prototype._dumpProtocolMessage = collectMessages;
15 Protocol.InspectorBackend.Options.dumpInspectorProtocolMessages = 1; 14 Protocol.InspectorBackend.Options.dumpInspectorProtocolMessages = 1;
16 messages.push("--> SDK.targetManager.suspendAllTargets();"); 15 messages.push("--> SDK.targetManager.suspendAllTargets();");
17 SDK.targetManager.suspendAllTargets(); 16 SDK.targetManager.suspendAllTargets();
18 messages.push(""); 17 messages.push("");
19 messages.push("--> SDK.targetManager.resumeAllTargets();"); 18 messages.push("--> SDK.targetManager.resumeAllTargets();");
20 SDK.targetManager.resumeAllTargets(); 19 SDK.targetManager.resumeAllTargets();
21 messages.push(""); 20 messages.push("");
22 messages.push("--> done"); 21 messages.push("--> done");
23 Protocol.InspectorBackend.Options.dumpInspectorProtocolMessages = 0; 22 Protocol.InspectorBackend.Options.dumpInspectorProtocolMessages = 0;
24 for (var i = 0; i < messages.length; ++i) { 23 for (var i = 0; i < messages.length; ++i) {
25 var message = messages[i]; 24 var message = messages[i];
26 message = message.replace(/"id":\d+,/, '"id":<number>,'); 25 message = message.replace(/"id":\d+,/, '"id":<number>,');
27 InspectorTest.addResult(message); 26 InspectorTest.addResult(message);
28 } 27 }
29 Common.settingForTest("enableAsyncStackTraces").set(false);
30 InspectorTest.completeTest(); 28 InspectorTest.completeTest();
31 } 29 }
32 30
33 </script> 31 </script>
34 </head> 32 </head>
35 33
36 <body onload="runTest()"> 34 <body onload="runTest()">
37 <p> 35 <p>
38 Test that if a profiler is working all the agents are disabled. 36 Test that if a profiler is working all the agents are disabled.
39 </p> 37 </p>
40 38
41 </body> 39 </body>
42 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698