Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: extensions/browser/api/app_window/app_window_apitest.cc

Issue 2124633002: Add new gpu driver bug workaround DISABLE_TRANSPARENT_VISUALS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/macros.h" 5 #include "base/macros.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/apps/app_browsertest_util.h" 9 #include "chrome/browser/apps/app_browsertest_util.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/common/chrome_switches.h" 11 #include "chrome/common/chrome_switches.h"
12 #include "chrome/common/extensions/features/feature_channel.h" 12 #include "chrome/common/extensions/features/feature_channel.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/test/extension_test_message_listener.h" 18 #include "extensions/test/extension_test_message_listener.h"
19 #include "ui/base/base_window.h" 19 #include "ui/base/base_window.h"
20 #include "ui/gfx/geometry/rect.h" 20 #include "ui/gfx/geometry/rect.h"
21 21
22 #if defined(OS_WIN) 22 #if defined(OS_WIN)
23 #include "ui/base/win/shell.h" 23 #include "ui/base/win/shell.h"
24 #endif 24 #endif
25 25
26 #if defined(USE_X11) && !defined(OS_CHROMEOS)
27 #include "ui/gfx/x/x11_switches.h"
28 #endif
29
26 namespace extensions { 30 namespace extensions {
27 31
28 namespace { 32 namespace {
29 33
30 class TestAppWindowRegistryObserver : public AppWindowRegistry::Observer { 34 class TestAppWindowRegistryObserver : public AppWindowRegistry::Observer {
31 public: 35 public:
32 explicit TestAppWindowRegistryObserver(Profile* profile) 36 explicit TestAppWindowRegistryObserver(Profile* profile)
33 : profile_(profile), icon_updates_(0) { 37 : profile_(profile), icon_updates_(0) {
34 AppWindowRegistry::Get(profile_)->AddObserver(this); 38 AppWindowRegistry::Get(profile_)->AddObserver(this);
35 } 39 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 127 }
124 128
125 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApiSetShapeNoPerm) { 129 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApiSetShapeNoPerm) {
126 EXPECT_TRUE( 130 EXPECT_TRUE(
127 RunPlatformAppTest("platform_apps/windows_api_shape/no_permission")) 131 RunPlatformAppTest("platform_apps/windows_api_shape/no_permission"))
128 << message_; 132 << message_;
129 } 133 }
130 134
131 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, 135 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
132 WindowsApiAlphaEnabledHasPermissions) { 136 WindowsApiAlphaEnabledHasPermissions) {
133 const char* no_alpha_dir = 137 const char* no_alpha_dir =
tapted 2016/07/14 23:37:17 these should be const char kNoAlphaDir[] = .. (
Julien Isorce Samsung 2016/07/15 06:56:47 Done.
134 "platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha"; 138 "platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha";
135 const char* test_dir = no_alpha_dir; 139 const char* has_alpha_dir =
140 "platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha";
141 const char* test_dir = has_alpha_dir;
142 test_dir = no_alpha_dir;
tapted 2016/07/14 23:37:17 It looks weird to initialize it with has_alpha_dir
Julien Isorce Samsung 2016/07/15 06:56:47 Done.
136 143
137 #if defined(USE_AURA) && (defined(OS_CHROMEOS) || !defined(OS_LINUX)) 144 #if defined(USE_AURA) && (defined(OS_CHROMEOS) || !defined(OS_LINUX))
138 test_dir = 145 test_dir = has_alpha_dir;
139 "platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha"; 146
140 #if defined(OS_WIN) 147 #if defined(OS_WIN)
141 if (!ui::win::IsAeroGlassEnabled()) { 148 if (!ui::win::IsAeroGlassEnabled()) {
142 test_dir = no_alpha_dir; 149 test_dir = no_alpha_dir;
143 } 150 }
144 #endif // OS_WIN 151 #endif // OS_WIN
145 #endif // USE_AURA && (OS_CHROMEOS || !OS_LINUX) 152 #endif // USE_AURA && (OS_CHROMEOS || !OS_LINUX)
146 153
154 #if defined(USE_X11) && !defined(OS_CHROMEOS)
155 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
156 switches::kWindowDepth)) {
tapted 2016/07/14 23:37:17 nit: This outer `if` isn't needed. I'd just write
Julien Isorce Samsung 2016/07/15 06:56:47 Done.
157 std::string depth =
158 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
159 switches::kWindowDepth);
160
161 if (depth == "32")
162 test_dir = has_alpha_dir;
163 }
164 #endif // USE_X11 && !OS_CHROMEOS
165
147 EXPECT_TRUE(RunPlatformAppTest(test_dir)) << message_; 166 EXPECT_TRUE(RunPlatformAppTest(test_dir)) << message_;
148 } 167 }
149 168
150 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, 169 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
151 WindowsApiAlphaEnabledNoPermissions) { 170 WindowsApiAlphaEnabledNoPermissions) {
152 EXPECT_TRUE(RunPlatformAppTest( 171 EXPECT_TRUE(RunPlatformAppTest(
153 "platform_apps/windows_api_alpha_enabled/no_permissions")) 172 "platform_apps/windows_api_alpha_enabled/no_permissions"))
154 << message_; 173 << message_;
155 } 174 }
156 175
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 command_line->AppendSwitchASCII(switches::kAppId, 229 command_line->AppendSwitchASCII(switches::kAppId,
211 "jkghodnilhceideoidjikpgommlajknk"); 230 "jkghodnilhceideoidjikpgommlajknk");
212 231
213 EXPECT_TRUE(RunComponentExtensionTest( 232 EXPECT_TRUE(RunComponentExtensionTest(
214 "platform_apps/windows_api_ime/forced_app_mode_not_fullscreen")) 233 "platform_apps/windows_api_ime/forced_app_mode_not_fullscreen"))
215 << message_; 234 << message_;
216 } 235 }
217 #endif // OS_CHROMEOS 236 #endif // OS_CHROMEOS
218 237
219 } // namespace extensions 238 } // namespace extensions
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698