OLD | NEW |
(Empty) | |
| 1 <script> |
| 2 chrome.extension.onConnect.addListener(function(port) { |
| 3 chrome.test.log("got connect"); |
| 4 port.onMessage.addListener(function(msg) { |
| 5 chrome.test.log("got message: " + msg); |
| 6 chrome.test.assertTrue(msg); |
| 7 chrome.test.notifyPass(); |
| 8 }); |
| 9 }); |
| 10 |
| 11 chrome.tabs.getAllInWindow(null, function(tabs) { |
| 12 chrome.test.log("Got tabs: " + JSON.stringify(tabs)); |
| 13 |
| 14 // The last tab is the one that the other extension should have run scripts |
| 15 // in. |
| 16 chrome.tabs.executeScript(tabs.pop().id, {file: "a.js"}); |
| 17 }); |
| 18 </script> |
OLD | NEW |