#include "components/metrics/metrics_service_observer.h"
#include "base/base64.h"
#include "base/callback_list.h"
#include "base/json/json_string_value_serializer.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "components/metrics/log_decoder.h"
#include "components/metrics/metrics_log.h"
#include "components/metrics/metrics_logs_event_manager.h"
#include "components/metrics/metrics_pref_names.h"
#include "components/metrics/metrics_scheduler.h"
#include "components/metrics/metrics_service.h"
#include "components/metrics/metrics_state_manager.h"
#include "components/metrics/metrics_upload_scheduler.h"
#include "components/metrics/test/test_enabled_state_provider.h"
#include "components/metrics/test/test_metrics_service_client.h"
#include "components/metrics/unsent_log_store_metrics_impl.h"
#include "components/prefs/testing_pref_service.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/metrics_proto/chrome_user_metrics_extension.pb.h"
namespace metrics {
namespace {
class MetricsServiceObserverTest : public testing::Test { … };
class MetricsServiceObserverExportTest
: public MetricsServiceObserverTest,
public testing::WithParamInterface<bool> { … };
}
TEST_F(MetricsServiceObserverTest, SuccessfulLogUpload) { … }
TEST_F(MetricsServiceObserverTest, UnsuccessfulLogUpload) { … }
TEST_F(MetricsServiceObserverTest, TrimLargeLog) { … }
TEST_F(MetricsServiceObserverTest, TrimLongLogList) { … }
TEST_F(MetricsServiceObserverTest, UmaLogType) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(MetricsServiceObserverExportTest, ExportLogsAsJson) { … }
TEST_F(MetricsServiceObserverTest, NotifiedCallbacks) { … }
}