# Copyright 2025 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_webui_tests.gni")

assert(!is_android && !is_ios)

build_webui_tests("build") {
  cc_test_files = [ "omnibox_popup_browsertest.cc" ]

  files = [
    "aim_app_test.ts",
    "app_test.ts",
    "full_app_test.ts",
    "omnibox_composebox_test.ts",
    "omnibox_popup_contextual_entrypoint_button_test.ts",
    "omnibox_popup_contextual_entrypoint_test.ts",
    "omnibox_popup_searchbox_test.ts",
    "test_searchbox_browser_proxy.ts",
    "textfield_model_test.ts",
  ]

  # Tests should only import from the URL below, so they behave the same whether
  # `optimize_webui` is `true` or `false`.
  ts_path_mappings = [ "chrome://omnibox-popup.top-chrome/omnibox_popup.js|" + rebase_path(
                           "$root_gen_dir/chrome/browser/resources/omnibox_popup/tsc/omnibox_popup.d.ts",
                           target_gen_dir) ]
  ts_deps = [
    "//chrome/browser/resources/omnibox_popup:build_ts",
    "//ui/webui/resources/cr_components/composebox:build_ts",
    "//ui/webui/resources/cr_components/search:build_ts",
    "//ui/webui/resources/cr_components/searchbox:build_ts",
    "//ui/webui/resources/js:build_ts",
    "//ui/webui/resources/mojo:build_ts",
  ]
}
