# Copyright 2021 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)

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

  files = [
    "test_whats_new_page_handler.ts",
    "test_with_command_4.ts",
    "test_with_metrics_carousel_scroll_button_click.ts",
    "test_with_metrics_cta_click.ts",
    "test_with_metrics_expand_media_toggled.ts",
    "test_with_metrics_explore_more_toggled.ts",
    "test_with_metrics_feature_tile_navigation.ts",
    "test_with_metrics_module_click.ts",
    "test_with_metrics_module_impression.ts",
    "test_with_metrics_module_video_events.ts",
    "test_with_metrics_nav_click.ts",
    "test_with_metrics_next_button_click.ts",
    "test_with_metrics_page_loaded.ts",
    "test_with_metrics_qr_code_toggled.ts",
    "test_with_metrics_scroll_depth.ts",
    "test_with_metrics_time_on_page.ts",
    "test_with_metrics_time_on_page_heartbeat.ts",
    "whats_new_app_test.ts",
  ]

  static_files = [
    "test.html",
    "test_with_command_4.html",
    "test_with_metrics_carousel_scroll_button_click.html",
    "test_with_metrics_cta_click.html",
    "test_with_metrics_expand_media_toggled.html",
    "test_with_metrics_explore_more_toggled.html",
    "test_with_metrics_feature_tile_navigation.html",
    "test_with_metrics_module_click.html",
    "test_with_metrics_module_impression.html",
    "test_with_metrics_module_video_events.html",
    "test_with_metrics_nav_click.html",
    "test_with_metrics_next_button_click.html",
    "test_with_metrics_page_loaded.html",
    "test_with_metrics_qr_code_toggled.html",
    "test_with_metrics_scroll_depth.html",
    "test_with_metrics_time_on_page.html",
    "test_with_metrics_time_on_page_heartbeat.html",
  ]

  ts_path_mappings =
      [ "chrome://whats-new/*|" +
        rebase_path("$root_gen_dir/chrome/browser/resources/whats_new/tsc/*",
                    target_gen_dir) ]
  ts_deps = [
    "//chrome/browser/resources/whats_new:build_ts",
    "//ui/webui/resources/js:build_ts",
    "//ui/webui/resources/mojo:build_ts",
  ]
}
