| 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 "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
| 6 #include "base/macros.h" | 6 #include "base/macros.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/apps/app_browsertest_util.h" | 10 #include "chrome/browser/apps/app_browsertest_util.h" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
| 13 #include "chrome/test/base/testing_profile.h" | 13 #include "chrome/test/base/testing_profile.h" |
| 14 #include "components/version_info/version_info.h" | 14 #include "components/version_info/version_info.h" |
| 15 #include "extensions/browser/app_window/app_window.h" | 15 #include "extensions/browser/app_window/app_window.h" |
| 16 #include "extensions/browser/app_window/app_window_registry.h" | 16 #include "extensions/browser/app_window/app_window_registry.h" |
| 17 #include "extensions/browser/app_window/native_app_window.h" | 17 #include "extensions/browser/app_window/native_app_window.h" |
| 18 #include "extensions/common/features/feature_channel.h" | 18 #include "extensions/common/features/feature_channel.h" |
| 19 #include "extensions/test/extension_test_message_listener.h" | 19 #include "extensions/test/extension_test_message_listener.h" |
| 20 #include "ui/base/base_window.h" | 20 #include "ui/base/base_window.h" |
| 21 #include "ui/gfx/geometry/rect.h" | 21 #include "ui/gfx/geometry/rect.h" |
| 22 | 22 |
| 23 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
| 24 #include "ui/base/win/shell.h" | 24 #include "ui/base/win/shell.h" |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 #if defined(OS_MACOSX) |
| 28 #include "base/mac/mac_util.h" |
| 29 #endif |
| 30 |
| 27 namespace extensions { | 31 namespace extensions { |
| 28 | 32 |
| 29 namespace { | 33 namespace { |
| 30 | 34 |
| 31 class TestAppWindowRegistryObserver : public AppWindowRegistry::Observer { | 35 class TestAppWindowRegistryObserver : public AppWindowRegistry::Observer { |
| 32 public: | 36 public: |
| 33 explicit TestAppWindowRegistryObserver(Profile* profile) | 37 explicit TestAppWindowRegistryObserver(Profile* profile) |
| 34 : profile_(profile), icon_updates_(0) { | 38 : profile_(profile), icon_updates_(0) { |
| 35 AppWindowRegistry::Get(profile_)->AddObserver(this); | 39 AppWindowRegistry::Get(profile_)->AddObserver(this); |
| 36 } | 40 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 84 } |
| 81 | 85 |
| 82 // TODO(asargent) - Figure out what to do about the fact that minimize events | 86 // TODO(asargent) - Figure out what to do about the fact that minimize events |
| 83 // don't work under ubuntu unity. | 87 // don't work under ubuntu unity. |
| 84 // (crbug.com/162794 and https://bugs.launchpad.net/unity/+bug/998073). | 88 // (crbug.com/162794 and https://bugs.launchpad.net/unity/+bug/998073). |
| 85 // TODO(linux_aura) http://crbug.com/163931 | 89 // TODO(linux_aura) http://crbug.com/163931 |
| 86 // Flaky on Mac, http://crbug.com/232330 | 90 // Flaky on Mac, http://crbug.com/232330 |
| 87 #if defined(TOOLKIT_VIEWS) && !(defined(OS_LINUX) && !defined(OS_CHROMEOS) && de
fined(USE_AURA)) | 91 #if defined(TOOLKIT_VIEWS) && !(defined(OS_LINUX) && !defined(OS_CHROMEOS) && de
fined(USE_AURA)) |
| 88 | 92 |
| 89 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApiProperties) { | 93 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApiProperties) { |
| 94 #if defined(OS_MACOSX) |
| 95 if (base::mac::IsOS10_10()) |
| 96 return; // Fails when swarmed. http://crbug.com/660582 |
| 97 #endif |
| 90 EXPECT_TRUE( | 98 EXPECT_TRUE( |
| 91 RunExtensionTest("platform_apps/windows_api_properties")) << message_; | 99 RunExtensionTest("platform_apps/windows_api_properties")) << message_; |
| 92 } | 100 } |
| 93 | 101 |
| 94 #endif // defined(TOOLKIT_VIEWS) | 102 #endif // defined(TOOLKIT_VIEWS) |
| 95 | 103 |
| 96 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, | 104 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, |
| 97 WindowsApiAlwaysOnTopWithPermissions) { | 105 WindowsApiAlwaysOnTopWithPermissions) { |
| 98 EXPECT_TRUE(RunPlatformAppTest( | 106 EXPECT_TRUE(RunPlatformAppTest( |
| 99 "platform_apps/windows_api_always_on_top/has_permissions")) << message_; | 107 "platform_apps/windows_api_always_on_top/has_permissions")) << message_; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 command_line->AppendSwitchASCII(switches::kAppId, | 222 command_line->AppendSwitchASCII(switches::kAppId, |
| 215 "jkghodnilhceideoidjikpgommlajknk"); | 223 "jkghodnilhceideoidjikpgommlajknk"); |
| 216 | 224 |
| 217 EXPECT_TRUE(RunComponentExtensionTest( | 225 EXPECT_TRUE(RunComponentExtensionTest( |
| 218 "platform_apps/windows_api_ime/forced_app_mode_not_fullscreen")) | 226 "platform_apps/windows_api_ime/forced_app_mode_not_fullscreen")) |
| 219 << message_; | 227 << message_; |
| 220 } | 228 } |
| 221 #endif // OS_CHROMEOS | 229 #endif // OS_CHROMEOS |
| 222 | 230 |
| 223 } // namespace extensions | 231 } // namespace extensions |
| OLD | NEW |