aboutsummaryrefslogtreecommitdiff
path: root/mojo/edk/js/tests/BUILD.gn
blob: f56c4b95f9a110f48d01140d1312d0d3137cdef8 (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
# Copyright 2014 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("//testing/test.gni")

# TODO(hansmuller): The organization of tests in this directory is weird:
#   * Really, js_unittests tests public stuff, so that should live in public
#     and be reworked as some sort of apptest.
#   * Both js_unittests and js_integration_tests should auto-generate their
#     tests somehow. The .cc files are just test runner stubs, including
#     explicit lists of .js files.

group("tests") {
  testonly = true
  deps = [
    ":mojo_js_integration_tests",
    ":mojo_js_unittests",
  ]
}

test("mojo_js_integration_tests") {
  deps = [
    ":js_to_cpp_bindings",
    "//gin:gin_test",
    "//mojo/common",
    "//mojo/edk/js",
    "//mojo/edk/test:run_all_unittests",
    "//mojo/public/cpp/bindings",
    "//mojo/public/cpp/system",
    "//mojo/public/js:bindings",
  ]

  sources = [
    "js_to_cpp_tests.cc",
  ]

  data = [
    "js_to_cpp_tests.js",
  ]

  configs += [ "//v8:external_startup_data" ]
}

mojom("js_to_cpp_bindings") {
  sources = [
    "js_to_cpp.mojom",
  ]
}

test("mojo_js_unittests") {
  deps = [
    "//base",
    "//gin:gin_test",
    "//mojo/edk/js",
    "//mojo/edk/test:run_all_unittests",
    "//mojo/edk/test:test_support",
    "//mojo/public/cpp/system",
    "//mojo/public/interfaces/bindings/tests:test_interfaces",
    "//mojo/public/js:tests",
  ]

  sources = [
    "//mojo/edk/js/handle_unittest.cc",
    "run_js_unittests.cc",
  ]
}