Chromium Code Reviews| Index: extensions/browser/api/app_window/app_window_apitest.cc |
| diff --git a/extensions/browser/api/app_window/app_window_apitest.cc b/extensions/browser/api/app_window/app_window_apitest.cc |
| index d8215a85ae85c219d12928fd0079e2214b42aed6..f7c1d17401b640a519997cda5917b1e98c63831b 100644 |
| --- a/extensions/browser/api/app_window/app_window_apitest.cc |
| +++ b/extensions/browser/api/app_window/app_window_apitest.cc |
| @@ -23,6 +23,10 @@ |
| #include "ui/base/win/shell.h" |
| #endif |
| +#if defined(USE_X11) && !defined(OS_CHROMEOS) |
| +#include "ui/gfx/x/x11_switches.h" |
| +#endif |
| + |
| namespace extensions { |
| namespace { |
| @@ -132,11 +136,14 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, |
| WindowsApiAlphaEnabledHasPermissions) { |
| 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.
|
| "platform_apps/windows_api_alpha_enabled/has_permissions_no_alpha"; |
| - const char* test_dir = no_alpha_dir; |
| + const char* has_alpha_dir = |
| + "platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha"; |
| + const char* test_dir = has_alpha_dir; |
| + 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.
|
| #if defined(USE_AURA) && (defined(OS_CHROMEOS) || !defined(OS_LINUX)) |
| - test_dir = |
| - "platform_apps/windows_api_alpha_enabled/has_permissions_has_alpha"; |
| + test_dir = has_alpha_dir; |
| + |
| #if defined(OS_WIN) |
| if (!ui::win::IsAeroGlassEnabled()) { |
| test_dir = no_alpha_dir; |
| @@ -144,6 +151,18 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, |
| #endif // OS_WIN |
| #endif // USE_AURA && (OS_CHROMEOS || !OS_LINUX) |
| +#if defined(USE_X11) && !defined(OS_CHROMEOS) |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + 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.
|
| + std::string depth = |
| + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| + switches::kWindowDepth); |
| + |
| + if (depth == "32") |
| + test_dir = has_alpha_dir; |
| + } |
| +#endif // USE_X11 && !OS_CHROMEOS |
| + |
| EXPECT_TRUE(RunPlatformAppTest(test_dir)) << message_; |
| } |