| # 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("//testing/test.gni") |
| |
| source_set("headless") { |
| sources = [ |
| "headless_mode_util.cc", |
| "headless_mode_util.h", |
| ] |
| |
| deps = [ |
| "//base", |
| "//chrome/common:non_code_constants", |
| "//ui/gfx", |
| ] |
| |
| if (is_linux) { |
| deps += [ |
| "//ui/gl", |
| "//ui/ozone", |
| ] |
| } |
| } |
| |
| source_set("metrics") { |
| sources = [ |
| "headless_mode_metrics.cc", |
| "headless_mode_metrics.h", |
| ] |
| |
| deps = [ |
| ":headless", |
| "//base", |
| "//components/headless/command_handler:switches", |
| "//content/public/browser", |
| ] |
| } |
| |
| source_set("command_processor") { |
| sources = [ |
| "headless_command_processor.cc", |
| "headless_command_processor.h", |
| ] |
| |
| deps = [ |
| ":headless", |
| "//base", |
| "//components/headless/command_handler", |
| "//content/public/browser", |
| ] |
| } |
| |
| if (!is_android) { |
| 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_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", |
| "//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", |
| "//content/public/browser", |
| "//ui/display", |
| "//ui/gfx", |
| "//ui/views", |
| ] |
| } |
| |
| 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", |
| ] |
| } |
| } |