chromium/third_party/blink/common/media/watch_time_component_unittest.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/public/common/media/watch_time_component.h"

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/media/display_type.h"

namespace blink {

class WatchTimeInterceptor : public media::mojom::WatchTimeRecorder {};

class WatchTimeComponentTest : public testing::Test {};

// Components should be key agnostic so just choose an arbitrary key for running
// most of the tests.
constexpr media::WatchTimeKey kTestKey =;

// This is a test of the standard flow for most components. Most components will
// be created, be enabled, start reporting, record watch time, be disabled,
// report a finalize, and then record watch time again.
TEST_F(WatchTimeComponentTest, BasicFlow) {}

TEST_F(WatchTimeComponentTest, SetCurrentValue) {}

TEST_F(WatchTimeComponentTest, RecordDuringFinalizeRespectsCurrentTime) {}

TEST_F(WatchTimeComponentTest, SetPendingValue) {}

// Tests RecordWatchTime() behavior when a ValueToKeyCB is provided.
TEST_F(WatchTimeComponentTest, WithValueToKeyCB) {}

// Unlike WatchTimeReporter, WatchTimeComponents have no automatic finalization
// so creating and destroying one without calls, should do nothing.
TEST_F(WatchTimeComponentTest, NoAutomaticFinalize) {}

}  // namespace blink