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

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

Issue 6330010: Prevent extensions from moving tabs between profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 9 years, 11 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
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module_constants.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/incognito/apis/background.html
diff --git a/chrome/test/data/extensions/api_test/incognito/apis/background.html b/chrome/test/data/extensions/api_test/incognito/apis/background.html
index f57523f4d3c14da66db994ba61785a45226cbd65..8f5d4c7eb3765295ae56dcbb0a5bfffa1ae33f1d 100644
--- a/chrome/test/data/extensions/api_test/incognito/apis/background.html
+++ b/chrome/test/data/extensions/api_test/incognito/apis/background.html
@@ -3,6 +3,7 @@ var normalWindow, normalTab;
var incognitoWindow, incognitoTab;
var pass = chrome.test.callbackPass;
+var fail = chrome.test.callbackFail;
var assertEq = chrome.test.assertEq;
var assertTrue = chrome.test.assertTrue;
@@ -107,6 +108,21 @@ chrome.test.getConfig(function(config) {
}));
}));
}));
+ },
+
+ // Tests that extensions can't move tabs between incognito and
+ // non-incognito windows.
+ function moveTabBetweenProfiles() {
+ var errorMsg = "Tabs can only be moved between " +
+ "windows in the same profile.";
+
+ // Create a tab in the non-incognito window...
+ chrome.tabs.create({windowId: normalWindow.id, url: 'about:blank'},
+ pass(function(tab) {
+ // ... and then try to move it to the incognito window.
+ chrome.tabs.move(tab.id,
+ {windowId: incognitoWindow.id, index: 0}, fail(errorMsg));
+ }));
}
]);
});
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698