Skip to content

Commit

Permalink
Enable more tests in GN build.
Browse files Browse the repository at this point in the history
Add components/cdm, components/sync_driver, ui/app_list,

Update file lists that got out of sync with GYP to to not having any targets that actually link them.

Move cc:cc_surfaces to cc/surfaces

Enable linking cc_unittests, cc_perftests, app_list_unittests, message_center_unittests

TBR=jamesr

Review URL: https://codereview.chromium.org/399683005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284784 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
brettw@chromium.org committed Jul 22, 2014
1 parent b46e7e9 commit 6e44c30
Show file tree
Hide file tree
Showing 24 changed files with 651 additions and 79 deletions.
2 changes: 2 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ group("root") {
"//third_party/zlib",
"//third_party:jpeg",
"//tools/gn",
"//ui/app_list",
"//ui/aura",
"//ui/accessibility",
"//ui/base",
Expand Down Expand Up @@ -193,6 +194,7 @@ group("root") {
"//third_party/cld_2",
"//third_party/libaddressinput",
"//third_party/ffmpeg",
"//ui/app_list",
"//ui/web_dialogs",
"//ui/wm",
"//webkit/browser:storage",
Expand Down
48 changes: 24 additions & 24 deletions ash/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ component("ash") {
"//base/third_party/dynamic_annotations",
"//cc",
"//content/public/browser",
"//media",
"//net",
"//skia",
"//third_party/icu",
"//ui/accessibility",
"//ui/app_list",
"//ui/aura",
"//ui/base",
"//ui/compositor",
Expand All @@ -36,17 +38,15 @@ component("ash") {
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/keyboard",
"//ui/message_center",
"//ui/resources",
"//ui/strings",
"//ui/views",
"//ui/views/controls/webview",
"//ui/web_dialogs",
"//ui/wm",
"//url",
#'../components/components.gyp:user_manager', TODO(GYP)
#'../media/media.gyp:media', TODO(GYP)
#"//ui/app_list", TODO(GYP)
#'../ui/message_center/message_center.gyp:message_center', TODO(GYP)
#'../ui/views/controls/webview/webview.gyp:webview', TODO(GYP)
#'../ui/views/views.gyp:views' TODO(GYP),
]

forward_dependent_configs_from = [
Expand Down Expand Up @@ -80,15 +80,15 @@ component("ash") {

if (is_chromeos) {
deps += [
"//device/bluetooth",
"//ui/display",
"//ui/display/util",
#'../chromeos/chromeos.gyp:chromeos', TODO(GYP)
# Ash #includes power_supply_properties.pb.h directly.
#'../chromeos/chromeos.gyp:power_manager_proto', TODO(GYP)
#'../device/bluetooth/bluetooth.gyp:device_bluetooth', TODO(GYP)
#'../ui/chromeos/ui_chromeos.gyp:ui_chromeos_resources', TODO(GYP)
#'../ui/chromeos/ui_chromeos.gyp:ui_chromeos_strings', TODO(GYP)
#'../ui/chromeos/ui_chromeos.gyp:ui_chromeos', TODO(GYP)
#'../ui/display/display.gyp:display', TODO(GYP)
#'../ui/display/display.gyp:display_util', TODO(GYP)
]
} else {
sources -= [
Expand Down Expand Up @@ -160,8 +160,8 @@ static_library("test_support") {
"//skia",
"//testing/gtest",
"//ui/accessibility",
#"//ui/app_list", TODO(GYP)
#"//ui/views", TODO(GYP)
"//ui/app_list",
"//ui/views",
]

if (is_win) {
Expand Down Expand Up @@ -194,21 +194,21 @@ static_library("ash_shell_lib") {
"//content",
"//skia",
"//third_party/icu",
#"//ui/app_list", TODO(GYP)
"//ui/app_list",
"//ui/aura",
"//ui/base",
"//ui/compositor",
"//ui/events",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/keyboard",
#"//ui/message_center", TODO(GYP)
"//ui/message_center",
"//ui/resources",
"//ui/views",
"//ui/views:test_support",
#'../content/content_shell_and_tests.gyp:content_shell_lib', TODO(GYP)
#'../ui/views/examples/examples.gyp:views_examples_lib', TODO(GYP)
#'../ui/views/examples/examples.gyp:views_examples_with_content_lib', TODO(GYP)
#'../ui/views/views.gyp:views', TODO(GYP)
#'../ui/views/views.gyp:views_test_support', TODO(GYP)
]
}

Expand Down Expand Up @@ -243,17 +243,17 @@ test("ash_unittests") {
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/keyboard",
"//ui/message_center",
"//ui/message_center:test_support",
"//ui/resources",
"//ui/views",
"//ui/views:test_support",
"//ui/views/controls/webview:test_support",
"//ui/web_dialogs",
"//ui/wm",
"//url",
#'../components/components.gyp:user_manager', TODO(GYP)
#'../content/content_shell_and_tests.gyp:test_support_content', TODO(GYP)
#'../ui/message_center/message_center.gyp:message_center', TODO(GYP)
#'../ui/message_center/message_center.gyp:message_center_test_support', TODO(GYP)
#'../ui/views/controls/webview/webview_tests.gyp:webview_test_support', TODO(GYP)
#'../ui/views/views.gyp:views', TODO(GYP)
#'../ui/views/views.gyp:views_test_support', TODO(GYP)
]

if (!is_chromeos) {
Expand Down Expand Up @@ -291,12 +291,12 @@ test("ash_unittests") {
if (is_chromeos) {
sources += [ "first_run/first_run_helper_unittest.cc" ]
deps += [
"//device/bluetooth",
"//ui/display",
"//ui/display:test_util",
"//ui/display/types",
#'../chromeos/chromeos.gyp:chromeos_test_support_without_gmock', TODO(GYP)
#'../chromeos/chromeos.gyp:power_manager_proto', TODO(GYP)
#'../device/bluetooth/bluetooth.gyp:device_bluetooth', TODO(GYP)
#'../ui/display/display.gyp:display', TODO(GYP)
#'../ui/display/display.gyp:display_test_util', TODO(GYP)
#'../ui/display/display.gyp:display_types', TODO(GYP)
]
} else {
sources -= [
Expand Down Expand Up @@ -357,7 +357,7 @@ test("ash_shell_unittests") {
]

if (is_chromeos) {
#deps += [ "//ui/display" ] TODO(GYP)
deps += [ "//ui/display" ]
}
}

Expand Down
65 changes: 32 additions & 33 deletions cc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ component("cc") {
"//base",
"//base/third_party/dynamic_annotations",
"//gpu",
#"//media", TODO(GYP)
"//media",
"//skia",
"//ui/events:events_base",
"//ui/gfx",
Expand All @@ -477,29 +477,6 @@ component("cc") {
}
}

component("cc_surfaces") {
sources = [
"surfaces/surface.cc",
"surfaces/surface.h",
"surfaces/surface_aggregator.cc",
"surfaces/surface_aggregator.h",
"surfaces/surface_manager.cc",
"surfaces/surface_manager.h",
"surfaces/surfaces_export.h",
]

defines = [ "CC_SURFACES_IMPLEMENTATION=1" ]

deps = [
":cc",
"//base",
"//base/third_party/dynamic_annotations",
"//skia",
"//ui/gfx",
"//ui/gfx/geometry",
]
}

source_set("test_support") {
sources = [
"test/animation_test_common.cc",
Expand Down Expand Up @@ -642,9 +619,6 @@ source_set("test_support") {
]
}

# TODO(GYP) make these tests link when all deps are resolved.
if (false) {

test("cc_unittests") {
sources = [
"animation/animation_unittest.cc",
Expand Down Expand Up @@ -769,13 +743,12 @@ test("cc_unittests") {

deps = [
":cc",
":cc_surfaces",
":test_support",
"//base/test:test_support",
"//cc/surfaces",
"//gpu",
"//gpu:gpu_unittest_utils",
# TODO(GYP)
#"//media",
"//media",
"//testing/gmock",
"//testing/gtest",
"//ui/events:events_base",
Expand All @@ -785,7 +758,33 @@ test("cc_unittests") {
}

test("cc_perftests") {
# TODO(GYP)
}
sources = [
"layers/layer_perftest.cc",
"layers/picture_layer_impl_perftest.cc",
"resources/picture_layer_tiling_perftest.cc",
"resources/picture_pile_impl_perftest.cc",
"resources/raster_worker_pool_perftest.cc",
"resources/task_graph_runner_perftest.cc",
"resources/tile_manager_perftest.cc",
"test/cc_test_suite.cc",
"test/run_all_perftests.cc",
"trees/layer_tree_host_common_perftest.cc",
"trees/layer_tree_host_perftest.cc",
"trees/occlusion_tracker_perftest.cc",
]

} # if false
deps = [
":cc",
":test_support",
"//base",
"//gpu",
"//gpu:gpu_unittest_utils",
"//media",
"//skia",
"//testing/gmock",
"//testing/gtest",
"//testing/perf",
"//ui/gfx",
"//ui/gfx/geometry",
]
}
4 changes: 4 additions & 0 deletions cc/cc.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
'targets': [
{
# GN version: //cc
'target_name': 'cc',
'type': '<(component)',
'dependencies': [
Expand All @@ -31,6 +32,7 @@
'CC_IMPLEMENTATION=1',
],
'sources': [
# Note: file list duplicated in GN build.
'animation/animation.cc',
'animation/animation.h',
'animation/animation_curve.cc',
Expand Down Expand Up @@ -479,6 +481,7 @@
'msvs_disabled_warnings': [ 4267, ],
},
{
# GN version: //cc/surfaces
'target_name': 'cc_surfaces',
'type': '<(component)',
'dependencies': [
Expand All @@ -493,6 +496,7 @@
'CC_SURFACES_IMPLEMENTATION=1',
],
'sources': [
# Note: file list duplicated in GN build.
'surfaces/display.cc',
'surfaces/display.h',
'surfaces/display_client.h',
Expand Down
2 changes: 2 additions & 0 deletions cc/cc_tests.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@
'msvs_disabled_warnings': [ 4267, ],
},
{
# GN version: //cc/cc_perftests
'target_name': 'cc_perftests',
'type': '<(gtest_target_type)',
'dependencies': [
Expand All @@ -314,6 +315,7 @@
'cc_test_support',
],
'sources': [
# Note: sources list duplicated in GN build.
'layers/layer_perftest.cc',
'layers/picture_layer_impl_perftest.cc',
'resources/picture_layer_tiling_perftest.cc',
Expand Down
39 changes: 39 additions & 0 deletions cc/surfaces/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

component("surfaces") {
output_name = "cc_surfaces"
sources = [
"display.cc",
"display.h",
"display_client.h",
"surface.cc",
"surface.h",
"surface_aggregator.cc",
"surface_aggregator.h",
"surface_factory.cc",
"surface_factory.h",
"surface_factory_client.h",
"surface_id.h",
"surface_id_allocator.cc",
"surface_id_allocator.h",
"surface_manager.cc",
"surface_manager.h",
"surface_resource_holder.cc",
"surface_resource_holder.h",
"surfaces_export.h",
]

defines = [ "CC_SURFACES_IMPLEMENTATION=1" ]

deps = [
"//base",
"//base/third_party/dynamic_annotations",
"//cc",
"//skia",
"//ui/gfx",
"//ui/gfx/geometry",
]
}

Loading

0 comments on commit 6e44c30

Please sign in to comment.