| OLD | NEW |
| 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 "apps/launcher.h" | 5 #include "apps/launcher.h" |
| 6 #include "apps/native_app_window.h" | 6 #include "apps/native_app_window.h" |
| 7 #include "apps/shell_window.h" | 7 #include "apps/shell_window.h" |
| 8 #include "apps/shell_window_registry.h" | 8 #include "apps/shell_window_registry.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 LoadAndLaunchPlatformApp("minimal"); | 1016 LoadAndLaunchPlatformApp("minimal"); |
| 1017 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); | 1017 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); |
| 1018 | 1018 |
| 1019 EXPECT_EQ(1LU, GetShellWindowCount()); | 1019 EXPECT_EQ(1LU, GetShellWindowCount()); |
| 1020 ShellWindowRegistry::ShellWindowList shell_windows = ShellWindowRegistry::Get( | 1020 ShellWindowRegistry::ShellWindowList shell_windows = ShellWindowRegistry::Get( |
| 1021 browser()->profile())->shell_windows(); | 1021 browser()->profile())->shell_windows(); |
| 1022 EXPECT_TRUE((*shell_windows.begin())->web_contents()-> | 1022 EXPECT_TRUE((*shell_windows.begin())->web_contents()-> |
| 1023 GetRenderWidgetHostView()->HasFocus()); | 1023 GetRenderWidgetHostView()->HasFocus()); |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowDotPrintWorks) { |
| 1027 ASSERT_TRUE(RunPlatformAppTest("platform_apps/print_api")) << message_; |
| 1028 } |
| 1029 |
| 1026 | 1030 |
| 1027 #if defined(OS_CHROMEOS) | 1031 #if defined(OS_CHROMEOS) |
| 1028 | 1032 |
| 1029 class PlatformAppIncognitoBrowserTest : public PlatformAppBrowserTest, | 1033 class PlatformAppIncognitoBrowserTest : public PlatformAppBrowserTest, |
| 1030 public ShellWindowRegistry::Observer { | 1034 public ShellWindowRegistry::Observer { |
| 1031 public: | 1035 public: |
| 1032 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 1036 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 1033 // Tell chromeos to launch in Guest mode, aka incognito. | 1037 // Tell chromeos to launch in Guest mode, aka incognito. |
| 1034 command_line->AppendSwitch(switches::kIncognito); | 1038 command_line->AppendSwitch(switches::kIncognito); |
| 1035 PlatformAppBrowserTest::SetUpCommandLine(command_line); | 1039 PlatformAppBrowserTest::SetUpCommandLine(command_line); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 | 1083 |
| 1080 while (!ContainsKey(opener_app_ids_, file_manager->id())) { | 1084 while (!ContainsKey(opener_app_ids_, file_manager->id())) { |
| 1081 content::RunAllPendingInMessageLoop(); | 1085 content::RunAllPendingInMessageLoop(); |
| 1082 } | 1086 } |
| 1083 } | 1087 } |
| 1084 | 1088 |
| 1085 #endif // defined(OS_CHROMEOS) | 1089 #endif // defined(OS_CHROMEOS) |
| 1086 | 1090 |
| 1087 | 1091 |
| 1088 } // namespace extensions | 1092 } // namespace extensions |
| OLD | NEW |