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(USE_X11) && !defined(OS_CHROMEOS) | |
28 #include "ui/gfx/x/x11_switches.h" | |
29 #endif | |
30 | |
31 namespace extensions { | 27 namespace extensions { |
32 | 28 |
33 namespace { | 29 namespace { |
34 | 30 |
35 class TestAppWindowRegistryObserver : public AppWindowRegistry::Observer { | 31 class TestAppWindowRegistryObserver : public AppWindowRegistry::Observer { |
36 public: | 32 public: |
37 explicit TestAppWindowRegistryObserver(Profile* profile) | 33 explicit TestAppWindowRegistryObserver(Profile* profile) |
38 : profile_(profile), icon_updates_(0) { | 34 : profile_(profile), icon_updates_(0) { |
39 AppWindowRegistry::Get(profile_)->AddObserver(this); | 35 AppWindowRegistry::Get(profile_)->AddObserver(this); |
40 } | 36 } |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 #if defined(USE_AURA) && (defined(OS_CHROMEOS) || !defined(OS_LINUX)) | 141 #if defined(USE_AURA) && (defined(OS_CHROMEOS) || !defined(OS_LINUX)) |
146 test_dir = kHasAlphaDir; | 142 test_dir = kHasAlphaDir; |
147 | 143 |
148 #if defined(OS_WIN) | 144 #if defined(OS_WIN) |
149 if (!ui::win::IsAeroGlassEnabled()) { | 145 if (!ui::win::IsAeroGlassEnabled()) { |
150 test_dir = kNoAlphaDir; | 146 test_dir = kNoAlphaDir; |
151 } | 147 } |
152 #endif // OS_WIN | 148 #endif // OS_WIN |
153 #endif // USE_AURA && (OS_CHROMEOS || !OS_LINUX) | 149 #endif // USE_AURA && (OS_CHROMEOS || !OS_LINUX) |
154 | 150 |
155 #if defined(USE_X11) && !defined(OS_CHROMEOS) | |
Tom (Use chromium acct)
2016/09/22 19:53:29
I had to remove this because the GL implementation
piman
2016/09/22 21:24:55
When running with --use-gpu-in-tests (locally), I
Tom (Use chromium acct)
2016/09/23 20:00:37
Acknowledged.
| |
156 if (base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | |
157 switches::kWindowDepth) == "32") { | |
158 test_dir = kHasAlphaDir; | |
159 } | |
160 #endif // USE_X11 && !OS_CHROMEOS | |
161 | |
162 EXPECT_TRUE(RunPlatformAppTest(test_dir)) << message_; | 151 EXPECT_TRUE(RunPlatformAppTest(test_dir)) << message_; |
163 } | 152 } |
164 | 153 |
165 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, | 154 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, |
166 WindowsApiAlphaEnabledNoPermissions) { | 155 WindowsApiAlphaEnabledNoPermissions) { |
167 EXPECT_TRUE(RunPlatformAppTest( | 156 EXPECT_TRUE(RunPlatformAppTest( |
168 "platform_apps/windows_api_alpha_enabled/no_permissions")) | 157 "platform_apps/windows_api_alpha_enabled/no_permissions")) |
169 << message_; | 158 << message_; |
170 } | 159 } |
171 | 160 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
225 command_line->AppendSwitchASCII(switches::kAppId, | 214 command_line->AppendSwitchASCII(switches::kAppId, |
226 "jkghodnilhceideoidjikpgommlajknk"); | 215 "jkghodnilhceideoidjikpgommlajknk"); |
227 | 216 |
228 EXPECT_TRUE(RunComponentExtensionTest( | 217 EXPECT_TRUE(RunComponentExtensionTest( |
229 "platform_apps/windows_api_ime/forced_app_mode_not_fullscreen")) | 218 "platform_apps/windows_api_ime/forced_app_mode_not_fullscreen")) |
230 << message_; | 219 << message_; |
231 } | 220 } |
232 #endif // OS_CHROMEOS | 221 #endif // OS_CHROMEOS |
233 | 222 |
234 } // namespace extensions | 223 } // namespace extensions |
OLD | NEW |