Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(684)

Unified Diff: chrome/test/data/extensions/api_test/isolated_world2/background.html

Issue 262002: Make all content scripts from an extension run in the same (Closed)
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/isolated_world2/background.html
diff --git a/chrome/test/data/extensions/api_test/isolated_world2/background.html b/chrome/test/data/extensions/api_test/isolated_world2/background.html
new file mode 100644
index 0000000000000000000000000000000000000000..731182f7141f6d3e024e328d5d406d84d4fe5b93
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/isolated_world2/background.html
@@ -0,0 +1,18 @@
+<script>
+chrome.extension.onConnect.addListener(function(port) {
+ chrome.test.log("got connect");
+ port.onMessage.addListener(function(msg) {
+ chrome.test.log("got message: " + msg);
+ chrome.test.assertTrue(msg);
+ chrome.test.notifyPass();
+ });
+});
+
+chrome.tabs.getAllInWindow(null, function(tabs) {
+ chrome.test.log("Got tabs: " + JSON.stringify(tabs));
+
+ // The last tab is the one that the other extension should have run scripts
+ // in.
+ chrome.tabs.executeScript(tabs.pop().id, {file: "a.js"});
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698