From 32b7c4995d5f5ecc034999c02c28ded2190c6888 Mon Sep 17 00:00:00 2001 From: "aa@chromium.org" Date: Wed, 1 Sep 2010 04:15:00 +0000 Subject: 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 --- chrome/browser/extensions/window_open_apitest.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 chrome/browser/extensions/window_open_apitest.cc (limited to 'chrome/browser/extensions/window_open_apitest.cc') 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(); +} -- cgit v1.1