#include "chrome/browser/resource_coordinator/lifecycle_unit_base.h"
#include "base/test/simple_test_clock.h"
#include "base/test/simple_test_tick_clock.h"
#include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h"
#include "chrome/browser/resource_coordinator/lifecycle_unit_observer.h"
#include "chrome/browser/resource_coordinator/lifecycle_unit_source_base.h"
#include "chrome/browser/resource_coordinator/test_lifecycle_unit.h"
#include "chrome/browser/resource_coordinator/time.h"
#include "chrome/browser/resource_coordinator/usage_clock.h"
#include "content/public/browser/visibility.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace resource_coordinator {
namespace {
class MockLifecycleUnitObserver : public LifecycleUnitObserver { … };
class LifecycleUnitBaseTest : public testing::Test { … };
}
TEST_F(LifecycleUnitBaseTest, GetID) { … }
TEST_F(LifecycleUnitBaseTest, SetStateUpdatesTime) { … }
TEST_F(LifecycleUnitBaseTest, SetStateNotifiesObservers) { … }
TEST_F(LifecycleUnitBaseTest, DestroyNotifiesObservers) { … }
TEST_F(LifecycleUnitBaseTest, InitialLastActiveTimeForVisibleLifecycleUnit) { … }
TEST_F(LifecycleUnitBaseTest, InitialLastActiveTimeForHiddenLifecycleUnit) { … }
TEST_F(LifecycleUnitBaseTest, VisibilityChangeNotifiesObserversAndUpdatesTime) { … }
namespace {
class MockLifecycleUnitSource : public LifecycleUnitSourceBase { … };
}
TEST_F(LifecycleUnitBaseTest, SourceIsNotifiedOfUnitDeath) { … }
}