OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "chrome/browser/browser.h" | |
7 #include "chrome/browser/browser_list.h" | |
8 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/browser/tab_contents/tab_contents.h" | 7 #include "chrome/browser/tab_contents/tab_contents.h" |
| 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/browser_list.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
11 #include "chrome/test/ui_test_utils.h" | 11 #include "chrome/test/ui_test_utils.h" |
12 #include "net/base/mock_host_resolver.h" | 12 #include "net/base/mock_host_resolver.h" |
13 | 13 |
14 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpen) { | 14 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpen) { |
15 CommandLine::ForCurrentProcess()->AppendSwitch( | 15 CommandLine::ForCurrentProcess()->AppendSwitch( |
16 switches::kEnableExperimentalExtensionApis); | 16 switches::kEnableExperimentalExtensionApis); |
17 | 17 |
18 ResultCatcher catcher; | 18 ResultCatcher catcher; |
19 ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_ | 19 ASSERT_TRUE(LoadExtensionIncognito(test_data_dir_ |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 test_server()->GetURL(popup_app_contents_path + "open_popup.html") | 85 test_server()->GetURL(popup_app_contents_path + "open_popup.html") |
86 .ReplaceComponents(replace_host); | 86 .ReplaceComponents(replace_host); |
87 | 87 |
88 browser()->OpenURL(open_tab, GURL(), NEW_FOREGROUND_TAB, | 88 browser()->OpenURL(open_tab, GURL(), NEW_FOREGROUND_TAB, |
89 PageTransition::TYPED); | 89 PageTransition::TYPED); |
90 browser()->OpenURL(open_popup, GURL(), NEW_FOREGROUND_TAB, | 90 browser()->OpenURL(open_popup, GURL(), NEW_FOREGROUND_TAB, |
91 PageTransition::TYPED); | 91 PageTransition::TYPED); |
92 | 92 |
93 WaitForTabsAndPopups(browser(), 3, 1); | 93 WaitForTabsAndPopups(browser(), 3, 1); |
94 } | 94 } |
OLD | NEW |