function stopHost() {
        port = chrome.extension.connectNative(appName);

        port.onDisconnect.addListener(
            chrome.test.callback(function() {}, "Native host has exited."));

        // Send first message that should stop the host.
        port.postMessage({ "stopHostTest": true });
      }
// Verify that the case when host stops itself is handled properly.
Verify that the case when host stops itself is handled properly.
Verify that the case when host stops itself is handled properly .
function stopHost() {
        port = chrome.extension.connectNative(appName);
        port.onDisconnect.addListener(
            chrome.test.callback(function() {}, "Native host has exited."));
        port.postMessage({ "stopHostTest": true });
      }
function stopHost ( ) { port = chrome . extension . connectNative ( appName ) ; port . onDisconnect . addListener ( chrome . test . callback ( function ( ) { } , "Native host has exited." ) ) ; port . postMessage ( { "stopHostTest" : true } ) ; }
Verify that the case when host stops itself is handled properly.
Verify that the case when host stops itself is handled properly .
// Send first message that should stop the host.