Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Side by Side Diff: chrome/browser/extensions/window_open_apitest.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 2 Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/memory/scoped_vector.h" 6 #include "base/memory/scoped_vector.h"
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "chrome/browser/extensions/extension_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.h"
9 #include "chrome/browser/extensions/extension_test_message_listener.h" 9 #include "chrome/browser/extensions/extension_test_message_listener.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 test_strings.push_back("content_tab"); 218 test_strings.push_back("content_tab");
219 test_strings.push_back("content_panel"); 219 test_strings.push_back("content_panel");
220 test_strings.push_back("content_popup"); 220 test_strings.push_back("content_popup");
221 221
222 ScopedVector<ExtensionTestMessageListener> listeners; 222 ScopedVector<ExtensionTestMessageListener> listeners;
223 for (size_t i = 0; i < test_strings.size(); ++i) { 223 for (size_t i = 0; i < test_strings.size(); ++i) {
224 listeners.push_back( 224 listeners.push_back(
225 new ExtensionTestMessageListener(test_strings[i], false)); 225 new ExtensionTestMessageListener(test_strings[i], false));
226 } 226 }
227 227
228 const Extension* extension = LoadExtension( 228 const extensions::Extension* extension = LoadExtension(
229 test_data_dir_.AppendASCII("window_open").AppendASCII( 229 test_data_dir_.AppendASCII("window_open").AppendASCII(
230 "close_panels_on_uninstall")); 230 "close_panels_on_uninstall"));
231 ASSERT_TRUE(extension); 231 ASSERT_TRUE(extension);
232 232
233 // Two tabs. One in extension domain and one in non-extension domain. 233 // Two tabs. One in extension domain and one in non-extension domain.
234 // Two popups - one in extension domain and one in non-extension domain. 234 // Two popups - one in extension domain and one in non-extension domain.
235 // Two panels - one in extension domain and one in non-extension domain. 235 // Two panels - one in extension domain and one in non-extension domain.
236 WaitForTabsAndPopups(browser(), 2, 2, 2); 236 WaitForTabsAndPopups(browser(), 2, 2, 2);
237 237
238 // Wait on test messages to make sure the pages loaded. 238 // Wait on test messages to make sure the pages loaded.
239 for (size_t i = 0; i < listeners.size(); ++i) 239 for (size_t i = 0; i < listeners.size(); ++i)
240 ASSERT_TRUE(listeners[i]->WaitUntilSatisfied()); 240 ASSERT_TRUE(listeners[i]->WaitUntilSatisfied());
241 241
242 UninstallExtension(extension->id()); 242 UninstallExtension(extension->id());
243 243
244 // Wait for one tab and one popup in non-extension domain to stay open. 244 // Wait for one tab and one popup in non-extension domain to stay open.
245 // Expect everything else, including panels, to close. 245 // Expect everything else, including panels, to close.
246 WaitForTabsAndPopups(browser(), 1, 1, 0); 246 WaitForTabsAndPopups(browser(), 1, 1, 0);
247 } 247 }
248 248
249 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WindowOpener) { 249 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WindowOpener) {
250 ASSERT_TRUE(RunExtensionTest("window_open/opener")) << message_; 250 ASSERT_TRUE(RunExtensionTest("window_open/opener")) << message_;
251 } 251 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698