| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 base::FilePath path = temp_dir.AppendASCII( | 180 base::FilePath path = temp_dir.AppendASCII( |
| 181 filename).NormalizePathSeparators(); | 181 filename).NormalizePathSeparators(); |
| 182 if (!(base::CopyFile(test_data_file, path))) | 182 if (!(base::CopyFile(test_data_file, path))) |
| 183 return false; | 183 return false; |
| 184 | 184 |
| 185 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 185 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 186 command_line->AppendArgPath(path); | 186 command_line->AppendArgPath(path); |
| 187 return true; | 187 return true; |
| 188 } | 188 } |
| 189 | 189 |
| 190 #if !defined(OS_CHROMEOS) |
| 190 const char kTestFilePath[] = "platform_apps/launch_files/test.txt"; | 191 const char kTestFilePath[] = "platform_apps/launch_files/test.txt"; |
| 192 #endif |
| 191 | 193 |
| 192 } // namespace | 194 } // namespace |
| 193 | 195 |
| 194 // Tests that CreateShellWindow doesn't crash if you close it straight away. | 196 // Tests that CreateShellWindow doesn't crash if you close it straight away. |
| 195 // LauncherPlatformAppBrowserTest relies on this behaviour, but is only run for | 197 // LauncherPlatformAppBrowserTest relies on this behaviour, but is only run for |
| 196 // ash, so we test that it works here. | 198 // ash, so we test that it works here. |
| 197 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, CreateAndCloseShellWindow) { | 199 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, CreateAndCloseShellWindow) { |
| 198 const Extension* extension = LoadAndLaunchPlatformApp("minimal"); | 200 const Extension* extension = LoadAndLaunchPlatformApp("minimal"); |
| 199 ShellWindow* window = CreateShellWindow(extension); | 201 ShellWindow* window = CreateShellWindow(extension); |
| 200 CloseShellWindow(window); | 202 CloseShellWindow(window); |
| (...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 false); | 1295 false); |
| 1294 ASSERT_TRUE(restart_requested_listener.WaitUntilSatisfied()); | 1296 ASSERT_TRUE(restart_requested_listener.WaitUntilSatisfied()); |
| 1295 | 1297 |
| 1296 EXPECT_EQ(1, request_restart_call_count()); | 1298 EXPECT_EQ(1, request_restart_call_count()); |
| 1297 } | 1299 } |
| 1298 | 1300 |
| 1299 #endif // defined(OS_CHROMEOS) | 1301 #endif // defined(OS_CHROMEOS) |
| 1300 | 1302 |
| 1301 | 1303 |
| 1302 } // namespace extensions | 1304 } // namespace extensions |
| OLD | NEW |