diff options
-rw-r--r-- | ash/ash_resources.gyp | 1 | ||||
-rw-r--r-- | build/config/linux/BUILD.gn | 4 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 68 | ||||
-rw-r--r-- | chrome/test/BUILD.gn | 252 | ||||
-rw-r--r-- | extensions/BUILD.gn | 2 | ||||
-rw-r--r-- | google_apis/google_apis.gyp | 2 | ||||
-rw-r--r-- | third_party/mesa/BUILD.gn | 4 |
7 files changed, 295 insertions, 38 deletions
diff --git a/ash/ash_resources.gyp b/ash/ash_resources.gyp index 930cde8..d84fea4 100644 --- a/ash/ash_resources.gyp +++ b/ash/ash_resources.gyp @@ -5,6 +5,7 @@ { 'targets': [ { + # GN version: //ash/resources 'target_name': 'ash_resources', 'type': 'none', 'variables': { diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn index e132116..0453c84 100644 --- a/build/config/linux/BUILD.gn +++ b/build/config/linux/BUILD.gn @@ -118,6 +118,10 @@ config("xi") { libs = [ "Xi" ] } +config("xtst") { + libs = [ "Xtst" ] +} + config("libresolv") { libs = [ "resolv" ] } diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 25af695..0ea1e58 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -311,7 +311,6 @@ 'browser/extensions/api/module/module_apitest.cc', 'browser/extensions/api/music_manager_private/music_manager_private_browsertest.cc', 'browser/extensions/api/notification_provider/notification_provider_apitest.cc', - 'browser/extensions/api/notifications/notifications_apitest.cc', 'browser/extensions/api/omnibox/omnibox_api_browsertest.cc', 'browser/extensions/api/page_capture/page_capture_apitest.cc', 'browser/extensions/api/permissions/permissions_apitest.cc', @@ -480,8 +479,6 @@ 'browser/net/proxy_browsertest.cc', 'browser/net/sdch_browsertest.cc', 'browser/net/websocket_browsertest.cc', - 'browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc', - 'browser/notifications/message_center_notifications_browsertest.cc', 'browser/password_manager/password_manager_browsertest.cc', 'browser/policy/cloud/cloud_policy_browsertest.cc', 'browser/policy/cloud/cloud_policy_manager_browsertest.cc', @@ -876,8 +873,6 @@ 'browser/ui/omnibox/omnibox_view_browsertest.cc', 'browser/ui/panels/base_panel_browser_test.cc', 'browser/ui/panels/base_panel_browser_test.h', - 'browser/ui/panels/detached_panel_browsertest.cc', - 'browser/ui/panels/docked_panel_browsertest.cc', 'browser/ui/panels/test_panel_active_state_observer.cc', 'browser/ui/panels/test_panel_active_state_observer.h', 'browser/ui/panels/test_panel_mouse_watcher.cc', @@ -977,7 +972,7 @@ 'browser/ui/views/toolbar/toolbar_view_interactive_uitest.cc', ], 'chrome_interactive_ui_test_notifications_sources': [ - 'browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc', + 'browser/extensions/api/notifications/notifications_apitest.cc', 'browser/notifications/message_center_notifications_browsertest.cc', ], 'chrome_interactive_ui_test_chromeos_sources': [ @@ -1455,24 +1450,28 @@ }], ['OS=="linux" and chromeos==0', { 'sources!': [ - # TODO(port): Everything here times out. Attempts have been made to - # fix the individual failures, but each time I disable a test from - # these suites, it seems like one or another starts timing out too. - 'browser/ui/views/keyboard_access_browsertest.cc', # Views except Mac views. + # TODO(port): This times out. Attempts have been made to fix the + # individual failures, but each time I disable a test from these + # suites, it seems like one or another starts timing out too. + + # Note: list duplicated in GN build. + 'browser/ui/views/keyboard_access_browsertest.cc', ], }, { # Everything but desktop Linux. 'sources': [ '<@(chrome_interactive_ui_test_non_desktop_linux_sources)' ], }], ['use_ash==1', { 'sources': [ '<@(chrome_interactive_ui_test_ash_sources)' ], - }], - ['OS != "mac"', { - 'sources': [ '<@(chrome_interactive_ui_test_non_mac_sources)' ], + 'dependencies': [ + '../ash/ash.gyp:ash_test_support', + ], }], ['OS=="mac"', { 'sources!': [ # TODO(tapted): Enable toolkit-views tests on Mac when their # respective implementations are ported. + + # Note: Sources list duplicated in GN build. 'browser/ui/views/keyboard_access_browsertest.cc', 'browser/ui/views/message_center/web_notification_tray_browsertest.cc', 'browser/ui/views/panels/panel_view_browsertest.cc', @@ -1483,32 +1482,41 @@ ], # See comment about the same line in chrome/chrome_tests.gypi. 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, - }], # OS=="mac" + }, { # Non-Mac. + 'sources': [ '<@(chrome_interactive_ui_test_non_mac_sources)' ], + }], ['notifications == 1', { # Common notifications tests. 'sources': [ - 'browser/extensions/notifications_apitest.cc', + '<@(chrome_interactive_ui_test_notifications_sources)', ], 'conditions': [ - ['chromeos == 0', { + ['chromeos == 1', { + 'sources': [ + 'browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc', + ], + }, { # Non-ChromeOS notifications tests (ChromeOS does not use # cross-platform panels). 'sources': [ + # Note: List duplicated in GN build. 'browser/notifications/notification_browsertest.cc', 'browser/notifications/platform_notification_service_browsertest.cc', ], }], - ], - }], - ['OS=="android"', { - 'sources!': [ - # Android does not use the message center-based Notification system. - 'browser/notifications/message_center_notifications_browsertest.cc', + ['OS=="android"', { + 'sources!': [ + # Note: List duplicated in GN build. - # TODO(peter): Enable the Notification browser tests. - 'browser/notifications/notification_browsertest.cc', - 'browser/notifications/platform_notification_service_browsertest.cc', - ] + # Android does not use the message center-based Notification system. + 'browser/notifications/message_center_notifications_browsertest.cc', + + # TODO(peter): Enable the Notification browser tests. + 'browser/notifications/notification_browsertest.cc', + 'browser/notifications/platform_notification_service_browsertest.cc', + ] + }], + ], }], ['toolkit_views==1', { 'sources': [ '<@(chrome_interactive_ui_test_views_sources)' ], @@ -1518,11 +1526,6 @@ '../ui/views/views.gyp:views_test_support', ], }], - ['use_ash==1', { - 'dependencies': [ - '../ash/ash.gyp:ash_test_support', - ], - }], ['use_aura==0 or chromeos==1', { 'sources!': [ '../ui/views/corewm/desktop_capture_controller_unittest.cc', @@ -1546,6 +1549,7 @@ '<@(chrome_interactive_ui_test_chromeos_sources)', ], 'sources!': [ + # Note: List duplicated in GN build. '../ui/views/widget/desktop_aura/desktop_window_tree_host_x11_interactive_uitest.cc', '../ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc', @@ -1566,6 +1570,7 @@ ['chromeos==1 and branding=="Chrome"', { 'sources!': [ # These tests are failing on official cros bots. crbug.com/431450. + # Note: list duplicated in GN build. 'browser/ui/views/bookmarks/bookmark_bar_view_test.cc', ], }], @@ -2097,7 +2102,6 @@ 'browser/extensions/api/terminal/terminal_private_apitest.cc', 'browser/invalidation/profile_invalidation_provider_factory_browsertest.cc', 'browser/net/nss_context_chromeos_browsertest.cc', - 'browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc', 'browser/ui/ash/keyboard_controller_browsertest.cc', 'browser/ui/views/select_file_dialog_extension_browsertest.cc', 'test/data/webui/certificate_viewer_dialog_test.js', diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 7aa757d..28aa746 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn @@ -214,11 +214,251 @@ source_set("test_support_unit") { } if (!is_android) { - gypi_values = exec_script( - "//build/gypi_to_gn.py", - [ rebase_path("../chrome_tests.gypi") ], - "scope", - [ "../chrome_tests.gypi" ]) + gypi_values = exec_script("//build/gypi_to_gn.py", + [ rebase_path("../chrome_tests.gypi") ], + "scope", + [ "../chrome_tests.gypi" ]) + + test("interactive_ui_tests") { + sources = rebase_path(gypi_values.chrome_interactive_ui_test_sources, + ".", + "//chrome") + + defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] + ldflags = [] + + deps = [ + "//base/allocator", + "//chrome/browser", + "//chrome/browser/devtools", + "//chrome/renderer", + "//chrome/test:test_support", + "//chrome:resources", + "//chrome:strings", + "//chrome:packed_extra_resources", + "//chrome:packed_resources", + "//content/app/resources", + "//crypto:platform", + "//google_apis:test_support", + "//net", + "//net:net_resources", + "//net:test_support", + "//pdf", + + #"//ppapi:ppapi_tests", # TODO(GYP) this doesn't exist yet. + "//skia", + "//sync", + "//testing/gmock", + "//testing/gtest", + "//third_party/hunspell", + "//third_party/icu", + "//third_party/libpng", + "//third_party/npapi", + "//third_party/zlib", + "//ui/base:test_support", + "//ui/web_dialogs:test_support", + ] + + # Runtime dependencies + datadeps = [ + "//third_party/mesa:osmesa", + ] + + if (toolkit_views) { + sources += + rebase_path(gypi_values.chrome_interactive_ui_test_views_sources, + ".", + "//chrome") + deps += [ + "//ui/views", + "//ui/views:test_support", + "//ui/views/controls/webview:test_support", + ] + if (is_linux) { + # TODO(gbillock): aura linux does not support the automation for + # SendMouseMoveNotifyWhenDone + sources -= [ "../browser/ui/views/toolbar/toolbar_button_test.cc" ] + } + if (is_mac) { + sources -= [ + "../browser/ui/views/keyboard_access_browsertest.cc", + "../browser/ui/views/message_center/web_notification_tray_browsertest.cc", + "../browser/ui/views/panels/panel_view_browsertest.cc", + "../browser/ui/views/toolbar/toolbar_button_test.cc", + ] + } + if (is_chromeos) { + sources -= [ + "../../ui/views/widget/desktop_aura/desktop_window_tree_host_x11_interactive_uitest.cc", + "../../ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc", + ] + } + } + + if (is_linux && !is_chromeos) { + # Desktop linux. + sources -= [ + # TODO(port): This times out. Attempts have been made to fix the + # individual failures, but each time I disable a test from these + # suites, it seems like one or another starts timing out too. + "../browser/ui/views/keyboard_access_browsertest.cc", + ] + } else { + # Everything but desktop Linux. + sources += rebase_path( + gypi_values.chrome_interactive_ui_test_non_desktop_linux_sources, + ".", + "//chrome") + } + + if (is_chromeos) { + sources += + rebase_path(gypi_values.chrome_interactive_ui_test_chromeos_sources, + ".", + "//chrome") + sources += [ "../browser/notifications/login_state_notification_blocker_chromeos_browsertest.cc" ] + sources -= [ + # Use only the _chromeos version on ChromeOS. + "../test/base/view_event_test_platform_part_ash.cc", + ] + + deps += [ + "//ash/resources", + "//chromeos", + ] + + if (enable_nacl) { + # TODO(GYP) this is also under a disable_nacl_untrusted==0 condition. + deps += [ + # '../native_client/src/trusted/service_runtime/linux/nacl_bootstrap.gyp:nacl_helper_bootstrap', TODO(GYP) + # '../components/nacl.gyp:nacl_helper', TODO(GYP) + # '../components/nacl_nonsfi.gyp:nacl_helper_nonsfi', TODO(GYP) + ] + } + + if (is_chrome_branded) { + sources -= [ + # These tests are failing on official cros bots. crbug.com/431450. + "../browser/ui/views/bookmarks/bookmark_bar_view_test.cc", + ] + } + } else { + # ChromeOS doesn't use panels, everybody else does. + sources += + rebase_path(gypi_values.chrome_interactive_ui_test_panels_sources, + ".", + "//chrome") + if (toolkit_views) { + sources += rebase_path( + gypi_values.chrome_interactive_ui_test_panels_views_sources, + ".", + "//chrome") + } + } + + if (!is_linux) { + # Non-Linux platforms (Linux includes ChromeOS here). + sources += rebase_path( + gypi_values.chrome_interactive_ui_test_non_linux_and_chromeos_sources, + ".", + "//chrome") + } + + if (is_win) { + sources += rebase_path(gypi_values.chrome_interactive_ui_test_win_sources, + ".", + "//chrome") + sources += [ + # TODO: It would be nice to have these pulled in automatically from + # direct_dependent_settings in their various targets + # (net.gyp:net_resources, etc.), but that causes errors in other + # targets when resulting .res files get referenced multiple times. + #"$root_gen_dir/chrome_version/other_version.rc", TODO(GYP) what generates this? + "$root_gen_dir/ui/resources/ui_unscaled_resources.rc", + ] + deps += [ + "//third_party/isimpledom", + "//third_party/wtl", + "//ui/resources", + + # 'chrome.gyp:chrome_version_resources' TODO(GYP) + ] + } + + if (is_mac) { + datadeps = [ + "//chrome", + ] + + # TODO(mark): We really want this for all non-static library targets, but + # when we tried to pull it up to the common.gypi level, it broke other + # things like the ui and startup tests. *shrug* + ldflags += [ "-Wl,-ObjC" ] + } else { + # Non-Mac. + sources += + rebase_path(gypi_values.chrome_interactive_ui_test_non_mac_sources, + ".", + "//chrome") + } + + if (cld_version == 0 || cld_version == 2) { + # Interactive tests should use whatever CLD2 data access mode that the + # application embedder is using. + deps += [ "//third_party/cld_2:cld2_platform_impl" ] + } + + if (use_x11) { + configs += [ "//build/config/linux:xtst" ] + datadeps += [ "//tools/xdisplaycheck" ] + } + + if (enable_app_list) { + sources += + rebase_path(gypi_values.chrome_interactive_ui_test_app_list_sources, + ".", + "//chrome") + } + + if (use_ash) { + sources += rebase_path(gypi_values.chrome_interactive_ui_test_ash_sources, + ".", + "//chrome") + deps += [ "//ash:test_support" ] + } + + if (enable_notifications) { + sources += rebase_path( + gypi_values.chrome_interactive_ui_test_notifications_sources, + ".", + "//chrome") + + # Non-ChromeOS notifications tests (ChromeOS does not use cross-platform + # panels). + if (!is_chromeos) { + sources += [ + "../browser/notifications/notification_browsertest.cc", + "../browser/notifications/platform_notification_service_browsertest.cc", + ] + } + + if (is_android) { + sources -= [ + # Android does not use the message center-based Notification system. + "../browser/notifications/message_center_notifications_browsertest.cc", + + # TODO(peter): Enable the Notification browser tests. + "../browser/notifications/notification_browsertest.cc", + "../browser/notifications/platform_notification_service_browsertest.cc", + ] + } + } # enable_notifications + + if (use_aura || is_chromeos) { + sources -= + [ "../../ui/views/corewm/desktop_capture_controller_unittest.cc" ] + } + } source_set("sync_integration_test_support") { testonly = true @@ -391,7 +631,7 @@ if (!is_android) { } } -# Executable to measure time to load libraries. + # Executable to measure time to load libraries. test("load_library_perf_tests") { sources = [ "../browser/load_library_perf_test.cc", diff --git a/extensions/BUILD.gn b/extensions/BUILD.gn index 6bde073..f0c8d8a 100644 --- a/extensions/BUILD.gn +++ b/extensions/BUILD.gn @@ -94,6 +94,8 @@ source_set("test_support") { "renderer/test_extensions_renderer_client.h", "test/extension_test_message_listener.cc", "test/extension_test_message_listener.h", + "test/result_catcher.cc", + "test/result_catcher.h", "test/test_extensions_client.cc", "test/test_extensions_client.h", "test/test_permission_message_provider.cc", diff --git a/google_apis/google_apis.gyp b/google_apis/google_apis.gyp index 79870a2..228fba8 100644 --- a/google_apis/google_apis.gyp +++ b/google_apis/google_apis.gyp @@ -11,6 +11,7 @@ ], 'targets': [ { + # GN version: //google_apis 'target_name': 'google_apis', 'type': 'static_library', 'includes': [ @@ -171,6 +172,7 @@ ], }, { + # GN version: //google_apis:test_support 'target_name': 'google_apis_test_support', 'type': 'static_library', 'dependencies': [ diff --git a/third_party/mesa/BUILD.gn b/third_party/mesa/BUILD.gn index 0b1f828..468a7e6 100644 --- a/third_party/mesa/BUILD.gn +++ b/third_party/mesa/BUILD.gn @@ -688,5 +688,9 @@ if (!is_android) { # TODO(GYP) enable for Android. ] } } +} else { + # Placeholder to allow targets to unconditionally depend on this. + group("osmesa") { + } } # !is_android # TODO(GYP) Android osmesa_in_lib_dir target. |