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

Side by Side Diff: trunk/src/chrome/browser/apps/app_browsertest_util.cc

Issue 23600025: Revert 222235 ""Redirecting URLs to Packaged Apps" implementatio..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/apps/app_browsertest_util.h" 5 #include "chrome/browser/apps/app_browsertest_util.h"
6 6
7 #include "apps/app_window_contents.h" 7 #include "apps/app_window_contents.h"
8 #include "apps/native_app_window.h" 8 #include "apps/native_app_window.h"
9 #include "apps/shell_window_registry.h" 9 #include "apps/shell_window_registry.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 chrome::OpenApplication(chrome::AppLaunchParams(browser()->profile(), 53 chrome::OpenApplication(chrome::AppLaunchParams(browser()->profile(),
54 extension, 54 extension,
55 extension_misc::LAUNCH_NONE, 55 extension_misc::LAUNCH_NONE,
56 NEW_WINDOW)); 56 NEW_WINDOW));
57 57
58 app_loaded_observer.Wait(); 58 app_loaded_observer.Wait();
59 59
60 return extension; 60 return extension;
61 } 61 }
62 62
63 const Extension* PlatformAppBrowserTest::InstallPlatformApp(
64 const char* name) {
65 const Extension* extension = InstallExtension(
66 test_data_dir_.AppendASCII("platform_apps").AppendASCII(name), 1);
67 EXPECT_TRUE(extension);
68
69 return extension;
70 }
71
72 const Extension* PlatformAppBrowserTest::InstallAndLaunchPlatformApp( 63 const Extension* PlatformAppBrowserTest::InstallAndLaunchPlatformApp(
73 const char* name) { 64 const char* name) {
74 content::WindowedNotificationObserver app_loaded_observer( 65 content::WindowedNotificationObserver app_loaded_observer(
75 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, 66 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
76 content::NotificationService::AllSources()); 67 content::NotificationService::AllSources());
77 68
78 const Extension* extension = InstallPlatformApp(name); 69 const Extension* extension = InstallExtension(
70 test_data_dir_.AppendASCII("platform_apps").AppendASCII(name), 1);
71 EXPECT_TRUE(extension);
79 72
80 chrome::OpenApplication(chrome::AppLaunchParams(browser()->profile(), 73 chrome::OpenApplication(chrome::AppLaunchParams(browser()->profile(),
81 extension, 74 extension,
82 extension_misc::LAUNCH_NONE, 75 extension_misc::LAUNCH_NONE,
83 NEW_WINDOW)); 76 NEW_WINDOW));
84 77
85 app_loaded_observer.Wait(); 78 app_loaded_observer.Wait();
86 79
87 return extension; 80 return extension;
88 } 81 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 bounds); 185 bounds);
193 } 186 }
194 187
195 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine( 188 void ExperimentalPlatformAppBrowserTest::SetUpCommandLine(
196 CommandLine* command_line) { 189 CommandLine* command_line) {
197 PlatformAppBrowserTest::SetUpCommandLine(command_line); 190 PlatformAppBrowserTest::SetUpCommandLine(command_line);
198 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); 191 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis);
199 } 192 }
200 193
201 } // namespace extensions 194 } // namespace extensions
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/apps/app_browsertest_util.h ('k') | trunk/src/chrome/browser/apps/app_url_redirector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698