summaryrefslogtreecommitdiff
path: root/chromium/components/viz/test/BUILD.gn
blob: 51e09c167481385e9002a61f88dc333d7cd51ef8 (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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# 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("//components/viz/viz.gni")
import("//gpu/vulkan/features.gni")

viz_static_library("test_support") {
  testonly = true
  sources = [
    "begin_frame_args_test.cc",
    "begin_frame_args_test.h",
    "begin_frame_source_test.cc",
    "begin_frame_source_test.h",
    "compositor_frame_helpers.cc",
    "compositor_frame_helpers.h",
    "fake_compositor_frame_sink_client.cc",
    "fake_compositor_frame_sink_client.h",
    "fake_delay_based_time_source.cc",
    "fake_delay_based_time_source.h",
    "fake_display_client.cc",
    "fake_display_client.h",
    "fake_external_begin_frame_source.cc",
    "fake_external_begin_frame_source.h",
    "fake_host_frame_sink_client.cc",
    "fake_host_frame_sink_client.h",
    "fake_output_surface.cc",
    "fake_output_surface.h",
    "fake_skia_output_surface.cc",
    "fake_skia_output_surface.h",
    "fake_surface_observer.cc",
    "fake_surface_observer.h",
    "gpu_host_impl_test_api.cc",
    "gpu_host_impl_test_api.h",
    "host_frame_sink_manager_test_api.cc",
    "host_frame_sink_manager_test_api.h",
    "mock_compositor_frame_sink_client.cc",
    "mock_compositor_frame_sink_client.h",
    "mock_display_client.cc",
    "mock_display_client.h",
    "mock_helper.h",
    "paths.cc",
    "paths.h",
    "stub_surface_client.cc",
    "stub_surface_client.h",
    "surface_id_allocator_set.cc",
    "surface_id_allocator_set.h",
    "test_context_provider.cc",
    "test_context_provider.h",
    "test_context_support.cc",
    "test_context_support.h",
    "test_frame_sink_manager.cc",
    "test_frame_sink_manager.h",
    "test_gles2_interface.cc",
    "test_gles2_interface.h",
    "test_gpu_memory_buffer_manager.cc",
    "test_gpu_memory_buffer_manager.h",
    "test_gpu_service_holder.cc",
    "test_gpu_service_holder.h",
    "test_image_factory.cc",
    "test_image_factory.h",
    "test_in_process_context_provider.cc",
    "test_in_process_context_provider.h",
    "test_latest_local_surface_id_lookup_delegate.cc",
    "test_latest_local_surface_id_lookup_delegate.h",
    "test_output_surface_provider.cc",
    "test_output_surface_provider.h",
    "test_shared_bitmap_manager.cc",
    "test_shared_bitmap_manager.h",
  ]
  deps = [
    "//base",
    "//base/test:test_support",
    "//components/viz/host",
    "//components/viz/service",
    "//gpu:raster",
    "//gpu:test_support",
    "//gpu/command_buffer/client:gles2_implementation",
    "//gpu/skia_bindings",
    "//services/viz/privileged/mojom",
    "//testing/gmock",
    "//testing/gtest",
    "//ui/gfx/geometry",
    "//ui/gl",
    "//ui/latency:test_support",
  ]

  if (enable_vulkan) {
    deps += [ "//gpu/vulkan/init" ]
  }
}

viz_source_set("test_suite") {
  testonly = true
  sources = [
    "viz_test_suite.cc",
    "viz_test_suite.h",
  ]
  deps = [
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//ui/events/platform",
    "//ui/gl:test_support",
  ]
  if (use_x11) {
    deps += [ "//ui/events/platform/x11" ]
  }
}

viz_source_set("unit_tests") {
  testonly = true
  sources = [
    "begin_frame_source_test_unittest.cc",
    "mock_helper_unittest.cc",
    "test_gles2_interface_unittest.cc",
  ]
  deps = [
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
}