Chromium Code Reviews| Index: LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js |
| diff --git a/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js b/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js |
| index c650ea176ea455b00c7668c6bd4e819417de2f2c..b70df0d920f08aae656d208af403432b42e54f10 100644 |
| --- a/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js |
| +++ b/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js |
| @@ -228,6 +228,20 @@ InspectorTest.importScript = function(scriptName) |
| window.eval(xhr.responseText + "\n//@ sourceURL=" + scriptName); |
| } |
| +InspectorTest.sendCommandOrDie = function(command, properties, callback) { |
|
apavlov
2014/02/20 09:58:14
The name does not clearly describe the functionali
lushnikov
2014/02/20 14:17:04
Done.
|
| + InspectorTest.sendCommand(command, properties || {}, commandCallback); |
| + function commandCallback(msg) |
| + { |
| + if (msg.error) { |
| + InspectorTest.log(msg.error.message); |
|
apavlov
2014/02/20 09:58:14
I'd vote for ("ERROR: " + msg.error.message), sinc
lushnikov
2014/02/20 14:17:04
Done.
|
| + InspectorTest.completeTest(); |
| + return; |
| + } |
| + if (callback) |
| + callback(msg.result); |
| + } |
| +} |
| + |
| window.addEventListener("message", function(event) { |
| try { |
| eval(event.data); |