1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 var otherId = 'ljhhihhmjomkjokmknellgbidphmahkh';
7 chrome.runtime.onConnectExternal.addListener(function(port) {
8 port.onMessage.addListener(function(msg) {
9 if (msg == 'ok_to_disconnect') {
12 port.postMessage(msg + '_reply');
17 chrome.runtime.onMessageExternal.addListener(function(msg, sender, callback) {
18 chrome.test.assertEq({id: otherId}, sender);
20 callback('hello_response');