summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/common.gypi10
-rw-r--r--ui/views/view_unittest.cc17
2 files changed, 21 insertions, 6 deletions
diff --git a/build/common.gypi b/build/common.gypi
index fcd3d3f..bb3726c 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -51,9 +51,6 @@
'use_virtual_keyboard%': '<(use_virtual_keyboard)',
'use_skia_on_mac%': '<(use_skia_on_mac)',
- # WebKit compositor for ui
- 'use_webkit_compositor%': 0,
-
# Compute the architecture that we're building on.
'conditions': [
[ 'OS=="win" or OS=="mac"', {
@@ -77,6 +74,13 @@
['use_aura==1', {
'views_compositor%': 1,
}],
+
+ # Use the WebKit compositor for ui, when Aura is on.
+ ['use_aura==1', {
+ 'use_webkit_compositor%': 1,
+ }, {
+ 'use_webkit_compositor%': 0,
+ }],
],
},
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index 4aa93b0..0fd4c21 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -2818,9 +2818,18 @@ TEST_F(ViewLayerTest, ToggleVisibilityWithLayer) {
EXPECT_TRUE(v1->layer()->IsDrawn());
}
+// We don't set the hole in the webkit compositor, so disable tests that rely on
+// it.
+#if defined(USE_WEBKIT_COMPOSITOR)
+#define NOT_APPLICABLE_TO_WEBKIT_COMPOSITOR(X) DISABLED_ ## X
+#else
+#define NOT_APPLICABLE_TO_WEBKIT_COMPOSITOR(X) X
+#endif
+
// Test that a hole in a layer is correctly created regardless of whether
// the opacity attribute is set before or after the layer is created.
-TEST_F(ViewLayerTest, ToggleOpacityWithLayer) {
+TEST_F(ViewLayerTest,
+ NOT_APPLICABLE_TO_WEBKIT_COMPOSITOR(ToggleOpacityWithLayer)) {
View* content_view = new View;
widget()->SetContentsView(content_view);
@@ -2850,7 +2859,8 @@ TEST_F(ViewLayerTest, ToggleOpacityWithLayer) {
// Test that a hole in a layer always corresponds to the bounds of opaque
// layers.
-TEST_F(ViewLayerTest, MultipleOpaqueLayers) {
+TEST_F(ViewLayerTest,
+ NOT_APPLICABLE_TO_WEBKIT_COMPOSITOR(MultipleOpaqueLayers)) {
View* content_view = new View;
widget()->SetContentsView(content_view);
@@ -2891,7 +2901,8 @@ TEST_F(ViewLayerTest, MultipleOpaqueLayers) {
}
// Makes sure that opacity of layer persists after toggling visibilty.
-TEST_F(ViewLayerTest, ToggleVisibilityWithOpaqueLayer) {
+TEST_F(ViewLayerTest,
+ NOT_APPLICABLE_TO_WEBKIT_COMPOSITOR(ToggleVisibilityWithOpaqueLayer)) {
View* content_view = new View;
widget()->SetContentsView(content_view);