Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: headless/BUILD.gn

Issue 2829973002: add customized printing setting for headless (Closed)
Patch Set: adjust command interface and add unit tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: headless/BUILD.gn
diff --git a/headless/BUILD.gn b/headless/BUILD.gn
index 454717d27b6b3f1051b3451c1b55c9128348189d..d1865aa27c8dcf1c408cecf34e278f24d9b64f7a 100644
--- a/headless/BUILD.gn
+++ b/headless/BUILD.gn
@@ -25,10 +25,32 @@ group("headless") {
]
}
+repack_locales("locale_pak") {
+ input_locales = [ "en-US" ]
+
+ if (!is_mac) {
+ output_locales = [ "en-US" ]
+ } else {
+ output_locales = [ "locale" ]
+ }
+
+ source_patterns = [
+ "$root_gen_dir/ui/strings/app_locale_settings_",
+ "$root_gen_dir/ui/strings/ui_strings_",
+ ]
+
+ deps = [
+ "//ui/strings",
+ ]
+
+ output_dir = "$root_out_dir/headless_locales"
+}
+
repack("pak") {
sources = [
"$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
"$root_gen_dir/blink/public/resources/blink_resources.pak",
+ "$root_gen_dir/components/components_resources.pak",
"$root_gen_dir/components/strings/components_strings_en-US.pak",
"$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
"$root_gen_dir/content/app/strings/content_strings_en-US.pak",
@@ -51,6 +73,7 @@ repack("pak") {
deps = [
":resources",
+ "//components/resources:components_resources",
"//components/strings",
"//content:resources",
"//content/app/resources",
@@ -202,6 +225,9 @@ action("gen_devtools_client_api") {
}
static_library("headless_lib") {
+ if (enable_basic_printing) {
+ defines = [ "PRINTING_IMPLEMENTATION" ]
Lei Zhang 2017/04/27 22:17:46 This doesn't look right. This is not printing/.
jzfeng 2017/05/02 07:50:56 Done. For some reason, I added this for unittest.
+ }
sources = generated_devtools_api + [
"app/headless_shell_switches.cc",
"app/headless_shell_switches.h",
@@ -324,6 +350,7 @@ static_library("headless_lib") {
deps = [
":gen_devtools_client_api",
+ ":locale_pak",
":tab_socket",
":version_header",
"//components/crash/content/browser",
@@ -381,6 +408,10 @@ group("headless_tests") {
":headless_example",
":headless_unittests",
]
+
+ if (enable_basic_printing) {
+ deps += [ ":headless_printing_unittests" ]
+ }
}
test("headless_unittests") {
@@ -403,6 +434,21 @@ test("headless_unittests") {
]
}
+if (enable_basic_printing) {
+ test("headless_printing_unittests") {
Lei Zhang 2017/04/27 22:17:46 I think you just want to add your test to headless
jzfeng 2017/05/02 07:50:56 Done.
+ sources = [
+ "lib/browser/headless_printing_unittest.cc",
+ ]
+
+ deps = [
+ ":headless_lib",
+ "//base/test:run_all_unittests",
+ "//content/public/common",
+ "//testing/gtest",
+ ]
+ }
+}
+
mojom("embedder_mojo_for_testing") {
sources = [
"lib/embedder_test.mojom",

Powered by Google App Engine
This is Rietveld 408576698