MacViews: All targets compile. Fixes unit_tests and message_center_unittests
This mainly involves adjusting chrome_tests_unit.gypi to exclude
chrome's unit_tests that use views UI not enabled by default with
toolkit-views=1 on Mac.
Mostly the unit tests compile, but fail to link since their
corresponding UI parts are not in the browser.
(confirm_bubble_views_unittest.cc has a simple compile fix, but isn't
linked in yet).
An events_test_support dependency is needed in views_test_support for
ui/events/test/event_generator which some unit tests use, and otherwise
comes in through aura_test_support or views_unittests.
BUG=412234, 399191
Review URL: https://codereview.chromium.org/507373002
Cr-Commit-Position: refs/heads/master@{#294047}
diff --git a/ui/message_center/BUILD.gn b/ui/message_center/BUILD.gn
index 536bcfc0..b05d402 100644
--- a/ui/message_center/BUILD.gn
+++ b/ui/message_center/BUILD.gn
@@ -76,7 +76,9 @@
deps += [ "//ui/aura" ]
}
- if (toolkit_views) {
+ # On Mac, toolkit-views builds still use the Cocoa UI. Keep this in sync
+ # with message_center_unittests below.
+ if (toolkit_views && !is_mac) {
sources += [
"views/bounded_label.cc",
"views/bounded_label.h",
@@ -209,7 +211,7 @@
deps += [ "//ui/gfx:test_support" ]
}
- if (toolkit_views) {
+ if (toolkit_views && !is_mac) {
sources += [
"views/bounded_label_unittest.cc",
"views/message_center_view_unittest.cc",
diff --git a/ui/message_center/message_center.gyp b/ui/message_center/message_center.gyp
index c1ece6a..eb956aa0 100644
--- a/ui/message_center/message_center.gyp
+++ b/ui/message_center/message_center.gyp
@@ -119,7 +119,9 @@
'../aura/aura.gyp:aura',
],
}],
- ['toolkit_views==1', {
+ # On Mac, toolkit-views builds still use the Cocoa UI. Keep this in sync
+ # with message_center_unittests below.
+ ['toolkit_views==1 and OS!="mac"', {
'dependencies': [
'../events/events.gyp:events',
'../views/views.gyp:views',
@@ -221,7 +223,7 @@
'../gfx/gfx.gyp:gfx_test_support',
],
}],
- ['toolkit_views==1', {
+ ['toolkit_views==1 and OS!="mac"', {
'dependencies': [
# Compositor is needed by message_center_view_unittest.cc
# and for the fonts used by bounded_label_unittest.cc.