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

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

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

Powered by Google App Engine
This is Rietveld 408576698