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

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

Issue 10700130: Introduce LaunchParams struct for opening chrome apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bad merge Created 8 years, 5 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 | Annotate | Revision Log
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 "chrome/browser/extensions/platform_app_browsertest_util.h" 5 #include "chrome/browser/extensions/platform_app_browsertest_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "chrome/browser/extensions/api/tabs/tabs.h" 9 #include "chrome/browser/extensions/api/tabs/tabs.h"
10 #include "chrome/browser/extensions/extension_function_test_utils.h" 10 #include "chrome/browser/extensions/extension_function_test_utils.h"
(...skipping 19 matching lines...) Expand all
30 const Extension* PlatformAppBrowserTest::LoadAndLaunchPlatformApp( 30 const Extension* PlatformAppBrowserTest::LoadAndLaunchPlatformApp(
31 const char* name) { 31 const char* name) {
32 ui_test_utils::WindowedNotificationObserver app_loaded_observer( 32 ui_test_utils::WindowedNotificationObserver app_loaded_observer(
33 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, 33 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
34 content::NotificationService::AllSources()); 34 content::NotificationService::AllSources());
35 35
36 const Extension* extension = LoadExtension( 36 const Extension* extension = LoadExtension(
37 test_data_dir_.AppendASCII("platform_apps").AppendASCII(name)); 37 test_data_dir_.AppendASCII("platform_apps").AppendASCII(name));
38 EXPECT_TRUE(extension); 38 EXPECT_TRUE(extension);
39 39
40 application_launch::OpenApplication( 40 application_launch::OpenApplication(application_launch::LaunchParams(
41 browser()->profile(), 41 browser()->profile(), extension, extension_misc::LAUNCH_NONE,
42 extension, 42 NEW_WINDOW));
43 extension_misc::LAUNCH_NONE,
44 GURL(),
45 NEW_WINDOW,
46 NULL);
47 43
48 app_loaded_observer.Wait(); 44 app_loaded_observer.Wait();
49 45
50 return extension; 46 return extension;
51 } 47 }
52 48
53 WebContents* PlatformAppBrowserTest::GetFirstShellWindowWebContents() { 49 WebContents* PlatformAppBrowserTest::GetFirstShellWindowWebContents() {
54 ShellWindowRegistry* app_registry = 50 ShellWindowRegistry* app_registry =
55 ShellWindowRegistry::Get(browser()->profile()); 51 ShellWindowRegistry::Get(browser()->profile());
56 ShellWindowRegistry::const_iterator iter; 52 ShellWindowRegistry::const_iterator iter;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 browser()->profile(), extension, GURL(""), params); 110 browser()->profile(), extension, GURL(""), params);
115 } 111 }
116 112
117 void PlatformAppBrowserTest::CloseShellWindow(ShellWindow* window) { 113 void PlatformAppBrowserTest::CloseShellWindow(ShellWindow* window) {
118 ui_test_utils::WindowedNotificationObserver destroyed_observer( 114 ui_test_utils::WindowedNotificationObserver destroyed_observer(
119 content::NOTIFICATION_WEB_CONTENTS_DESTROYED, 115 content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
120 content::NotificationService::AllSources()); 116 content::NotificationService::AllSources());
121 window->Close(); 117 window->Close();
122 destroyed_observer.Wait(); 118 destroyed_observer.Wait();
123 } 119 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_management_api.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698