summaryrefslogtreecommitdiffstats
path: root/chrome/test/data
diff options
context:
space:
mode:
authorfangjue23303@gmail.com <fangjue23303@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-06 10:33:22 +0000
committerfangjue23303@gmail.com <fangjue23303@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-06 10:33:22 +0000
commit74af23e2a47b1a435f57ff6bf7594c9ec1c2df90 (patch)
treee6b59d3241089c7e931fbd119eb8ca1d547c3b65 /chrome/test/data
parent5f78f294dbc6e7056c89a24c9635fc82de1078c3 (diff)
downloadchromium_src-74af23e2a47b1a435f57ff6bf7594c9ec1c2df90.zip
chromium_src-74af23e2a47b1a435f57ff6bf7594c9ec1c2df90.tar.gz
chromium_src-74af23e2a47b1a435f57ff6bf7594c9ec1c2df90.tar.bz2
Don't create an extra new tab when calling chrome.windows.create for a popup
Calling chrome.windows.create({type: 'popup'}) without specifying URLs creates a new tab in addition to an empty popup. This CL fixes it. BUG=226289 Review URL: https://chromiumcodereview.appspot.com/13605004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192738 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data')
-rw-r--r--chrome/test/data/extensions/api_test/tabs/basics/crud2.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/test/data/extensions/api_test/tabs/basics/crud2.js b/chrome/test/data/extensions/api_test/tabs/basics/crud2.js
index 300ac72..8ffedb3 100644
--- a/chrome/test/data/extensions/api_test/tabs/basics/crud2.js
+++ b/chrome/test/data/extensions/api_test/tabs/basics/crud2.js
@@ -136,5 +136,20 @@ chrome.test.runTests([
assertEq(window.id, tab.windowId);
}));
}));
+ },
+
+ // An empty popup window does not contain any tabs and the number of tabs
+ // before and after creation should be the same.
+ function testOpenEmptyPopup() {
+ chrome.tabs.query({}, pass(function(tabs) {
+ var tabsCountBefore = tabs.length;
+ chrome.windows.create({type: 'popup'}, pass(function(window) {
+ assertEq(window.tabs.length, 0);
+ chrome.tabs.query({}, pass(function(tabs) {
+ assertEq(tabsCountBefore, tabs.length);
+ }));
+ }));
+ }));
}
+
]);