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 #include "apps/launcher.h" | 5 #include "apps/launcher.h" |
6 #include "apps/shell_window.h" | 6 #include "apps/shell_window.h" |
7 #include "apps/shell_window_registry.h" | 7 #include "apps/shell_window_registry.h" |
8 #include "apps/ui/native_app_window.h" | 8 #include "apps/ui/native_app_window.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 } | 166 } |
167 | 167 |
168 private: | 168 private: |
169 bool auto_cancel_; | 169 bool auto_cancel_; |
170 int total_page_count_; | 170 int total_page_count_; |
171 int rendered_page_count_; | 171 int rendered_page_count_; |
172 scoped_refptr<content::MessageLoopRunner> waiting_runner_; | 172 scoped_refptr<content::MessageLoopRunner> waiting_runner_; |
173 gfx::Size dialog_size_; | 173 gfx::Size dialog_size_; |
174 }; | 174 }; |
175 | 175 |
| 176 #if !defined(OS_WIN) |
176 bool CopyTestDataAndSetCommandLineArg( | 177 bool CopyTestDataAndSetCommandLineArg( |
177 const base::FilePath& test_data_file, | 178 const base::FilePath& test_data_file, |
178 const base::FilePath& temp_dir, | 179 const base::FilePath& temp_dir, |
179 const char* filename) { | 180 const char* filename) { |
180 base::FilePath path = temp_dir.AppendASCII( | 181 base::FilePath path = temp_dir.AppendASCII( |
181 filename).NormalizePathSeparators(); | 182 filename).NormalizePathSeparators(); |
182 if (!(base::CopyFile(test_data_file, path))) | 183 if (!(base::CopyFile(test_data_file, path))) |
183 return false; | 184 return false; |
184 | 185 |
185 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 186 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
186 command_line->AppendArgPath(path); | 187 command_line->AppendArgPath(path); |
187 return true; | 188 return true; |
188 } | 189 } |
| 190 #endif |
189 | 191 |
190 #if !defined(OS_CHROMEOS) | 192 #if !defined(OS_CHROMEOS) |
191 const char kTestFilePath[] = "platform_apps/launch_files/test.txt"; | 193 const char kTestFilePath[] = "platform_apps/launch_files/test.txt"; |
192 #endif | 194 #endif |
193 | 195 |
194 } // namespace | 196 } // namespace |
195 | 197 |
196 // Tests that CreateShellWindow doesn't crash if you close it straight away. | 198 // Tests that CreateShellWindow doesn't crash if you close it straight away. |
197 // LauncherPlatformAppBrowserTest relies on this behaviour, but is only run for | 199 // LauncherPlatformAppBrowserTest relies on this behaviour, but is only run for |
198 // ash, so we test that it works here. | 200 // ash, so we test that it works here. |
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1301 false); | 1303 false); |
1302 ASSERT_TRUE(restart_requested_listener.WaitUntilSatisfied()); | 1304 ASSERT_TRUE(restart_requested_listener.WaitUntilSatisfied()); |
1303 | 1305 |
1304 EXPECT_EQ(1, request_restart_call_count()); | 1306 EXPECT_EQ(1, request_restart_call_count()); |
1305 } | 1307 } |
1306 | 1308 |
1307 #endif // defined(OS_CHROMEOS) | 1309 #endif // defined(OS_CHROMEOS) |
1308 | 1310 |
1309 | 1311 |
1310 } // namespace extensions | 1312 } // namespace extensions |
OLD | NEW |