OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 const std::string popup_app_contents_path( | 184 const std::string popup_app_contents_path( |
185 "/extensions/api_test/window_open/popup_blocking/hosted_app/"); | 185 "/extensions/api_test/window_open/popup_blocking/hosted_app/"); |
186 | 186 |
187 GURL open_tab = embedded_test_server() | 187 GURL open_tab = embedded_test_server() |
188 ->GetURL(popup_app_contents_path + "open_tab.html") | 188 ->GetURL(popup_app_contents_path + "open_tab.html") |
189 .ReplaceComponents(replace_host); | 189 .ReplaceComponents(replace_host); |
190 GURL open_popup = embedded_test_server() | 190 GURL open_popup = embedded_test_server() |
191 ->GetURL(popup_app_contents_path + "open_popup.html") | 191 ->GetURL(popup_app_contents_path + "open_popup.html") |
192 .ReplaceComponents(replace_host); | 192 .ReplaceComponents(replace_host); |
193 | 193 |
194 browser()->OpenURL(OpenURLParams( | 194 browser()->OpenURL(OpenURLParams(open_tab, Referrer(), |
195 open_tab, Referrer(), NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_TYPED, | 195 WindowOpenDisposition::NEW_FOREGROUND_TAB, |
196 false)); | 196 ui::PAGE_TRANSITION_TYPED, false)); |
197 browser()->OpenURL(OpenURLParams( | 197 browser()->OpenURL(OpenURLParams(open_popup, Referrer(), |
198 open_popup, Referrer(), NEW_FOREGROUND_TAB, | 198 WindowOpenDisposition::NEW_FOREGROUND_TAB, |
199 ui::PAGE_TRANSITION_TYPED, false)); | 199 ui::PAGE_TRANSITION_TYPED, false)); |
200 | 200 |
201 EXPECT_TRUE(WaitForTabsAndPopups(browser(), 3, 1)); | 201 EXPECT_TRUE(WaitForTabsAndPopups(browser(), 3, 1)); |
202 } | 202 } |
203 | 203 |
204 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowArgumentsOverflow) { | 204 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowArgumentsOverflow) { |
205 ASSERT_TRUE(RunExtensionTest("window_open/argument_overflow")) << message_; | 205 ASSERT_TRUE(RunExtensionTest("window_open/argument_overflow")) << message_; |
206 } | 206 } |
207 | 207 |
208 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WindowOpener) { | 208 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WindowOpener) { |
209 ASSERT_TRUE(RunExtensionTest("window_open/opener")) << message_; | 209 ASSERT_TRUE(RunExtensionTest("window_open/opener")) << message_; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 last_loaded_extension_id() + "/newtab.html"), | 278 last_loaded_extension_id() + "/newtab.html"), |
279 false, | 279 false, |
280 &newtab)); | 280 &newtab)); |
281 | 281 |
282 // Extension API should succeed. | 282 // Extension API should succeed. |
283 bool result = false; | 283 bool result = false; |
284 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(newtab, "testExtensionApi()", | 284 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(newtab, "testExtensionApi()", |
285 &result)); | 285 &result)); |
286 EXPECT_TRUE(result); | 286 EXPECT_TRUE(result); |
287 } | 287 } |
OLD | NEW |