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

Unified Diff: ui/views/widget/widget_unittest.cc

Issue 2552813006: MacViews: Fix CompositingWidgetTest.Transparency_DesktopWidgetTranslucent (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget_unittest.cc
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index 0880a2b25ce4ff3ef531e1520dcd7f118e77b356..451752ed5077af06334d6ba42ae56f80099859fd 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -3862,8 +3862,20 @@ class CompositingWidgetTest : public views::test::WidgetTest {
widget_type == Widget::InitParams::TYPE_CONTROL))
continue;
+#if defined(OS_MACOSX)
+ // Mac always always has a compositing window manager, but doesn't have
+ // transparent titlebars which is what ShouldWindowContentsBeTransparent()
+ // is currently used for. Asking for transparency should get it. Note that
+ // TestViewsDelegate::use_transparent_windows_ determines the result of
+ // INFER_OPACITY: assume it is false.
+ bool should_be_transparent =
+ opacity == Widget::InitParams::TRANSLUCENT_WINDOW;
+#else
+ bool should_be_transparent = widget.ShouldWindowContentsBeTransparent();
+#endif
+
EXPECT_EQ(IsNativeWindowTransparent(widget.GetNativeWindow()),
- widget.ShouldWindowContentsBeTransparent());
+ should_be_transparent);
sadrul 2016/12/07 18:03:35 Should NativeWidgetMac::ShouldWindowContentsBeTran
tapted 2016/12/07 23:35:52 Yeah I thought about it, but I think NativeWidgetM
// When using the Mandoline UI Service, the translucency does not rely on
// the widget type.
@@ -3899,15 +3911,7 @@ TEST_F(CompositingWidgetTest, Transparency_DesktopWidgetOpaque) {
CheckAllWidgetsForOpacity(Widget::InitParams::OPAQUE_WINDOW);
}
-// Failing on Mac. http://cbrug.com/623421
-#if defined(OS_MACOSX)
-#define MAYBE_Transparency_DesktopWidgetTranslucent \
- DISABLED_Transparency_DesktopWidgetTranslucent
-#else
-#define MAYBE_Transparency_DesktopWidgetTranslucent \
- Transparency_DesktopWidgetTranslucent
-#endif
-TEST_F(CompositingWidgetTest, MAYBE_Transparency_DesktopWidgetTranslucent) {
+TEST_F(CompositingWidgetTest, Transparency_DesktopWidgetTranslucent) {
CheckAllWidgetsForOpacity(Widget::InitParams::TRANSLUCENT_WINDOW);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698