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
|
# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/features.gni")
import("//testing/test.gni")
assert(use_blink, "Paint Previews are not supported without blink.")
source_set("common") {
sources = [
"capture_result.cc",
"capture_result.h",
"file_stream.cc",
"file_stream.h",
"file_utils.cc",
"file_utils.h",
"glyph_usage.cc",
"glyph_usage.h",
"paint_preview_tracker.cc",
"paint_preview_tracker.h",
"proto_validator.cc",
"proto_validator.h",
"recording_map.cc",
"recording_map.h",
"serial_utils.cc",
"serial_utils.h",
"serialized_recording.cc",
"serialized_recording.h",
"subset_font.cc",
"subset_font.h",
"version.cc",
"version.h",
]
deps = [
"//base",
"//components/crash/core/common:crash_key",
"//skia",
"//third_party:freetype_harfbuzz",
"//ui/gfx/geometry",
"//url",
]
public_deps = [
"//components/paint_preview/common/mojom",
"//components/paint_preview/common/proto",
]
}
source_set("test_utils") {
testonly = true
sources = [
"test_utils.cc",
"test_utils.h",
]
deps = [
"//base/test:test_support",
"//components/paint_preview/common",
"//testing/gmock",
"//testing/gtest",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"file_stream_unittest.cc",
"glyph_usage_unittest.cc",
"paint_preview_tracker_unittest.cc",
"proto_validator_unittest.cc",
"serial_utils_unittest.cc",
"serialized_recording_unittest.cc",
"subset_font_unittest.cc",
]
deps = [
":common",
":test_utils",
"//base",
"//base/test:test_support",
"//components/crash/core/common:crash_key",
"//skia",
"//testing/gmock",
"//testing/gtest",
"//third_party:freetype_harfbuzz",
"//ui/gfx/geometry",
]
if (is_ios) {
deps += [ "//components/test:paint_preview_test_bundle_data" ]
}
}
test("paint_preview_common_unit_tests") {
deps = [
":unit_tests",
"//base",
"//base/test:test_support",
"//components/test:run_all_unittests",
]
}
|