summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/window_open_apitest.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 04:15:00 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 04:15:00 +0000
commit32b7c4995d5f5ecc034999c02c28ded2190c6888 (patch)
tree8c497d9e6360444b65959e7b4f2911bea781b917 /chrome/browser/extensions/window_open_apitest.cc
parent771f68f817de7ce98949b29a68aa8778c7553640 (diff)
downloadchromium_src-32b7c4995d5f5ecc034999c02c28ded2190c6888.zip
chromium_src-32b7c4995d5f5ecc034999c02c28ded2190c6888.tar.gz
chromium_src-32b7c4995d5f5ecc034999c02c28ded2190c6888.tar.bz2
window.open() from an extension should always goes in normal browser. When the split incognito stuff lands, I will change this to allow window.open() to go to incognito if you're in split mode.
BUG=52298 TEST=browser_tests --gtest_filter=ExtensionApiTest.WindowOpen Review URL: http://codereview.chromium.org/3249012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58120 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/window_open_apitest.cc')
-rw-r--r--chrome/browser/extensions/window_open_apitest.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/extensions/window_open_apitest.cc b/chrome/browser/extensions/window_open_apitest.cc
new file mode 100644
index 0000000..2360241
--- /dev/null
+++ b/chrome/browser/extensions/window_open_apitest.cc
@@ -0,0 +1,17 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/command_line.h"
+#include "chrome/browser/extensions/extension_apitest.h"
+#include "chrome/common/chrome_switches.h"
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpen) {
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kEnableExperimentalExtensionApis);
+
+ ResultCatcher catcher;
+ ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_
+ .AppendASCII("window_open").AppendASCII("spanning")));
+ EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+}