• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//mojo/public/tools/bindings/mojom.gni")
6import("//testing/test.gni")
7
8group("common") {
9  public_deps = [
10    ":common_base",
11    ":common_custom_types",
12  ]
13}
14
15# GYP version: mojo/mojo_base.gyp:mojo_common_custom_types
16mojom("common_custom_types") {
17  sources = [
18    "common_custom_types.mojom",
19    "string16.mojom",
20  ]
21}
22
23# GYP version: mojo/mojo_base.gyp:mojo_common_lib
24component("common_base") {
25  output_name = "mojo_common_lib"
26
27  sources = [
28    "common_type_converters.cc",
29    "common_type_converters.h",
30    "data_pipe_drainer.cc",
31    "data_pipe_drainer.h",
32    "data_pipe_file_utils.cc",
33    "data_pipe_utils.cc",
34    "data_pipe_utils.h",
35    "user_agent.cc",
36    "user_agent.h",
37  ]
38
39  defines = [ "MOJO_COMMON_IMPLEMENTATION" ]
40
41  public_deps = [
42    "//base",
43    "//mojo/public/cpp/bindings",
44    "//mojo/public/cpp/system",
45  ]
46}
47
48# GYP version: mojo/mojo_base.gyp:mojo_test_common_custom_types
49mojom("test_common_custom_types") {
50  sources = [
51    "test_common_custom_types.mojom",
52  ]
53  public_deps = [
54    ":common_custom_types",
55  ]
56}
57
58# GYP version: mojo/mojo_base.gyp:mojo_common_unittests
59test("mojo_common_unittests") {
60  deps = [
61    ":common",
62    ":common_custom_types",
63    ":test_common_custom_types",
64    "//base",
65    "//base:message_loop_tests",
66    "//base/test:test_support",
67    "//mojo/edk/test:run_all_unittests",
68    "//mojo/edk/test:test_support",
69    "//mojo/public/cpp/bindings",
70    "//mojo/public/cpp/test_support:test_utils",
71    "//testing/gtest",
72    "//url",
73  ]
74
75  sources = [
76    "common_custom_types_unittest.cc",
77    "common_type_converters_unittest.cc",
78  ]
79}
80
81test("mojo_common_perftests") {
82  deps = [
83    ":common",
84    "//base",
85    "//mojo/edk/test:run_all_perftests",
86    "//mojo/public/cpp/test_support:test_utils",
87    "//testing/gtest",
88  ]
89}
90