[go: nahoru, domu]

Enable more tests in GN build.

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
diff --git a/BUILD.gn b/BUILD.gn
index 301cf615..4d55a65 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -93,6 +93,7 @@
     "//third_party/zlib",
     "//third_party:jpeg",
     "//tools/gn",
+    "//ui/app_list",
     "//ui/aura",
     "//ui/accessibility",
     "//ui/base",
@@ -193,6 +194,7 @@
       "//third_party/cld_2",
       "//third_party/libaddressinput",
       "//third_party/ffmpeg",
+      "//ui/app_list",
       "//ui/web_dialogs",
       "//ui/wm",
       "//webkit/browser:storage",
diff --git a/ash/BUILD.gn b/ash/BUILD.gn
index 9b610d7..9888fc7 100644
--- a/ash/BUILD.gn
+++ b/ash/BUILD.gn
@@ -24,10 +24,12 @@
     "//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",
@@ -36,17 +38,15 @@
     "//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 = [
@@ -80,15 +80,15 @@
 
   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 -= [
@@ -160,8 +160,8 @@
     "//skia",
     "//testing/gtest",
     "//ui/accessibility",
-    #"//ui/app_list",  TODO(GYP)
-    #"//ui/views",  TODO(GYP)
+    "//ui/app_list",
+    "//ui/views",
   ]
 
   if (is_win) {
@@ -194,7 +194,7 @@
     "//content",
     "//skia",
     "//third_party/icu",
-    #"//ui/app_list",  TODO(GYP)
+    "//ui/app_list",
     "//ui/aura",
     "//ui/base",
     "//ui/compositor",
@@ -202,13 +202,13 @@
     "//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)
   ]
 }
 
@@ -243,17 +243,17 @@
     "//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) {
@@ -291,12 +291,12 @@
   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 -= [
@@ -357,7 +357,7 @@
   ]
 
   if (is_chromeos) {
-    #deps += [ "//ui/display" ]  TODO(GYP)
+    deps += [ "//ui/display" ]
   }
 }
 
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index d8f7e8f..06b8558 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -458,7 +458,7 @@
     "//base",
     "//base/third_party/dynamic_annotations",
     "//gpu",
-    #"//media",  TODO(GYP)
+    "//media",
     "//skia",
     "//ui/events:events_base",
     "//ui/gfx",
@@ -477,29 +477,6 @@
   }
 }
 
-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",
@@ -642,9 +619,6 @@
   ]
 }
 
