Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / test / BUILD.gn
blob901cc48cd60cbaf827e828702ac8f75a631b3d75
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
8 content_tests_gypi_values = exec_script(
9     "//build/gypi_to_gn.py",
10     [ rebase_path("../content_tests.gypi"),
11       "--replace=<(SHARED_INTERMEDIATE_DIR)=$root_gen_dir" ],
12     "scope",
13     [ "../content_tests.gypi" ])
15 # GYP version //content/content_tests.gypi:test_support_content
16 static_library("test_support") {
17   deps = [
18     "//content/public/app",
19     "//content/public/browser",
20     "//content/public/common",
21     "//net:test_support",
22     "//skia",
23     "//testing/gmock",
24     "//testing/gtest",
25     "//ui/accessibility:ax_gen",
26     "//ui/base",
27     "//ui/base:test_support",
28     "//ui/events:dom4_keycode_converter",
29     "//ui/events:events_base",
30     "//ui/events:test_support",
31     "//ui/events:gesture_detection",
32     "//ui/gfx:test_support",
33     "//ui/resources",
34     "//url",
35     "//webkit/common",
36   ]
38   if (!is_ios) {
39     sources = rebase_path(content_tests_gypi_values.test_support_content_sources,
40                           ".", "//content")
42     deps += [
43       "//content/browser/speech/proto",
44       "//content/child",
45       "//content/gpu",
46       "//content/ppapi_plugin",
47       "//content/public/renderer",
48       "//content/public/utility",
49       "//cc",
50       "//cc:test_support",
51       "//media",
52       "//ppapi:ppapi_host",
53       "//ppapi:ppapi_proxy",
54       "//ppapi:ppapi_shared",
55       "//ppapi:ppapi_unittest_shared",
56       "//third_party/WebKit/public:blink",
57       "//ui/surface",
58       "//v8",
59       "//webkit/child",
60       "//webkit/common/gpu",
61       "//webkit/browser:storage",
62       "//webkit/common:storage",
63     ]
65     forward_dependent_configs_from = [
66       "//third_party/WebKit/public:blink",
67     ]
69     if (enable_webrtc) {
70       # TODO(GYP) remove this when libjingle is converted.
71       configs += [ "//content:libjingle_stub_config" ]
73       sources += [
74         "../renderer/media/mock_media_stream_dispatcher.cc",
75         "../renderer/media/mock_media_stream_dispatcher.h",
76         "../renderer/media/mock_peer_connection_impl.cc",
77         "../renderer/media/mock_peer_connection_impl.h",
78         "../renderer/media/mock_web_rtc_peer_connection_handler_client.cc",
79         "../renderer/media/mock_web_rtc_peer_connection_handler_client.h",
80         "../renderer/media/webrtc/mock_peer_connection_dependency_factory.cc",
81         "../renderer/media/webrtc/mock_peer_connection_dependency_factory.h",
82       ]
84       deps += [
85         #"//third_party/libjingle:webrtc",  TODO(GYP)
86         #"//third_party/libjingle:peerconnection",  TODO(GYP)
87         #"//third_party/webrtc/modules:video_capture",  TODO(GYP)
88       ]
89     }
91     if (use_glib) {
92       configs += [ "//build/config/linux:glib" ]
93     }
95     if (use_aura) {
96       deps += [
97         "//ui/aura:test_support",
98         "//ui/resources:ui_test_pak",
99         "//ui/wm",
100       ]
101     }
103     if (use_aura || is_mac) {
104       deps += [ "//ui/compositor" ]
105     }
107     if (is_win) {
108       deps += [ "//third_party/iaccessible2" ]
109     }
111     if (!is_android && !is_ios) {
112       #deps += [ "//third_party/libvpx" ]  TODO(GYP)
113     }
115     if (is_android) {
116       deps += [ "//ui/shell_dialogs" ]
117     }
119     if (is_win) {
120       deps += [ "//sandbox" ]
121     }
122   } else { # is_ios
123     sources = [
124       "public/test/content_test_suite_base.cc",
125       "public/test/mock_notification_observer.cc",
126       "public/test/mock_resource_context.cc",
127       "public/test/test_browser_thread.cc",
128       "public/test/test_content_client_initializer.cc",
129       "public/test/test_notification_tracker.cc",
130       "public/test/test_utils.cc",
131       "public/test/unittest_test_suite.cc",
132       "test/content_test_suite.cc",
133       "test/test_content_browser_client.cc",
134       "test/test_content_client.cc",
135     ]
136   }
139 if (!is_ios) {
141   # GYP version //content/content_tests.gypi:layouttest_support_content
142   static_library("layouttest_support") {
143     sources = rebase_path(content_tests_gypi_values.layouttest_support_content_sources,
144                           ".", "//content")
146     deps = [
147       ":test_support",
148       "//skia",
149       "//v8",
150       "//ui/accessibility:ax_gen",
151     ]
153     if (is_android) {
154       #deps += [ "test_support_content_jni_headers" ]  TODO(GYP)
155     }
156   }
158 }  # !is_ios
160 # TODO(GYP): Unit test targets