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

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

Issue 2851913002: [DevTools] Do not expose agents on Target
Patch Set: storage and tests.js Created 3 years, 7 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 var messages = []; 8 var messages = [];
9 function collectMessages(message) 9 function collectMessages(message)
10 { 10 {
11 messages.push(message); 11 messages.push(message);
12 } 12 }
13 Protocol.TargetBase.prototype._dumpProtocolMessage = collectMessages; 13 Protocol.Dispatcher.prototype._dumpProtocolMessage = collectMessages;
14 Protocol.InspectorBackend.Options.dumpInspectorProtocolMessages = 1; 14 Protocol.InspectorBackend.Options.dumpInspectorProtocolMessages = 1;
15 messages.push("--> SDK.targetManager.suspendAllTargets();"); 15 messages.push("--> SDK.targetManager.suspendAllTargets();");
16 SDK.targetManager.suspendAllTargets(); 16 SDK.targetManager.suspendAllTargets();
17 messages.push(""); 17 messages.push("");
18 messages.push("--> SDK.targetManager.resumeAllTargets();"); 18 messages.push("--> SDK.targetManager.resumeAllTargets();");
19 SDK.targetManager.resumeAllTargets(); 19 SDK.targetManager.resumeAllTargets();
20 messages.push(""); 20 messages.push("");
21 messages.push("--> done"); 21 messages.push("--> done");
22 Protocol.InspectorBackend.Options.dumpInspectorProtocolMessages = 0; 22 Protocol.InspectorBackend.Options.dumpInspectorProtocolMessages = 0;
23 for (var i = 0; i < messages.length; ++i) { 23 for (var i = 0; i < messages.length; ++i) {
24 var message = messages[i]; 24 var message = messages[i];
25 message = message.replace(/"id":\d+,/, '"id":<number>,'); 25 message = message.replace(/"id":\d+,/, '"id":<number>,');
26 InspectorTest.addResult(message); 26 InspectorTest.addResult(message);
27 } 27 }
28 InspectorTest.completeTest(); 28 InspectorTest.completeTest();
29 } 29 }
30 30
31 </script> 31 </script>
32 </head> 32 </head>
33 33
34 <body onload="runTest()"> 34 <body onload="runTest()">
35 <p> 35 <p>
36 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.
37 </p> 37 </p>
38 38
39 </body> 39 </body>
40 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698