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

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: Just make sure the new gpu driver workaround exist in second test instead of using fake values 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/test/gpu/page_sets/gpu_process_tests.py ('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/compiler_specific.h"
5 #include "base/macros.h" 6 #include "base/macros.h"
6 #include "base/run_loop.h" 7 #include "base/run_loop.h"
7 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
8 #include "build/build_config.h" 9 #include "build/build_config.h"
9 #include "chrome/browser/apps/app_browsertest_util.h" 10 #include "chrome/browser/apps/app_browsertest_util.h"
10 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
11 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
12 #include "chrome/test/base/testing_profile.h" 13 #include "chrome/test/base/testing_profile.h"
13 #include "components/version_info/version_info.h" 14 #include "components/version_info/version_info.h"
14 #include "extensions/browser/app_window/app_window.h" 15 #include "extensions/browser/app_window/app_window.h"
15 #include "extensions/browser/app_window/app_window_registry.h" 16 #include "extensions/browser/app_window/app_window_registry.h"
16 #include "extensions/browser/app_window/native_app_window.h" 17 #include "extensions/browser/app_window/native_app_window.h"
17 #include "extensions/common/features/feature_channel.h" 18 #include "extensions/common/features/feature_channel.h"
18 #include "extensions/test/extension_test_message_listener.h" 19 #include "extensions/test/extension_test_message_listener.h"
19 #include "ui/base/base_window.h" 20 #include "ui/base/base_window.h"
20 #include "ui/gfx/geometry/rect.h" 21 #include "ui/gfx/geometry/rect.h"
21 22
22 #if defined(OS_WIN) 23 #if defined(OS_WIN)
23 #include "ui/base/win/shell.h" 24 #include "ui/base/win/shell.h"
24 #endif 25 #endif
25 26
27 #if defined(USE_X11) && !defined(OS_CHROMEOS)
28 #include "ui/gfx/x/x11_switches.h"
29 #endif
30
26 namespace extensions { 31 namespace extensions {
27 32
28 namespace { 33 namespace {
29 34
30 class TestAppWindowRegistryObserver : public AppWindowRegistry::Observer { 35 class TestAppWindowRegistryObserver : public AppWindowRegistry::Observer {
31 public: 36 public:
32 explicit TestAppWindowRegistryObserver(Profile* profile) 37 explicit TestAppWindowRegistryObserver(Profile* profile)
33 : profile_(profile), icon_updates_(0) { 38 : profile_(profile), icon_updates_(0) {
34 AppWindowRegistry::Get(profile_)->AddObserver(this); 39 AppWindowRegistry::Get(profile_)->AddObserver(this);
35 } 40 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 128 }
124 129
125 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApiSetShapeNoPerm) { 130 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, WindowsApiSetShapeNoPerm) {
126 EXPECT_TRUE( 131 EXPECT_TRUE(
127 RunPlatformAppTest("platform_apps/windows_api_shape/no_permission")) 132 RunPlatformAppTest("platform_apps/windows_api_shape/no_permission"))
128 << message_; 133 << message_;
129 } 134 }
130 135
131 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, 136 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
132 WindowsApiAlphaEnabledHasPermissions) { 137 WindowsApiAlphaEnabledHasPermissions) {
133 const char* no_alpha_dir = 138 const char kNoAlphaDir[] =
134 "platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha"; 139 "platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha";
135 const char* test_dir = no_alpha_dir; 140 const char kHasAlphaDir[] =
141 "platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha";
142 ALLOW_UNUSED_LOCAL(kHasAlphaDir);
143 const char* test_dir = kNoAlphaDir;
136 144
137 #if defined(USE_AURA) && (defined(OS_CHROMEOS) || !defined(OS_LINUX)) 145 #if defined(USE_AURA) && (defined(OS_CHROMEOS) || !defined(OS_LINUX))
138 test_dir = 146 test_dir = kHasAlphaDir;
139 "platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha"; 147
140 #if defined(OS_WIN) 148 #if defined(OS_WIN)
141 if (!ui::win::IsAeroGlassEnabled()) { 149 if (!ui::win::IsAeroGlassEnabled()) {
142 test_dir = no_alpha_dir; 150 test_dir = kNoAlphaDir;
143 } 151 }
144 #endif // OS_WIN 152 #endif // OS_WIN
145 #endif // USE_AURA && (OS_CHROMEOS || !OS_LINUX) 153 #endif // USE_AURA && (OS_CHROMEOS || !OS_LINUX)
146 154
155 #if defined(USE_X11) && !defined(OS_CHROMEOS)
156 if (base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
157 switches::kWindowDepth) == "32") {
158 test_dir = kHasAlphaDir;
159 }
160 #endif // USE_X11 && !OS_CHROMEOS
161
147 EXPECT_TRUE(RunPlatformAppTest(test_dir)) << message_; 162 EXPECT_TRUE(RunPlatformAppTest(test_dir)) << message_;
148 } 163 }
149 164
150 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, 165 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
151 WindowsApiAlphaEnabledNoPermissions) { 166 WindowsApiAlphaEnabledNoPermissions) {
152 EXPECT_TRUE(RunPlatformAppTest( 167 EXPECT_TRUE(RunPlatformAppTest(
153 "platform_apps/windows_api_alpha_enabled/no_permissions")) 168 "platform_apps/windows_api_alpha_enabled/no_permissions"))
154 << message_; 169 << message_;
155 } 170 }
156 171
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 command_line->AppendSwitchASCII(switches::kAppId, 225 command_line->AppendSwitchASCII(switches::kAppId,
211 "jkghodnilhceideoidjikpgommlajknk"); 226 "jkghodnilhceideoidjikpgommlajknk");
212 227
213 EXPECT_TRUE(RunComponentExtensionTest( 228 EXPECT_TRUE(RunComponentExtensionTest(
214 "platform_apps/windows_api_ime/forced_app_mode_not_fullscreen")) 229 "platform_apps/windows_api_ime/forced_app_mode_not_fullscreen"))
215 << message_; 230 << message_;
216 } 231 }
217 #endif // OS_CHROMEOS 232 #endif // OS_CHROMEOS
218 233
219 } // namespace extensions 234 } // namespace extensions
OLDNEW
« no previous file with comments | « content/test/gpu/page_sets/gpu_process_tests.py ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698