OLD | NEW |
---|---|
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 InspectorTest = {}; | 5 InspectorTest = {}; |
6 InspectorTest._dispatchTable = new Map(); | 6 InspectorTest._dispatchTable = new Map(); |
7 InspectorTest._requestId = 0; | 7 InspectorTest._requestId = 0; |
8 InspectorTest._dumpInspectorProtocolMessages = false; | 8 InspectorTest._dumpInspectorProtocolMessages = false; |
9 InspectorTest.eventHandler = {}; | 9 InspectorTest.eventHandler = {}; |
10 | 10 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 lines.push(firstLinePrefix + "["); | 126 lines.push(firstLinePrefix + "["); |
127 for (var i = 0; i < object.length; ++i) | 127 for (var i = 0; i < object.length; ++i) |
128 dumpValue(object[i], " " + prefix, " " + prefix + "[" + i + "] : "); | 128 dumpValue(object[i], " " + prefix, " " + prefix + "[" + i + "] : "); |
129 lines.push(prefix + "]"); | 129 lines.push(prefix + "]"); |
130 } | 130 } |
131 | 131 |
132 dumpValue(object, "", title); | 132 dumpValue(object, "", title); |
133 InspectorTest.log(lines.join("\n")); | 133 InspectorTest.log(lines.join("\n")); |
134 } | 134 } |
135 | 135 |
136 InspectorTest.logMessage = function(message) | |
137 { | |
138 message.id = 0; | |
dgozman
2016/09/30 16:45:30
We can also zero-out objectId's inside the message
kozy
2016/10/03 15:04:09
Done.
| |
139 InspectorTest.logObject(message); | |
140 return message; | |
141 } | |
142 | |
136 InspectorTest.completeTest = quit.bind(null); | 143 InspectorTest.completeTest = quit.bind(null); |
137 | 144 |
138 InspectorTest.evaluateInPage = function(string, callback) | 145 InspectorTest.evaluateInPage = function(string, callback) |
139 { | 146 { |
140 InspectorTest.sendCommand("Runtime.evaluate", { "expression": string }, functi on(message) { | 147 InspectorTest.sendCommand("Runtime.evaluate", { "expression": string }, functi on(message) { |
141 if (message.error) { | 148 if (message.error) { |
142 InspectorTest.log("Error while executing '" + string + "': " + message.err or.message); | 149 InspectorTest.log("Error while executing '" + string + "': " + message.err or.message); |
143 InspectorTest.completeTest(); | 150 InspectorTest.completeTest(); |
144 } | 151 } |
145 else if (callback) | 152 else if (callback) |
(...skipping 22 matching lines...) Expand all Loading... | |
168 if (!testSuite.length) { | 175 if (!testSuite.length) { |
169 InspectorTest.completeTest(); | 176 InspectorTest.completeTest(); |
170 return; | 177 return; |
171 } | 178 } |
172 var fun = testSuite.shift(); | 179 var fun = testSuite.shift(); |
173 InspectorTest.log("\nRunning test: " + fun.name); | 180 InspectorTest.log("\nRunning test: " + fun.name); |
174 fun(nextTest); | 181 fun(nextTest); |
175 } | 182 } |
176 nextTest(); | 183 nextTest(); |
177 } | 184 } |
OLD | NEW |