- chrome.test.callback(function(response) {
- chrome.test.assertEq(typeof response, "undefined");
- }, "Specified native messaging host not found."));
+ chrome.test.callbackFail(
+ "Specified native messaging host not found.",
+ function(response) {
+ chrome.test.assertEq(undefined, response);
+ }));
+ },
+
+ function nonexistentHost() {
+ var message = {"text": "Hello!"};
+ chrome.runtime.sendNativeMessage(
+ 'com.google.chrome.test.host_binary_missing', message,
+ chrome.test.callbackFail(
+ "Specified native messaging host not found.",
+ function(response) {
+ chrome.test.assertEq(undefined, response);
+ }));