summaryrefslogtreecommitdiff
path: root/chromium/ui/latency/BUILD.gn
blob: 2aeebd991ae37ecf6b041db50623706a9de7472c (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
# Copyright 2017 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("//build/config/jumbo.gni")
import("//testing/test.gni")

jumbo_source_set("latency") {
  sources = [
    "fixed_point.cc",
    "fixed_point.h",
    "histograms.cc",
    "histograms.h",
    "latency_histogram_macros.h",
    "latency_info.cc",
    "latency_info.h",
    "latency_tracker.cc",
    "latency_tracker.h",
    "stream_analyzer.cc",
    "stream_analyzer.h",
    "windowed_analyzer.cc",
    "windowed_analyzer.h",
  ]

  deps = [
    "//base",
    "//ui/gfx",
  ]

  public_deps = [
    "//services/metrics/public/cpp:metrics_cpp",
  ]
}

jumbo_source_set("test_support") {
  testonly = true
  sources = [
    "latency_info_test_support.cc",
  ]

  public_deps = [
    ":latency",
  ]
}

test("latency_unittests") {
  sources = [
    "fixed_point_unittest.cc",
    "frame_metrics_test_common.cc",
    "frame_metrics_test_common.h",
    "histograms_unittest.cc",
    "latency_info_unittest.cc",
    "stream_analyzer_unittest.cc",
    "windowed_analyzer_unittest.cc",
  ]

  deps = [
    ":latency",
    "//base",
    "//base/test:test_support",
    "//mojo/edk/test:run_all_unittests",
    "//testing/gmock",
    "//testing/gtest",
  ]

  if (!is_ios) {
    sources += [
      "ipc/latency_info_param_traits_unittest.cc",
      "mojo/struct_traits_unittest.cc",
    ]
    deps += [
      "//ipc:test_support",
      "//mojo/public/cpp/bindings",
      "//ui/gfx/ipc/geometry",
      "//ui/latency/ipc",
      "//ui/latency/mojo:test_interfaces",
    ]
  }
}

test("latency_perftests") {
  sources = [
    "frame_metrics_test_common.cc",
    "frame_metrics_test_common.h",
    "histograms_perftest.cc",
  ]

  deps = [
    ":latency",
    "//base",
    "//base/test:test_support",
    "//mojo/edk/test:run_all_unittests",
    "//testing/gmock",
    "//testing/gtest",
    "//testing/perf",
  ]
}