#include "components/download/internal/background_service/scheduler/device_status_listener.h"
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/test/power_monitor_test.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "components/download/internal/background_service/scheduler/battery_status_listener_impl.h"
#include "components/download/network/network_status_listener_impl.h"
#include "services/network/test/test_network_connection_tracker.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
InSequence;
ConnectionType;
namespace download {
namespace {
MATCHER_P(NetworkStatusEqual, value, "") { … }
MATCHER_P(BatteryStatusEqual, value, "") { … }
class MockObserver : public DeviceStatusListener::Observer { … };
class TestBatteryStatusListener : public BatteryStatusListenerImpl { … };
class TestDeviceStatusListener : public DeviceStatusListener { … };
class DeviceStatusListenerTest : public testing::Test { … };
TEST_F(DeviceStatusListenerTest, InitialNoOptState) { … }
TEST_F(DeviceStatusListenerTest, DuplicateStart) { … }
TEST_F(DeviceStatusListenerTest, TestValidStateChecks) { … }
TEST_F(DeviceStatusListenerTest, OnNetworkStatusReadyAsync) { … }
TEST_F(DeviceStatusListenerTest, NotifyObserverNetworkChange) { … }
TEST_F(DeviceStatusListenerTest, ConnectionUnknownTreatedCorrectly) { … }
TEST_F(DeviceStatusListenerTest, NotifyObserverBatteryChange) { … }
TEST_F(DeviceStatusListenerTest, OfflineOnlineOffline) { … }
TEST_F(DeviceStatusListenerTest, OnlineOfflineOnline) { … }
}
}