| # 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/features.gni") |
| import("//build/config/ui.gni") |
| |
| content_tests_gypi_values = exec_script( |
| "//build/gypi_to_gn.py", |
| [ rebase_path("../content_tests.gypi"), |
| "--replace=<(SHARED_INTERMEDIATE_DIR)=$root_gen_dir" ], |
| "scope", |
| [ "../content_tests.gypi" ]) |
| |
| # GYP version //content/content_tests.gypi:test_support_content |
| static_library("test_support") { |
| testonly = true |
| public_deps = [] |
| deps = [ |
| "//cc/blink", |
| "//content/public/app:both", |
| "//content/public/browser:browser_sources", |
| "//content/public/common:common_sources", |
| "//net:test_support", |
| "//skia", |
| "//storage/common", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//ui/accessibility:ax_gen", |
| "//ui/base", |
| "//ui/base:test_support", |
| "//ui/events:dom4_keycode_converter", |
| "//ui/events:events_base", |
| "//ui/events:test_support", |
| "//ui/events:gesture_detection", |
| "//ui/gfx:test_support", |
| "//ui/gl", |
| "//ui/resources", |
| "//url", |
| ] |
| |
| if (!is_ios) { |
| sources = rebase_path(content_tests_gypi_values.test_support_content_sources, |
| ".", "//content") |
| |
| public_deps += [ |
| "//third_party/WebKit/public:blink", |
| ] |
| deps += [ |
| "//content/browser/speech/proto", |
| "//content/public/child:child_sources", |
| "//content/gpu", |
| "//content/public/renderer:renderer_sources", |
| "//content/public/utility:utility_sources", |
| "//content/shell:pak", |
| "//cc", |
| "//cc:test_support", |
| "//media", |
| "//ppapi:ppapi_host", |
| "//ppapi:ppapi_proxy", |
| "//ppapi:ppapi_shared", |
| "//ppapi:ppapi_unittest_shared", |
| "//storage/browser", |
| "//storage/common", |
| "//ui/surface", |
| "//v8", |
| "//webkit/common/gpu", |
| ] |
| |
| if (enable_plugins) { |
| deps += [ "//content/ppapi_plugin" ] |
| } |
| |
| if (enable_webrtc) { |
| # TODO(GYP) remove this when libjingle is converted. |
| configs += [ "//third_party/libjingle:jingle_direct_dependent_configs" ] |
| |
| sources += [ |
| "../renderer/media/mock_media_stream_dispatcher.cc", |
| "../renderer/media/mock_media_stream_dispatcher.h", |
| "../renderer/media/mock_peer_connection_impl.cc", |
| "../renderer/media/mock_peer_connection_impl.h", |
| "../renderer/media/mock_web_rtc_peer_connection_handler_client.cc", |
| "../renderer/media/mock_web_rtc_peer_connection_handler_client.h", |
| "../renderer/media/webrtc/mock_peer_connection_dependency_factory.cc", |
| "../renderer/media/webrtc/mock_peer_connection_dependency_factory.h", |
| ] |
| |
| deps += [ |
| #"//third_party/libjingle:webrtc", TODO(GYP) |
| #"//third_party/libjingle:peerconnection", TODO(GYP) |
| "//third_party/webrtc/modules/video_capture", |
| ] |
| } |
| if (!enable_plugins) { |
| sources -= [ "ppapi_unittest.cc" ] |
| } |
| |
| if (use_glib) { |
| configs += [ "//build/config/linux:glib" ] |
| } |
| |
| if (use_aura) { |
| deps += [ |
| "//ui/aura:test_support", |
| "//ui/resources:ui_test_pak", |
| "//ui/wm", |
| ] |
| } |
| |
| if (use_aura || is_mac) { |
| deps += [ "//ui/compositor" ] |
| } |
| |
| if (is_win) { |
| deps += [ "//third_party/iaccessible2" ] |
| } |
| |
| if (!is_android && !is_ios) { |
| deps += [ "//third_party/libvpx" ] |
| } |
| |
| if (is_android) { |
| deps += [ "//ui/shell_dialogs" ] |
| } |
| |
| if (is_win) { |
| deps += [ "//sandbox" ] |
| } |
| } else { # is_ios |
| sources = [ |
| "public/test/content_test_suite_base.cc", |
| "public/test/mock_notification_observer.cc", |
| "public/test/mock_resource_context.cc", |
| "public/test/test_browser_thread.cc", |
| "public/test/test_content_client_initializer.cc", |
| "public/test/test_notification_tracker.cc", |
| "public/test/test_utils.cc", |
| "public/test/unittest_test_suite.cc", |
| "test/content_test_suite.cc", |
| "test/test_content_browser_client.cc", |
| "test/test_content_client.cc", |
| ] |
| } |
| } |
| |
| if (!is_ios) { |
| |
| # GYP version //content/content_tests.gypi:layouttest_support_content |
| static_library("layouttest_support") { |
| testonly = true |
| sources = rebase_path(content_tests_gypi_values.layouttest_support_content_sources, |
| ".", "//content") |
| |
| deps = [ |
| ":test_support", |
| "//cc", |
| "//cc/blink", |
| "//content/public/common", |
| "//skia", |
| "//v8", |
| "//ui/accessibility:ax_gen", |
| ] |
| |
| if (is_android) { |
| deps += [ ":jni" ] |
| } |
| } |
| |
| if (is_android) { |
| import("//build/config/android/rules.gni") |
| |
| generate_jni("jni") { |
| sources = [ "../public/test/android/javatests/src/org/chromium/content/browser/test/NestedSystemMessageHandler.java" ] |
| jni_package = "content/public/test" |
| } |
| } |
| } # !is_ios |
| |
| # TODO(GYP): Unit test targets |
| |