-# TODO(GYP) make these tests link when all deps are resolved.
-if (false) {
-
 test("cc_unittests") {
   sources = [
     "animation/animation_unittest.cc",
@@ -769,13 +743,12 @@
 
   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",
@@ -785,7 +758,33 @@
 }
 
 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",
+  ]
+}
diff --git a/cc/cc.gyp b/cc/cc.gyp
index 1a623668..ba74085a 100644
--- a/cc/cc.gyp
+++ b/cc/cc.gyp
@@ -8,6 +8,7 @@
   },
   'targets': [
     {
+      # GN version: //cc
       'target_name': 'cc',
       'type': '<(component)',
       'dependencies': [
@@ -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',
@@ -479,6 +481,7 @@
       'msvs_disabled_warnings': [ 4267, ],
     },
     {
+      # GN version: //cc/surfaces
       'target_name': 'cc_surfaces',
       'type': '<(component)',
       'dependencies': [
@@ -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',
diff --git a/cc/cc_tests.gyp b/cc/cc_tests.gyp
index a58342c..0d5cbd1 100644
--- a/cc/cc_tests.gyp
+++ b/cc/cc_tests.gyp
@@ -297,6 +297,7 @@
       'msvs_disabled_warnings': [ 4267, ],
     },
     {
+      # GN version: //cc/cc_perftests
       'target_name': 'cc_perftests',
       'type': '<(gtest_target_type)',
       'dependencies': [
@@ -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',
diff --git a/cc/surfaces/BUILD.gn b/cc/surfaces/BUILD.gn
new file mode 100644
index 0000000..2e3ec23
--- /dev/null
+++ b/cc/surfaces/BUILD.gn
@@ -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",
+  ]
+}
+
diff --git a/components/BUILD.gn b/components/BUILD.gn
index aa5bbee1..14df89e 100644
--- a/components/BUILD.gn
+++ b/components/BUILD.gn
@@ -17,6 +17,9 @@
     "//components/bookmarks/common",
     "//components/bookmarks/test",
     "//components/captive_portal",
+    "//components/cdm/browser",
+    "//components/cdm/common",
+    "//components/cdm/renderer",
     "//components/cloud_devices/common",
     "//components/component_updater",
     "//components/data_reduction_proxy/browser",
@@ -36,6 +39,7 @@
     "//components/infobars/test:test_support",
     "//components/invalidation",
     "//components/json_schema",
+    "//components/keyed_service/content",
     "//components/language_usage_metrics",
     "//components/leveldb_proto",
     "//components/metrics",
@@ -45,6 +49,7 @@
     "//components/omaha_query_params",
     "//components/onc",
     "//components/os_crypt",
+    "//components/pairing",
     "//components/password_manager/content/browser",
     "//components/password_manager/core/browser",
     "//components/password_manager/core/common",
@@ -62,6 +67,7 @@
     "//components/signin/core/browser",
     "//components/startup_metric_utils",
     "//components/strings",
+    "//components/sync_driver",
     "//components/tracing",
     "//components/translate/content/browser",
     "//components/translate/content/common",
@@ -79,22 +85,18 @@
     "//components/visitedlink/renderer",
     "//components/web_modal",
     "//components/webdata/common",
+    "//components/wifi",
   ]
 
-  if (is_win || is_mac) {
-    deps += [
-      "//components/wifi",
-    ]
+  if (!is_win && !is_mac) {
+    deps -= [ "//components/wifi" ]
+  }
+  if (!is_chromeos) {
+    deps -= [ "//components/pairing" ]
   }
 
-  if (is_chromeos) {
-    deps += [
-      "//components/pairing",
-    ]
-  }
-
-  if (!is_ios) {
-    deps += [ "//components/keyed_service/content" ]
+  if (is_ios) {
+    deps -= [ "//components/keyed_service/content" ]
   }
 
   if (is_android) {
@@ -105,6 +107,9 @@
       "//components/autofill/content/renderer",  # Blocked on content/blink.
       "//components/captive_portal",  # Should work, needs checking.
       "//components/cloud_devices/common",  # Should work, needs checking.
+      "//components/cdm/browser",  # Blocked on content.
+      "//components/cdm/common",  # Blocked on content.
+      "//components/cdm/renderer",  # Blocked on content.
       "//components/data_reduction_proxy/browser",  # Should work, needs checking.
       "//components/data_reduction_proxy/common",  # Should work, needs checking.
       "//components/dom_distiller/core",  # Blocked on content.
diff --git a/components/cdm.gypi b/components/cdm.gypi
index 9ae2843..618342c 100644
--- a/components/cdm.gypi
+++ b/components/cdm.gypi
@@ -5,6 +5,7 @@
 {
   'targets': [
     {
+      # GN verison: //components/cdm/common
       'target_name': 'cdm_common',
       'type': 'static_library',
       'dependencies': [
@@ -19,6 +20,7 @@
       ],
     },
     {
+      # GN version: //components/cdm/renderer
       'target_name': 'cdm_renderer',
       'type': 'static_library',
       'dependencies': [
@@ -50,6 +52,7 @@
     ['OS == "android"', {
       'targets': [
         {
+          # GN version: //components/cdm/browser
           'target_name': 'cdm_browser',
           'type': 'static_library',
           'dependencies': [
diff --git a/components/cdm/browser/BUILD.gn b/components/cdm/browser/BUILD.gn
new file mode 100644
index 0000000..e18b670
--- /dev/null
+++ b/components/cdm/browser/BUILD.gn
@@ -0,0 +1,18 @@
+# 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.
+
+source_set("browser") {
+  sources = [
+    "cdm_message_filter_android.cc",
+    "cdm_message_filter_android.h",
+  ]
+
+  deps = [
+    "//base",
+    "//components/cdm/common",
+    "//content/public/browser",
+    "//content/public/common",
+    "//media",
+  ]
+}
diff --git a/components/cdm/common/BUILD.gn b/components/cdm/common/BUILD.gn
new file mode 100644
index 0000000..7af3869
--- /dev/null
+++ b/components/cdm/common/BUILD.gn
@@ -0,0 +1,17 @@
+# 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.
+
+static_library("common") {
+  sources = [
+    "cdm_message_generator.cc",
+    "cdm_message_generator.h",
+    "cdm_messages_android.h",
+  ]
+
+  deps = [
+    "//base",
+    "//content/public/common",
+    "//ipc",
+  ]
+}
diff --git a/components/cdm/renderer/BUILD.gn b/components/cdm/renderer/BUILD.gn
new file mode 100644
index 0000000..bc470b0
--- /dev/null
+++ b/components/cdm/renderer/BUILD.gn
@@ -0,0 +1,25 @@
+# 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.
+
+static_library("renderer") {
+  sources = [
+    "widevine_key_systems.cc",
+    "widevine_key_systems.h",
+  ]
+
+  if (is_android) {
+    sources += [
+      "android_key_systems.cc",
+      "android_key_systems.h",
+    ]
+  }
+
+  deps = [
+    "//base",
+    "//components/cdm/common",
+    "//content/public/common",
+    "//content/public/renderer",
+    "//third_party/widevine/cdm:version_h",
+  ]
+}
diff --git a/components/sync_driver.gypi b/components/sync_driver.gypi
index e36663e..6dd9cc73 100644
--- a/components/sync_driver.gypi
+++ b/components/sync_driver.gypi
@@ -5,6 +5,7 @@
 {
   'targets': [
     {
+      # GN version: //components/sync_driver
       'target_name': 'sync_driver',
       'type': 'static_library',
       'dependencies': [
@@ -16,6 +17,7 @@
         '..',
       ],
       'sources': [
+        # Note: file list duplicated in GN build.
         'sync_driver/backend_data_type_configurer.cc',
         'sync_driver/backend_data_type_configurer.h',
         'sync_driver/change_processor.cc',
diff --git a/components/sync_driver/BUILD.gn b/components/sync_driver/BUILD.gn
new file mode 100644
index 0000000..8cb5489
--- /dev/null
+++ b/components/sync_driver/BUILD.gn
@@ -0,0 +1,91 @@
+# 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.
+
+static_library("sync_driver") {
+  sources = [
+    "backend_data_type_configurer.cc",
+    "backend_data_type_configurer.h",
+    "change_processor.cc",
+    "change_processor.h",
+    "data_type_controller.cc",
+    "data_type_controller.h",
+    "data_type_encryption_handler.cc",
+    "data_type_encryption_handler.h",
+    "data_type_error_handler.h",
+    "data_type_manager.cc",
+    "data_type_manager.h",
+    "data_type_manager_impl.cc",
+    "data_type_manager_impl.h",
+    "data_type_manager_observer.h",
+    "failed_data_types_handler.cc",
+    "failed_data_types_handler.h",
+    "generic_change_processor.cc",
+    "generic_change_processor.h",
+    "generic_change_processor_factory.cc",
+    "generic_change_processor_factory.h",
+    "model_association_manager.cc",
+    "model_association_manager.h",
+    "model_associator.h",
+    "non_blocking_data_type_controller.cc",
+    "non_blocking_data_type_controller.h",
+    "non_blocking_data_type_manager.cc",
+    "non_blocking_data_type_manager.h",
+    "non_ui_data_type_controller.cc",
+    "non_ui_data_type_controller.h",
+    "pref_names.cc",
+    "pref_names.h",
+    "proxy_data_type_controller.cc",
+    "proxy_data_type_controller.h",
+    "sync_api_component_factory.h",
+    "shared_change_processor.cc",
+    "shared_change_processor.h",
+    "shared_change_processor_ref.cc",
+    "shared_change_processor_ref.h",
+    "sync_frontend.cc",
+    "sync_frontend.h",
+    "sync_prefs.cc",
+    "sync_prefs.h",
+    "system_encryptor.cc",
+    "system_encryptor.h",
+    "ui_data_type_controller.cc",
+    "ui_data_type_controller.h",
+    "user_selectable_sync_type.h",
+  ]
+
+  deps = [
+    "//base",
+    "//components/os_crypt",
+    "//sync",
+  ]
+}
+
+static_library("test_support") {
+  sources = [
+    "change_processor_mock.cc",
+    "change_processor_mock.h",
+    "data_type_controller_mock.cc",
+    "data_type_controller_mock.h",
+    "data_type_error_handler_mock.cc",
+    "data_type_error_handler_mock.h",
+    "data_type_manager_mock.cc",
+    "data_type_manager_mock.h",
+    "fake_data_type_controller.cc",
+    "fake_data_type_controller.h",
+    "fake_generic_change_processor.cc",
+    "fake_generic_change_processor.h",
+    "model_associator_mock.cc",
+    "model_associator_mock.h",
+    "non_ui_data_type_controller_mock.cc",
+    "non_ui_data_type_controller_mock.h",
+  ]
+
+  deps = [
+    ":sync_driver",
+    "//base",
+    "//sync",
+    #'../sync/sync.gyp:test_support_sync_internal_api',  TODO(GYP)
+    "//testing/gmock",
+    "//testing/gtest",
+  ]
+}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index a2b0f26..1a8a30a 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -90,7 +90,7 @@
       "//content/browser/devtools:resources",
       "//content/common:mojo_bindings",
       "//cc",
-      "//cc:cc_surfaces",
+      "//cc/surfaces",
       "//mojo/public/cpp/bindings",
       "//mojo/public/interfaces/service_provider",
       "//mojo/public/js/bindings",
diff --git a/ui/app_list/BUILD.gn b/ui/app_list/BUILD.gn
new file mode 100644
index 0000000..76c5cb34
--- /dev/null
+++ b/ui/app_list/BUILD.gn
@@ -0,0 +1,231 @@
+# 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.
+
+import("//build/config/ui.gni")
+
+component("app_list") {
+  sources = [
+    "app_list_constants.cc",
+    "app_list_constants.h",
+    "app_list_export.h",
+    "app_list_folder_item.cc",
+    "app_list_folder_item.h",
+    "app_list_item.cc",
+    "app_list_item.h",
+    "app_list_item_observer.h",
+    "app_list_item_list.cc",
+    "app_list_item_list.h",
+    "app_list_item_list_observer.h",
+    "app_list_menu.cc",
+    "app_list_menu.h",
+    "app_list_model.cc",
+    "app_list_model.h",
+    "app_list_model_observer.h",
+    "app_list_switches.cc",
+    "app_list_switches.h",
+    "app_list_view_delegate.cc",
+    "app_list_view_delegate.h",
+    "pagination_model.cc",
+    "pagination_model.h",
+    "pagination_model_observer.h",
+    "search_box_model.cc",
+    "search_box_model.h",
+    "search_box_model_observer.h",
+    "search_provider.cc",
+    "search_provider.h",
+    "search_result.cc",
+    "search_result.h",
+    "speech_ui_model.cc",
+    "speech_ui_model.h",
+    "speech_ui_model_observer.h",
+  ]
+
+  defines = [ "APP_LIST_IMPLEMENTATION" ]
+
+  deps = [
+    "//base",
+    "//base:i18n",
+    "//base/third_party/dynamic_annotations",
+    "//skia",
+    "//ui/base",
+    "//ui/compositor",
+    "//ui/events:events_base",
+    "//ui/gfx",
+    "//ui/gfx/geometry",
+    "//ui/resources",
+    "//ui/strings",
+  ]
+
+  if (use_aura) {
+    deps += [
+      "//ui/aura",
+      "//ui/wm",
+    ]
+  }
+
+  if (toolkit_views) {
+    sources += [
+      "views/apps_container_view.cc",
+      "views/apps_container_view.h",
+      "views/app_list_background.cc",
+      "views/app_list_background.h",
+      "views/app_list_drag_and_drop_host.h",
+      "views/app_list_folder_view.cc",
+      "views/app_list_folder_view.h",
+      "views/app_list_item_view.cc",
+      "views/app_list_item_view.h",
+      "views/app_list_main_view.cc",
+      "views/app_list_main_view.h",
+      "views/app_list_menu_views.cc",
+      "views/app_list_menu_views.h",
+      "views/app_list_view.cc",
+      "views/app_list_view.h",
+      "views/app_list_view_observer.h",
+      "views/apps_grid_view.cc",
+      "views/apps_grid_view.h",
+      "views/apps_grid_view_delegate.h",
+      "views/apps_grid_view_folder_delegate.h",
+      "views/cached_label.cc",
+      "views/cached_label.h",
+      "views/contents_switcher_view.cc",
+      "views/contents_switcher_view.h",
+      "views/contents_view.cc",
+      "views/contents_view.h",
+      "views/folder_background_view.cc",
+      "views/folder_background_view.h",
+      "views/folder_header_view.cc",
+      "views/folder_header_view.h",
+      "views/folder_header_view_delegate.h",
+      "views/page_switcher.cc",
+      "views/page_switcher.h",
+      "views/progress_bar_view.cc",
+      "views/progress_bar_view.h",
+      "views/pulsing_block_view.cc",
+      "views/pulsing_block_view.h",
+      "views/search_box_view.cc",
+      "views/search_box_view.h",
+      "views/search_box_view_delegate.h",
+      "views/search_result_actions_view.cc",
+      "views/search_result_actions_view.h",
+      "views/search_result_list_view.cc",
+      "views/search_result_list_view.h",
+      "views/search_result_list_view_delegate.h",
+      "views/search_result_view.cc",
+      "views/search_result_view.h",
+      "views/speech_view.cc",
+      "views/speech_view.h",
+      "views/start_page_view.cc",
+      "views/start_page_view.h",
+      "views/tile_item_view.cc",
+      "views/tile_item_view.h",
+      "views/top_icon_animation_view.cc",
+      "views/top_icon_animation_view.h",
+    ]
+    deps += [
+      "//ui/events",
+      "//ui/views",
+    ]
+  }
+
+  if (is_mac) {
+    sources += [
+      "cocoa/app_list_pager_view.h",
+      "cocoa/app_list_pager_view.mm",
+      "cocoa/app_list_view_controller.h",
+      "cocoa/app_list_view_controller.mm",
+      "cocoa/app_list_window_controller.h",
+      "cocoa/app_list_window_controller.mm",
+      "cocoa/apps_collection_view_drag_manager.h",
+      "cocoa/apps_collection_view_drag_manager.mm",
+      "cocoa/apps_grid_controller.h",
+      "cocoa/apps_grid_controller.mm",
+      "cocoa/apps_grid_view_item.h",
+      "cocoa/apps_grid_view_item.mm",
+      "cocoa/apps_pagination_model_observer.h",
+      "cocoa/apps_search_box_controller.h",
+      "cocoa/apps_search_box_controller.mm",
+      "cocoa/apps_search_results_controller.h",
+      "cocoa/apps_search_results_controller.mm",
+      "cocoa/apps_search_results_model_bridge.h",
+      "cocoa/apps_search_results_model_bridge.mm",
+      "cocoa/item_drag_controller.h",
+      "cocoa/item_drag_controller.mm",
+      "cocoa/scroll_view_with_no_scrollbars.h",
+      "cocoa/scroll_view_with_no_scrollbars.mm",
+    ]
+    deps += [
+      #'../../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',  TODO(GYP)
+    ]
+    libs = [ "QuartzCore.framework" ]
+  }
+}
+
+static_library("test_support") {
+  sources = [
+    "test/app_list_test_model.cc",
+    "test/app_list_test_model.h",
+    "test/app_list_test_view_delegate.cc",
+    "test/app_list_test_view_delegate.h",
+  ]
+
+  deps = [
+    ":app_list",
+    "//base",
+    "//ui/gfx",
+    "//ui/gfx/geometry",
+    "//ui/resources",
+  ]
+}
+
+test("app_list_unittests") {
+  sources = [
+    "app_list_item_list_unittest.cc",
+    "app_list_model_unittest.cc",
+    "pagination_model_unittest.cc",
+    "test/run_all_unittests.cc",
+  ]
+
+  deps = [
+    ":app_list",
+    ":test_support",
+    "//base",
+    "//base/test:test_support",
+    "//skia",
+    "//testing/gtest",
+    "//ui/base",
+    "//ui/compositor",
+    "//ui/resources",
+    "//ui/resources:ui_test_pak",
+  ]
+
+  if (toolkit_views) {
+    sources += [
+      "views/app_list_main_view_unittest.cc",
+      "views/app_list_view_unittest.cc",
+      "views/apps_grid_view_unittest.cc",
+      "views/folder_header_view_unittest.cc",
+      "views/search_box_view_unittest.cc",
+      "views/search_result_list_view_unittest.cc",
+      "views/speech_view_unittest.cc",
+      "views/test/apps_grid_view_test_api.cc",
+      "views/test/apps_grid_view_test_api.h",
+    ]
+    deps += [
+      "//ui/views",
+      "//ui/views:test_support",
+    ]
+  }
+
+  if (is_mac) {
+    sources += [
+      "cocoa/app_list_view_controller_unittest.mm",
+      "cocoa/app_list_window_controller_unittest.mm",
+      "cocoa/apps_grid_controller_unittest.mm",
+      "cocoa/apps_search_box_controller_unittest.mm",
+      "cocoa/apps_search_results_controller_unittest.mm",
+      "cocoa/test/apps_grid_controller_test_helper.h",
+      "cocoa/test/apps_grid_controller_test_helper.mm",
+    ]
+  }
+}
diff --git a/ui/app_list/app_list.gyp b/ui/app_list/app_list.gyp
index 96c0dab9..bb207e5 100644
--- a/ui/app_list/app_list.gyp
+++ b/ui/app_list/app_list.gyp
@@ -8,6 +8,7 @@
   },
   'targets': [
     {
+      # GN version: //ui/app_list
       'target_name': 'app_list',
       'type': '<(component)',
       'dependencies': [
@@ -27,6 +28,7 @@
         'APP_LIST_IMPLEMENTATION',
       ],
       'sources': [
+        # Note: sources list duplicated in GN build.
         'app_list_constants.cc',
         'app_list_constants.h',
         'app_list_export.h',
@@ -175,6 +177,7 @@
       'msvs_disabled_warnings': [ 4267, ],
     },
     {
+      # GN version: //ui/app_list:test_support
       'target_name': 'app_list_test_support',
       'type': 'static_library',
       'dependencies': [
@@ -185,6 +188,7 @@
         'app_list',
       ],
       'sources': [
+        # Note: sources list duplicated in GN build.
         'test/app_list_test_model.cc',
         'test/app_list_test_model.h',
         'test/app_list_test_view_delegate.cc',
@@ -192,6 +196,7 @@
       ],
     },
     {
+      # GN version: //ui/app_list:app_list_unittests
       'target_name': 'app_list_unittests',
       'type': 'executable',
       'dependencies': [
@@ -207,6 +212,7 @@
         'app_list_test_support',
       ],
       'sources': [
+        # Note: sources list duplicated in GN build.
         'app_list_item_list_unittest.cc',
         'app_list_model_unittest.cc',
         'pagination_model_unittest.cc',
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 94ccf31..da8df1d 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -82,6 +82,8 @@
     "cocoa/nib_loading.mm",
     "cocoa/nsgraphics_context_additions.h",
     "cocoa/nsgraphics_context_additions.mm",
+    "cocoa/remote_layer_api.h",
+    "cocoa/remote_layer_api.mm",
     "cocoa/tracking_area.h",
     "cocoa/tracking_area.mm",
     "cocoa/underlay_opengl_hosting_window.h",
@@ -94,13 +96,13 @@
     "cursor/cursor.h",
     "cursor/cursor_android.cc",
     "cursor/cursor_loader.h",
-    "cursor/cursor_loader_win.cc",
-    "cursor/cursor_loader_win.h",
     "cursor/cursor_util.cc",
     "cursor/cursor_util.h",
     "cursor/cursor_win.cc",
     "cursor/cursors_aura.cc",
     "cursor/cursors_aura.h",
+    "cursor/image_cursors.cc",
+    "cursor/image_cursors.h",
     "default_theme_provider.cc",
     "default_theme_provider.h",
     "default_theme_provider_mac.mm",
@@ -112,13 +114,13 @@
     "dragdrop/cocoa_dnd_util.h",
     "dragdrop/cocoa_dnd_util.mm",
     "dragdrop/drag_drop_types.h",
-    "dragdrop/drag_drop_types.h",
     "dragdrop/drag_drop_types_win.cc",
     "dragdrop/drag_source_win.cc",
     "dragdrop/drag_source_win.h",
     "dragdrop/drag_utils.cc",
     "dragdrop/drag_utils.h",
     "dragdrop/drag_utils_aura.cc",
+    "dragdrop/drag_utils_mac.mm",
     "dragdrop/drag_utils_win.cc",
     "dragdrop/drop_target_event.cc",
     "dragdrop/drop_target_event.h",
@@ -128,9 +130,74 @@
     "dragdrop/file_info.h",
     "dragdrop/os_exchange_data.cc",
     "dragdrop/os_exchange_data.h",
+    "dragdrop/os_exchange_data_provider_mac.h",
+    "dragdrop/os_exchange_data_provider_mac.mm",
     "dragdrop/os_exchange_data_provider_win.cc",
     "dragdrop/os_exchange_data_provider_win.h",
     "hit_test.h",
+    "ime/candidate_window.cc",
+    "ime/candidate_window.h",
+    "ime/chromeos/character_composer.cc",
+    "ime/chromeos/character_composer.h",
+    "ime/chromeos/ime_bridge.cc",
+    "ime/chromeos/ime_bridge.h",
+    "ime/chromeos/ime_keymap.cc",
+    "ime/chromeos/ime_keymap.h",
+    "ime/chromeos/mock_ime_candidate_window_handler.cc",
+    "ime/chromeos/mock_ime_candidate_window_handler.h",
+    "ime/chromeos/mock_ime_engine_handler.cc",
+    "ime/chromeos/mock_ime_engine_handler.h",
+    "ime/chromeos/mock_ime_input_context_handler.cc",
+    "ime/chromeos/mock_ime_input_context_handler.h",
+    "ime/composition_text.cc",
+    "ime/composition_text.h",
+    "ime/composition_text_util_pango.cc",
+    "ime/composition_text_util_pango.h",
+    "ime/composition_underline.h",
+    "ime/dummy_input_method_delegate.cc",
+    "ime/dummy_input_method_delegate.h",
+    "ime/infolist_entry.cc",
+    "ime/infolist_entry.h",
+    "ime/input_method.h",
+    "ime/input_method_auralinux.cc",
+    "ime/input_method_auralinux.h",
+    "ime/input_method_base.cc",
+    "ime/input_method_base.h",
+    "ime/input_method_chromeos.cc",
+    "ime/input_method_chromeos.h",
+    "ime/input_method_delegate.h",
+    "ime/input_method_factory.cc",
+    "ime/input_method_factory.h",
+    "ime/input_method_initializer.cc",
+    "ime/input_method_initializer.h",
+    "ime/input_method_mac.h",
+    "ime/input_method_mac.mm",
+    "ime/input_method_minimal.cc",
+    "ime/input_method_minimal.h",
+    "ime/input_method_observer.h",
+    "ime/input_method_win.cc",
+    "ime/input_method_win.h",
+    "ime/linux/fake_input_method_context.cc",
+    "ime/linux/fake_input_method_context.h",
+    "ime/linux/fake_input_method_context_factory.cc",
+    "ime/linux/fake_input_method_context_factory.h",
+    "ime/linux/linux_input_method_context.h",
+    "ime/linux/linux_input_method_context_factory.cc",
+    "ime/linux/linux_input_method_context_factory.h",
+    "ime/mock_input_method.cc",
+    "ime/mock_input_method.h",
+    "ime/remote_input_method_delegate_win.h",
+    "ime/remote_input_method_win.cc",
+    "ime/remote_input_method_win.h",
+    "ime/text_input_client.cc",
+    "ime/text_input_client.h",
+    "ime/text_input_focus_manager.cc",
+    "ime/text_input_focus_manager.h",
+    "ime/text_input_type.h",
+    "ime/win/imm32_manager.cc",
+    "ime/win/imm32_manager.h",
+    "ime/win/tsf_input_scope.cc",
+    "ime/win/tsf_input_scope.h",
     "l10n/formatter.cc",
     "l10n/formatter.h",
     "l10n/l10n_font_util.cc",
@@ -167,6 +234,8 @@
     "models/menu_model.h",
     "models/menu_model_delegate.h",
     "models/menu_separator_types.h",
+    "models/simple_combobox_model.cc",
+    "models/simple_combobox_model.h",
     "models/simple_menu_model.cc",
     "models/simple_menu_model.h",
     "models/table_model.cc",
@@ -200,6 +269,7 @@
     "touch/touch_editing_controller.h",
     "touch/touch_enabled.cc",
     "touch/touch_enabled.h",
+    "ui_base_export.h",
     "ui_base_exports.cc",
     "ui_base_paths.cc",
     "ui_base_paths.h",
@@ -360,6 +430,11 @@
     configs += [
       "//build/config/linux:pangocairo",
     ]
+  } else {
+    sources -= [
+      "ime/composition_text_util_pango.cc",
+      "ime/composition_text_util_pango.h",
+    ]
   }
 
   if (is_chromeos || (use_aura && is_linux && !use_x11)) {
@@ -371,6 +446,10 @@
 
   libs = []
   if (is_win) {
+    sources += [
+      "cursor/cursor_loader_win.cc",
+      "cursor/cursor_loader_win.h",
+    ]
     deps += [
       "//third_party/wtl",
     ]
@@ -447,6 +526,15 @@
       }
     }
   }
+  if (use_ozone) {
+    sources += [
+      "cursor/cursor_loader_ozone.cc",
+      "cursor/cursor_loader_ozone.h",
+      "cursor/cursor_ozone.cc",
+      "cursor/ozone/bitmap_cursor_factory_ozone.cc",
+      "cursor/ozone/bitmap_cursor_factory_ozone.h",
+    ]
+  }
 
   if (!toolkit_views) {
     sources -= [
diff --git a/ui/compositor/BUILD.gn b/ui/compositor/BUILD.gn
index 73010ee..517af0f 100644
--- a/ui/compositor/BUILD.gn
+++ b/ui/compositor/BUILD.gn
@@ -84,9 +84,7 @@
     "test/layer_animator_test_controller.h",
     "test/test_compositor_host.h",
     "test/test_compositor_host_mac.mm",
-    "test/test_compositor_host_ozone.cc",
     "test/test_compositor_host_win.cc",
-    "test/test_compositor_host_x11.cc",
     "test/test_layer_animation_delegate.cc",
     "test/test_layer_animation_delegate.h",
     "test/test_layer_animation_observer.cc",
@@ -118,6 +116,12 @@
     configs += [ "//build/config/linux:x11" ]
     deps += [ "//ui/gfx/x" ]
   }
+
+  if (use_ozone) {
+    sources += [ "test/test_compositor_host_ozone.cc" ]
+  } else if (use_x11) {
+    sources += [ "test/test_compositor_host_x11.cc" ]
+  }
 }
 
 # TODO(GYP) enable this when all dependencies are complete and it links.
diff --git a/ui/events/events.gyp b/ui/events/events.gyp
index db0e039..cdedec4 100644
--- a/ui/events/events.gyp
+++ b/ui/events/events.gyp
@@ -8,18 +8,21 @@
   },
   'targets': [
     {
+      # GN version: //ui/events:dom4_keycode_converter
       'target_name': 'dom4_keycode_converter',
       'type': 'static_library',
       'dependencies': [
         '<(DEPTH)/base/base.gyp:base',
       ],
       'sources': [
+        # Note: sources list duplicated in GN build.
         'keycodes/dom4/keycode_converter.cc',
         'keycodes/dom4/keycode_converter.h',
         'keycodes/dom4/keycode_converter_data.h',
       ],
     },
     {
+      # GN version: //ui/events:events_base
       'target_name': 'events_base',
       'type': '<(component)',
       'dependencies': [
@@ -34,6 +37,7 @@
         'EVENTS_BASE_IMPLEMENTATION',
       ],
       'sources': [
+        # Note: sources list duplicated in GN build.
         'device_data_manager.cc',
         'device_data_manager.h',
         'event_constants.h',
@@ -77,6 +81,7 @@
       ],
     },
     {
+      # GN version: //ui/events
       'target_name': 'events',
       'type': '<(component)',
       'dependencies': [
@@ -92,6 +97,7 @@
         'EVENTS_IMPLEMENTATION',
       ],
       'sources': [
+        # Note: sources list duplicated in GN build.
         'cocoa/cocoa_event_utils.h',
         'cocoa/cocoa_event_utils.mm',
         'cocoa/events_mac.mm',
@@ -177,6 +183,7 @@
       ],
     },
     {
+      # GN version: //ui/events:gesture_detection
       'target_name': 'gesture_detection',
       'type': '<(component)',
       'dependencies': [
@@ -190,6 +197,7 @@
         'GESTURE_DETECTION_IMPLEMENTATION',
       ],
       'sources': [
+        # Note: sources list duplicated in GN build.
         'gesture_detection/bitset_32.h',
         'gesture_detection/filtered_gesture_provider.cc',
         'gesture_detection/filtered_gesture_provider.h',
@@ -226,6 +234,7 @@
       ],
     },
     {
+      # GN version: //ui/events:test_support
       'target_name': 'events_test_support',
       'type': 'static_library',
       'dependencies': [
@@ -235,6 +244,7 @@
         'platform/events_platform.gyp:events_platform',
       ],
       'sources': [
+        # Note: sources list duplicated in GN build.
         'test/cocoa_test_event_utils.h',
         'test/cocoa_test_event_utils.mm',
         'test/event_generator.cc',
@@ -275,6 +285,7 @@
       ],
     },
     {
+      # GN vesrion: //ui/events:events_unittests
       'target_name': 'events_unittests',
       'type': '<(gtest_target_type)',
       'dependencies': [
@@ -294,6 +305,7 @@
         'platform/events_platform.gyp:events_platform',
       ],
       'sources': [
+        # Note: sources list duplicated in GN build.
         'cocoa/events_mac_unittest.mm',
         'event_dispatcher_unittest.cc',
         'event_processor_unittest.cc',
diff --git a/ui/gfx/geometry/BUILD.gn b/ui/gfx/geometry/BUILD.gn
index b7c877a..430e1d6a 100644
--- a/ui/gfx/geometry/BUILD.gn
+++ b/ui/gfx/geometry/BUILD.gn
@@ -35,6 +35,9 @@
     "rect_conversions.h",
     "rect_f.cc",
     "rect_f.h",
+    "r_tree.h",
+    "r_tree_base.cc",
+    "r_tree_base.h",
     "safe_integer_conversions.h",
     "size.cc",
     "size.h",
diff --git a/ui/message_center/BUILD.gn b/ui/message_center/BUILD.gn
index 24a722e8..03a6d10 100644
--- a/ui/message_center/BUILD.gn
+++ b/ui/message_center/BUILD.gn
@@ -162,9 +162,6 @@
   ]
 }
 
-# TODO(GYP) Enable this when media is linked.
-if (false) {
-
 test("message_center_unittests") {
   sources = [
     "test/run_all_unittests.cc",
@@ -223,5 +220,3 @@
     }
   }  # enable_notifications
 }
-
-}  # if false
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index f57246304..9c32e6f 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -97,6 +97,7 @@
   if (use_aura) {
     sources += gypi_values.views_aura_sources
     if (!is_chromeos) {
+      sources += gypi_values.views_desktop_aura_sources
       if (use_x11) {
         sources += gypi_values.views_desktop_aura_x11_sources
       } else if (is_win) {
diff --git a/ui/views/controls/webview/BUILD.gn b/ui/views/controls/webview/BUILD.gn
index 4998cc3..4c9c53a79c 100644
--- a/ui/views/controls/webview/BUILD.gn
+++ b/ui/views/controls/webview/BUILD.gn
@@ -36,3 +36,27 @@
     "//ui/views",
   ]
 }
+
+source_set("test_support") {
+  sources = [
+    "../../test/webview_test_helper.cc",
+    "../../test/webview_test_helper.h",
+  ]
+
+  deps = [
+    ":webview",
+    "//base",
+    "//content",
+    "//ipc",
+    "//skia",
+    "//testing/gtest",
+    "//ui/aura",
+    "//ui/base",
+    "//ui/events",
+    "//ui/gfx",
+    "//ui/gfx/geometry",
+    "//ui/views",
+    "//ui/views:test_support",
+    #'../../../../content/content_shell_and_tests.gyp:test_support_content',  TODO(GYP)
+  ]
+}
diff --git a/ui/views/controls/webview/webview_tests.gyp b/ui/views/controls/webview/webview_tests.gyp
index 0adc5c2b..b66eeae5 100644
--- a/ui/views/controls/webview/webview_tests.gyp
+++ b/ui/views/controls/webview/webview_tests.gyp
@@ -8,6 +8,7 @@
   },
   'targets': [
     {
+      # GN version: //ui/views/controls/webview:test_support
       'target_name': 'webview_test_support',
       'type': 'static_library',
       'dependencies': [