# Copyright 2026 Google LLC. # Copyright (c) Microsoft Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Top-level GN build file for chromium-bidi import("//build/config/chrome_build.gni") import("//build/config/chromeos/args.gni") import("//testing/test.gni") if (is_mac) { if (is_chrome_branded) { _browser_binary = "Google Chrome.app/Contents/MacOS/Google Chrome" } else { _browser_binary = "Chromium.app/Contents/MacOS/Chromium" } } else if (is_win) { _browser_binary = "chrome.exe" } else { _browser_binary = "chrome" } if (is_win) { _chromedriver_binary = "chromedriver.exe" } else { _chromedriver_binary = "chromedriver" } group("default") { testonly = true deps = [ "src:all", ] } script_test("webdriver_bidi_unittests") { script = "tools/run_unittests.py" args = [ "--gen-dir", "@WrappedPath(gen)", "--node-py", "@WrappedPath(../../third_party/node/node.py)", "--", "--test", "--test-reporter=spec", "--test-reporter-destination=stdout", "--test-reporter=./@WrappedPath(../../third_party/chromium-bidi/tools/unit-resultsink-reporter.mjs)", "--test-reporter-destination=stdout", "@WrappedPath(gen/third_party/chromium-bidi/src/**/*.test.js)", ] data = [ "tools/unit-resultsink-reporter.mjs", "//third_party/node/", "node_modules/", "package.json", ] data_deps = [ "src:unit_tests", ] } script_test("webdriver_bidi_e2e_tests") { script = "tools/run_e2e.py" args = [ "--gen-dir", "@WrappedPath(gen)", "--node-py", "@WrappedPath(../../third_party/node/node.py)", "--browser-bin", "@WrappedPath(${_browser_binary})", "--chromedriver-bin", "@WrappedPath(${_chromedriver_binary})", "--", ] data = [ ".vpython3", "pytest.ini", "tests/", "tools/", "//third_party/node/", "node_modules/", "package.json", ] data_deps = [ "src:all" ] if (!is_ios && !is_android && !is_castos && !is_fuchsia && !is_chromeos_device) { data_deps += [ "//chrome", "//chrome/test/chromedriver:chromedriver_server", ] } }