summaryrefslogtreecommitdiff
path: root/chromium/ios/web/shell/test/BUILD.gn
blob: 7d7eedcde3ea273388a1804c10c9cfcbb1c24f09 (plain)
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
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//ios/build/config.gni")
import("//ios/third_party/earl_grey/ios_eg_test.gni")

group("all_tests") {
  testonly = true
  deps = [
    ":ios_web_shell_egtests",
  ]
}

ios_eg_test("ios_web_shell_egtests") {
  info_plist = "//ios/web/shell/Info.plist"
  sources = [
    "context_menu_egtest.mm",
    "meta_tags_egtest.mm",
    "navigation_egtest.mm",
    "page_state_egtest.mm",
    "pdf_egtest.mm",
    "plugin_placeholder_egtest.mm",
    "redirect_egtest.mm",
  ]

  deps = [
    ":earl_grey_test_support",
    "//base",
    "//base/test:test_support",
    "//ios/testing:ios_test_support",
    "//ios/testing/earl_grey:earl_grey_support",
    "//ios/web:earl_grey_test_support",
    "//ios/web:test_support",
    "//ios/web/shell",
    "//net",
    "//url",

    # All shared libraries must have the sanitizer deps to properly link in
    # asan mode (this target will be empty in other cases).
    "//build/config:exe_and_shlib_deps",
  ]

  bundle_deps = [ ":bundle" ]

  configs += [ "//build/config/compiler:enable_arc" ]

  assert_no_deps = ios_assert_no_deps
}

source_set("earl_grey_test_support") {
  testonly = true

  deps = [
    "//base",
    "//base/test:test_support",
    "//ios/testing:ios_test_support",
    "//ios/testing/earl_grey:earl_grey_support",
    "//ios/third_party/earl_grey",
    "//ios/web",
    "//ios/web:earl_grey_test_support",
    "//ios/web:test_support",
    "//ios/web/shell",
    "//url",
  ]

  public_deps = [
    "//build/config/ios:xctest",
  ]

  sources = [
    "app/navigation_test_util.h",
    "app/navigation_test_util.mm",
    "app/web_shell_test_util.h",
    "app/web_shell_test_util.mm",
    "app/web_view_interaction_test_util.h",
    "app/web_view_interaction_test_util.mm",
    "earl_grey/shell_actions.h",
    "earl_grey/shell_actions.mm",
    "earl_grey/shell_earl_grey.h",
    "earl_grey/shell_earl_grey.mm",
    "earl_grey/shell_matchers.h",
    "earl_grey/shell_matchers.mm",
    "earl_grey/web_shell_test_case.h",
    "earl_grey/web_shell_test_case.mm",
  ]

  configs += [ "//build/config/compiler:enable_arc" ]
}

bundle_data("bundle") {
  visibility = [ ":ios_web_shell_egtests" ]
  sources = [
    "http_server_files/basic_navigation_test.html",
    "http_server_files/tall_page.html",
    "http_server_files/testpage.pdf",
  ]
  outputs = [
    "{{bundle_resources_dir}}/{{source_root_relative_dir}}/" +
        "{{source_file_part}}",
  ]
}