blob: c035c2599f406c857a196983b28abda4eefe2e5e [file] [log] [blame]
altimin168fe2a2015-12-02 15:35:211# Copyright 2015 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.
4
skyostilfe116162016-02-26 20:53:335import("//testing/test.gni")
skyostil85c6b562016-03-02 16:13:056import("//tools/grit/grit_rule.gni")
skyostilfe116162016-02-26 20:53:337import("//tools/grit/repack.gni")
8
altimin168fe2a2015-12-02 15:35:219group("headless") {
10 deps = [
11 "//headless:headless_lib",
12 ]
13}
14
skyostilfe116162016-02-26 20:53:3315repack("pak") {
altimin168fe2a2015-12-02 15:35:2116 sources = [
skyostilfe116162016-02-26 20:53:3317 "$root_gen_dir/blink/devtools_resources.pak",
18 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
19 "$root_gen_dir/blink/public/resources/blink_resources.pak",
20 "$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
21 "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
22 "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
23 "$root_gen_dir/content/content_resources.pak",
skyostil85c6b562016-03-02 16:13:0524 "$root_gen_dir/headless/headless_lib_resources.pak",
skyostilfe116162016-02-26 20:53:3325 "$root_gen_dir/net/net_resources.pak",
26 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
27 "$root_gen_dir/ui/resources/webui_resources.pak",
28 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
29 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
altimin168fe2a2015-12-02 15:35:2130 ]
31
32 deps = [
skyostil85c6b562016-03-02 16:13:0533 ":headless_lib_resources_grit",
skyostilfe116162016-02-26 20:53:3334 "//content:resources",
35 "//content/app/resources",
36 "//content/app/strings",
37 "//content/browser/devtools:resources",
38 "//content/browser/tracing:resources",
39 "//net:net_resources",
40 "//third_party/WebKit/public:image_resources",
41 "//third_party/WebKit/public:resources",
42 "//ui/resources",
43 "//ui/strings",
44 ]
45
46 output = "$root_out_dir/headless_lib.pak"
47}
48
skyostil85c6b562016-03-02 16:13:0549grit("headless_lib_resources_grit") {
50 source = "lib/resources/headless_lib_resources.grd"
51 outputs = [
52 "grit/headless_lib_resources.h",
53 "$root_gen_dir/headless/headless_lib_resources.pak",
54 ]
55}
56
skyostilfe116162016-02-26 20:53:3357static_library("headless_lib") {
58 sources = [
59 "lib/browser/headless_browser_context.cc",
60 "lib/browser/headless_browser_context.h",
61 "lib/browser/headless_browser_impl.cc",
62 "lib/browser/headless_browser_impl.h",
63 "lib/browser/headless_browser_main_parts.cc",
64 "lib/browser/headless_browser_main_parts.h",
65 "lib/browser/headless_content_browser_client.cc",
66 "lib/browser/headless_content_browser_client.h",
67 "lib/browser/headless_devtools.cc",
68 "lib/browser/headless_devtools.h",
69 "lib/browser/headless_screen.cc",
70 "lib/browser/headless_screen.h",
71 "lib/browser/headless_url_request_context_getter.cc",
72 "lib/browser/headless_url_request_context_getter.h",
73 "lib/browser/headless_web_contents_impl.cc",
74 "lib/browser/headless_web_contents_impl.h",
75 "lib/headless_content_client.cc",
76 "lib/headless_content_client.h",
77 "lib/headless_content_main_delegate.cc",
78 "lib/headless_content_main_delegate.h",
79 "lib/renderer/headless_content_renderer_client.cc",
80 "lib/renderer/headless_content_renderer_client.h",
81 "lib/utility/headless_content_utility_client.cc",
82 "lib/utility/headless_content_utility_client.h",
83 "public/headless_browser.cc",
84 "public/headless_browser.h",
85 "public/headless_export.h",
86 "public/headless_web_contents.h",
skyostild79e1512016-04-07 17:50:5887 "public/util/maybe.h",
skyostilfe116162016-02-26 20:53:3388 ]
89
90 deps = [
91 ":pak",
altimin168fe2a2015-12-02 15:35:2192 "//base",
skyostilfe116162016-02-26 20:53:3393 "//components/devtools_http_handler",
skyostil185d8aa2016-04-05 11:36:3294 "//content/public/app:both",
skyostilfe116162016-02-26 20:53:3395 "//content/public/browser",
skyostil185d8aa2016-04-05 11:36:3296 "//content/public/child",
skyostilfe116162016-02-26 20:53:3397 "//content/public/common",
98 "//content/public/renderer",
99 "//content/public/utility",
100 "//net",
101 "//ui/aura",
102 "//ui/base",
103 "//ui/compositor",
104 "//ui/ozone",
105 "//url",
106 ]
107}
108
109group("headless_tests") {
110 testonly = true
111
112 deps = [
113 ":headless_browsertests",
skyostild79e1512016-04-07 17:50:58114 ":headless_unittests",
115 ]
116}
117
118test("headless_unittests") {
119 sources = [
120 "public/util/maybe_unittest.cc",
121 ]
122
123 deps = [
124 "//base/test:run_all_unittests",
125 "//base/test:test_support",
126 "//testing/gtest",
skyostilfe116162016-02-26 20:53:33127 ]
128}
129
130test("headless_browsertests") {
131 sources = [
132 "lib/headless_browser_browsertest.cc",
133 "lib/headless_web_contents_browsertest.cc",
134 "test/headless_browser_test.cc",
135 "test/headless_browser_test.h",
136 "test/headless_test_launcher.cc",
137 ]
138
139 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
140
141 deps = [
142 "//base",
143 "//content/test:browsertest_base",
144 "//content/test:test_support",
145 "//headless:headless_lib",
146 "//testing/gmock",
147 "//testing/gtest",
148 ]
149}
150
151executable("headless_shell") {
152 testonly = true
153
154 sources = [
155 "app/headless_shell.cc",
skyostilf52fa5b2016-03-15 11:38:45156 "app/headless_shell_switches.cc",
157 "app/headless_shell_switches.h",
skyostilfe116162016-02-26 20:53:33158 ]
159
160 deps = [
161 "//headless:headless_lib",
altimin168fe2a2015-12-02 15:35:21162 ]
163}