OLD | NEW |
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 // Tests for the --load-and-launch-app switch. | 5 // Tests for the --load-and-launch-app switch. |
6 // The two cases are when chrome is running and another process uses the switch | 6 // The two cases are when chrome is running and another process uses the switch |
7 // and when chrome is started from scratch. | 7 // and when chrome is started from scratch. |
8 | 8 |
9 #include "apps/switches.h" | 9 #include "apps/switches.h" |
10 #include "base/process/launch.h" | 10 #include "base/process/launch.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 process, TestTimeouts::action_timeout())); | 102 process, TestTimeouts::action_timeout())); |
103 } | 103 } |
104 | 104 |
105 namespace { | 105 namespace { |
106 | 106 |
107 // TestFixture that appends --load-and-launch-app before calling BrowserMain. | 107 // TestFixture that appends --load-and-launch-app before calling BrowserMain. |
108 class PlatformAppLoadAndLaunchBrowserTest : public PlatformAppBrowserTest { | 108 class PlatformAppLoadAndLaunchBrowserTest : public PlatformAppBrowserTest { |
109 protected: | 109 protected: |
110 PlatformAppLoadAndLaunchBrowserTest() {} | 110 PlatformAppLoadAndLaunchBrowserTest() {} |
111 | 111 |
112 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 112 virtual void SetUpCommandLine(CommandLine* command_line) override { |
113 PlatformAppBrowserTest::SetUpCommandLine(command_line); | 113 PlatformAppBrowserTest::SetUpCommandLine(command_line); |
114 app_path_ = test_data_dir_ | 114 app_path_ = test_data_dir_ |
115 .AppendASCII("platform_apps") | 115 .AppendASCII("platform_apps") |
116 .AppendASCII("minimal"); | 116 .AppendASCII("minimal"); |
117 command_line->AppendSwitchNative(apps::kLoadAndLaunchApp, | 117 command_line->AppendSwitchNative(apps::kLoadAndLaunchApp, |
118 app_path_.value()); | 118 app_path_.value()); |
119 } | 119 } |
120 | 120 |
121 void LoadAndLaunchApp() { | 121 void LoadAndLaunchApp() { |
122 ExtensionTestMessageListener launched_listener("Launched", false); | 122 ExtensionTestMessageListener launched_listener("Launched", false); |
(...skipping 23 matching lines...) Expand all Loading... |
146 LoadAndLaunchAppChromeNotRunning | 146 LoadAndLaunchAppChromeNotRunning |
147 #endif | 147 #endif |
148 | 148 |
149 // Case where Chrome is not running. | 149 // Case where Chrome is not running. |
150 IN_PROC_BROWSER_TEST_F(PlatformAppLoadAndLaunchBrowserTest, | 150 IN_PROC_BROWSER_TEST_F(PlatformAppLoadAndLaunchBrowserTest, |
151 MAYBE_LoadAndLaunchAppChromeNotRunning) { | 151 MAYBE_LoadAndLaunchAppChromeNotRunning) { |
152 LoadAndLaunchApp(); | 152 LoadAndLaunchApp(); |
153 } | 153 } |
154 | 154 |
155 } // namespace apps | 155 } // namespace apps |
OLD | NEW |