1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chrome_build.gni")
import("//build/config/ozone.gni")
import("//build/config/ui.gni")
import("//testing/test.gni")
source_set("headless") {
sources = [
"headless_mode_switches.h",
"headless_mode_util.cc",
"headless_mode_util.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
"//base",
"//chrome/common:non_code_constants",
"//content/public/common",
"//ui/gfx",
]
if (is_linux) {
deps += [
"//ui/gl",
"//ui/ozone",
]
}
if (is_win) {
deps += [ "//chrome/chrome_elf:chrome_elf_main_include" ]
}
}
source_set("metrics") {
sources = [
"headless_mode_metrics.cc",
"headless_mode_metrics.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
":headless",
"//base",
"//components/headless/command_handler:switches",
"//content/public/browser",
]
}
if (!is_android) {
source_set("command_processor") {
sources = [
"headless_command_processor.cc",
"headless_command_processor.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
":headless",
"//base",
"//chrome/common:non_code_constants",
"//components/headless/command_handler",
"//components/keep_alive_registry",
"//content/public/browser",
]
}
source_set("browser_tests") {
testonly = true
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
sources = [
"headless_mode_browsertest.cc",
"headless_mode_browsertest.h",
]
if (is_linux || is_win || is_mac) {
sources += [
"headless_mode_browsertest_utils.h",
"headless_mode_command_browsertest.cc",
"headless_mode_devtooled_browsertest.cc",
"headless_mode_devtooled_browsertest.h",
"headless_mode_protocol_browsertest.cc",
"headless_mode_protocol_browsertest.h",
"test/headless_browser_test_utils.cc",
"test/headless_browser_test_utils.h",
]
}
if (is_linux) {
sources += [ "headless_mode_browsertest_linux.cc" ]
}
if (is_win) {
sources += [ "headless_mode_browsertest_win.cc" ]
}
if (is_mac) {
sources += [ "headless_mode_browsertest_mac.mm" ]
}
deps = [
":headless",
"//base",
"//chrome/browser",
"//chrome/test:test_support",
"//content/test:test_support",
"//pdf",
"//testing/gmock",
"//testing/gtest",
]
if (is_linux || is_win || is_mac) {
deps += [
"//chrome/browser/profiles",
"//chrome/browser/ui",
"//components/devtools/simple_devtools_protocol_client",
"//components/headless/clipboard",
"//components/headless/command_handler",
"//components/headless/command_handler:switches",
"//components/headless/select_file_dialog",
"//components/headless/test",
"//components/infobars/content",
"//content/public/browser",
"//ui/display",
"//ui/gfx",
"//ui/views",
]
}
if (use_aura && is_win) {
deps += [
"//ui/aura",
"//ui/aura:test_support",
]
}
if (use_ozone && is_linux) {
deps += [ "//ui/ozone" ]
}
data = [
"test/data/",
"//third_party/blink/web_tests/http/tests/inspector-protocol/resources/inspector-protocol-test.js",
"//third_party/blink/web_tests/http/tests/inspector-protocol/resources/http-interceptor.js",
]
}
}
|