blob: 856085fb01eb355bb529e5eb1bbd12076e268b55 [file] [log] [blame]
# 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("//chromecast/build/tests/cast_test.gni")
import("//chromecast/chromecast.gni")
cast_source_set("metrics") {
public = [ "cast_metrics_service_client.h" ]
sources = [ "cast_metrics_service_client.cc" ]
public_deps = [
"//chromecast/base:cast_sys_info_util",
"//third_party/metrics_proto",
]
deps = [
"//base",
"//base:i18n",
"//chromecast/base",
"//chromecast/base:cast_version",
"//components/metrics",
"//components/metrics:net",
"//components/prefs",
"//components/variations:variations",
"//services/network/public/cpp",
]
}
cast_source_set("metrics_recorder") {
public = [
"metrics_recorder.h",
"metrics_recorder_base.h",
]
sources = [
"metrics_recorder.cc",
"metrics_recorder_base.cc",
"timed_event_recorder.cc",
"timed_event_recorder.h",
]
public_deps = [
":cast_event_builder_interface",
"//base",
]
deps = [ "//net" ]
}
cast_source_set("cast_event_builder_interface") {
public = [ "cast_event_builder.h" ]
sources = [ "cast_event_builder.cc" ]
deps = [ "//third_party/metrics_proto" ]
}
cast_source_set("cast_event_builder_simple") {
sources = [ "cast_event_builder_simple.cc" ]
public = [ "cast_event_builder_simple.h" ]
public_deps = [ ":cast_event_builder_interface" ]
deps = [
"//base",
"//third_party/metrics_proto",
]
}
cast_source_set("metrics_util") {
sources = [
"metrics_util.cc",
"metrics_util.h",
]
public_deps = [ "//net:net" ]
deps = [ "//base" ]
}
cast_source_set("cast_event_builder_impl") {
sources = [
"cast_event_builder_impl.cc",
"cast_event_builder_impl.h",
]
public_deps = [ ":cast_event_builder_interface" ]
deps = [
":metrics_util",
"//base",
"//chromecast/base",
"//third_party/metrics_proto",
]
}
cast_source_set("test_support") {
testonly = true
sources = [
"mock_cast_event_builder.cc",
"mock_cast_event_builder.h",
]
deps = [
":cast_event_builder_interface",
"//base",
"//net",
"//testing/gmock:gmock",
]
}
test("cast_metrics_unittest") {
sources = [
"cast_event_builder_impl_unittest.cc",
"cast_metrics_service_client_unittest.cc",
"metrics_recorder_base_unittest.cc",
"mock_cast_sys_info_util.cc",
"mock_cast_sys_info_util.h",
]
deps = [
":cast_event_builder_impl",
":metrics",
":metrics_recorder",
":test_support",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//chromecast/base:dummy_cast_sys_info",
"//components/metrics",
"//services/network/public/cpp",
"//testing/gmock:gmock",
"//testing/gtest:gtest",
]
}
cast_test_group("metrics_cast_test_group") {
tests = [ ":cast_metrics_unittest" ]
}