summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-02 18:21:02 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-02 18:21:02 +0000
commitcdc6a8eed6416ab6efb3195186f4a26696ea2af3 (patch)
treef4d95d42f00eebb268fc8a6e94d3b77310eb93cc /chrome/test
parent33ae34cd0174a199b85c6dc22145c72e007a1ee8 (diff)
downloadchromium_src-cdc6a8eed6416ab6efb3195186f4a26696ea2af3.zip
chromium_src-cdc6a8eed6416ab6efb3195186f4a26696ea2af3.tar.gz
chromium_src-cdc6a8eed6416ab6efb3195186f4a26696ea2af3.tar.bz2
Create a window with an existing tab and move a tab from a popup to a normal window
- Add a "tabId" property to chrome.windows.create(), which would imply that an existing tab is moved into the new window. - Add the ability to move tabs from popup windows to normal windows. BUG=49653 TEST=NONE Patch contributed by jingzhao@google.com Original review: http://codereview.chromium.org/5128005/ Review URL: http://codereview.chromium.org/5429003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68031 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/extensions/api_test/tabs/basics/crud.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/api_test/tabs/basics/crud.html b/chrome/test/data/extensions/api_test/tabs/basics/crud.html
index b9ebeee..16838aa 100644
--- a/chrome/test/data/extensions/api_test/tabs/basics/crud.html
+++ b/chrome/test/data/extensions/api_test/tabs/basics/crud.html
@@ -70,6 +70,24 @@ chrome.test.runTests([
chrome.windows.create({url:[]}, verify_default());
},
+ function createWindowWithExistingTab() {
+ // Create a tab in the old window
+ chrome.tabs.create({"windowId" : firstWindowId, "url": pageUrl('a'),
+ "selected" : false},
+ pass(function(tab) {
+ assertEq(firstWindowId, tab.windowId);
+ assertEq(pageUrl('a'), tab.url);
+
+ // Create a new window with this tab
+ chrome.windows.create({"tabId": tab.id}, pass(function(win) {
+ assertEq(1, win.tabs.length);
+ assertEq(tab.id, win.tabs[0].id);
+ assertEq(win.id, win.tabs[0].windowId);
+ assertEq(pageUrl('a'), win.tabs[0].url);
+ }));
+ }));
+ },
+
function setupTwoWindows() {
createWindow(["about:blank", "chrome://newtab/", pageUrl("a")], {},
pass(function(winId, tabIds) {