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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/inspector-backend-commands.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 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or g/TR/html4/loose.dtd"> 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or g/TR/html4/loose.dtd">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../http/tests/inspector/inspector-test.js"></script> 4 <script src="../http/tests/inspector/inspector-test.js"></script>
5 <script> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 function dumpArgument(name, value) 8 function dumpArgument(name, value)
9 { 9 {
10 InspectorTest.addResult(name + " result: " + (typeof value === "string" ? value : JSON.stringify(value))); 10 InspectorTest.addResult(name + " result: " + (typeof value === "string" ? value : JSON.stringify(value)));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 ] 59 ]
60 }, 60 },
61 { 61 {
62 "name": "commandError", 62 "name": "commandError",
63 "parameters": [ 63 "parameters": [
64 {"name": "error", "type": "object"} 64 {"name": "error", "type": "object"}
65 ] 65 ]
66 }] 66 }]
67 }]}; 67 }]};
68 // The protocol definition above is not used, but is left as a reference for commands below. 68 // The protocol definition above is not used, but is left as a reference for commands below.
69 InspectorBackend.registerCommand("Profiler.commandArgs0", [], [], false); 69 Protocol.inspectorBackend.registerCommand("Profiler.commandArgs0", [], [], f alse);
70 InspectorBackend.registerCommand("Profiler.commandArgs1Rets0", [{"name": "ar g1", "type": "number", "optional": false}], [], false); 70 Protocol.inspectorBackend.registerCommand("Profiler.commandArgs1Rets0", [{"n ame": "arg1", "type": "number", "optional": false}], [], false);
71 InspectorBackend.registerCommand("Profiler.commandArgs1Rets1", [{"name": "ar g1", "type": "object", "optional": false}], ["arg1"], false); 71 Protocol.inspectorBackend.registerCommand("Profiler.commandArgs1Rets1", [{"n ame": "arg1", "type": "object", "optional": false}], ["arg1"], false);
72 InspectorBackend.registerCommand("Profiler.commandArgs3Rets3", 72 Protocol.inspectorBackend.registerCommand("Profiler.commandArgs3Rets3",
73 [{"name": "arg1", "type": "object", "optional": false}, {"name": "arg2", "type": "number", "optional": true}, {"name": "arg3", "type": "string", "option al": true}], ["arg1", "arg2", "arg3"], false); 73 [{"name": "arg1", "type": "object", "optional": false}, {"name": "arg2", "type": "number", "optional": true}, {"name": "arg3", "type": "string", "option al": true}], ["arg1", "arg2", "arg3"], false);
74 InspectorBackend.registerCommand("Profiler.commandError", [{"name": "error", "type": "object", "optional": false}], [], false); 74 Protocol.inspectorBackend.registerCommand("Profiler.commandError", [{"name": "error", "type": "object", "optional": false}], [], false);
75 75
76 var sendMessageToBackendOriginal = InspectorFrontendHost.sendMessageToBacken d; 76 var sendMessageToBackendOriginal = InspectorFrontendHost.sendMessageToBacken d;
77 InspectorFrontendHost.sendMessageToBackend = sendMessageToBackendLoopback; 77 InspectorFrontendHost.sendMessageToBackend = sendMessageToBackendLoopback;
78 78
79 function defaultHandler() { 79 function defaultHandler() {
80 return Array.prototype.slice.call(arguments); 80 return Array.prototype.slice.call(arguments);
81 } 81 }
82 82
83 var agent = SDK.targetManager.mainTarget().profilerAgent(); 83 var agent = SDK.targetManager.mainTarget().profilerAgent();
84 Promise.resolve() 84 Promise.resolve()
(...skipping 21 matching lines...) Expand all
106 InspectorFrontendHost.sendMessageToBackend = sendMessageToBackendOrigina l; 106 InspectorFrontendHost.sendMessageToBackend = sendMessageToBackendOrigina l;
107 InspectorTest.completeTest(); 107 InspectorTest.completeTest();
108 } 108 }
109 } 109 }
110 </script> 110 </script>
111 </head> 111 </head>
112 <body onload="runTest()"> 112 <body onload="runTest()">
113 <p>Tests correctness of promisified protocol commands.</p> 113 <p>Tests correctness of promisified protocol commands.</p>
114 </body> 114 </body>
115 </html> 115 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698