summaryrefslogtreecommitdiff
path: root/chromium/ios/web/test/BUILD.gn
blob: e4270f5f0338df0ac7e2c9a65066f67de85a6717 (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
# 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("//mojo/public/tools/bindings/mojom.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/grit/repack.gni")

mojom("mojo_bindings") {
  sources = [
    "mojo_test.mojom",
  ]
}

repack("packed_resources") {
  testonly = true
  sources = [
    "$root_gen_dir/ios/web/ios_web_resources.pak",
    "$root_gen_dir/ios/web/test/test_resources.pak",
    "$root_gen_dir/ui/resources/webui_resources.pak",
  ]
  deps = [
    ":resources",
    "//ios/web:resources",
    "//ui/resources",
  ]
  output = "$target_gen_dir/resources.pak"
  copy_data_to_bundle = true
}

grit("resources") {
  source = "test_resources.grd"

  # The .grd contains references to generated files.
  source_is_generated = true

  inputs = [
    "${root_gen_dir}/ios/web/test/mojo_test.mojom.js",
  ]
  deps = [
    ":mojo_bindings_js",
  ]
  outputs = [
    "grit/test_resources.h",
    "test_resources.pak",
  ]
  grit_flags = [
    "-E",
    "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
  ]
}

source_set("test_support") {
  configs += [ "//build/config/compiler:enable_arc" ]
  testonly = true

  deps = [
    ":test_constants",
    "//base",
    "//base/test:test_support",
    "//ios/web",
    "//ios/web/navigation:core",
    "//ios/web/public/test:util",
    "//ios/web/public/test/fakes",
    "//ios/web/public/test/http_server",
    "//ios/web/test/fakes",
    "//net",
    "//testing/gtest",
    "//third_party/ocmock",
    "//ui/base",
  ]

  sources = [
    "test_web_thread.cc",
    "test_web_thread_bundle.cc",
    "url_test_util.mm",
    "web_int_test.h",
    "web_int_test.mm",
    "web_test_suite.mm",
    "web_test_with_web_controller.h",
    "web_test_with_web_controller.mm",
    "wk_web_view_crash_utils.h",
    "wk_web_view_crash_utils.mm",
  ]
}

source_set("test_constants") {
  testonly = true
  sources = [
    "test_url_constants.cc",
    "test_url_constants.h",
  ]
}