#include "chrome/browser/resource_coordinator/test_lifecycle_unit.h"
#include "chrome/browser/resource_coordinator/lifecycle_unit_source.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace resource_coordinator {
TestLifecycleUnit::TestLifecycleUnit(base::TimeTicks last_focused_time,
base::ProcessHandle process_handle,
bool can_discard)
: … { … }
TestLifecycleUnit::TestLifecycleUnit(content::Visibility visibility,
UsageClock* usage_clock)
: … { … }
TestLifecycleUnit::TestLifecycleUnit(LifecycleUnitSourceBase* source)
: … { … }
TestLifecycleUnit::~TestLifecycleUnit() { … }
TabLifecycleUnitExternal* TestLifecycleUnit::AsTabLifecycleUnitExternal() { … }
std::u16string TestLifecycleUnit::GetTitle() const { … }
base::TimeTicks TestLifecycleUnit::GetLastFocusedTimeTicks() const { … }
base::Time TestLifecycleUnit::GetLastFocusedTime() const { … }
base::ProcessHandle TestLifecycleUnit::GetProcessHandle() const { … }
LifecycleUnit::SortKey TestLifecycleUnit::GetSortKey() const { … }
content::Visibility TestLifecycleUnit::GetVisibility() const { … }
mojom::LifecycleUnitLoadingState TestLifecycleUnit::GetLoadingState() const { … }
bool TestLifecycleUnit::Load() { … }
int TestLifecycleUnit::GetEstimatedMemoryFreedOnDiscardKB() const { … }
bool TestLifecycleUnit::CanDiscard(mojom::LifecycleUnitDiscardReason reason,
DecisionDetails* decision_details) const { … }
bool TestLifecycleUnit::Discard(LifecycleUnitDiscardReason discard_reason,
uint64_t resident_set_size_estimate) { … }
LifecycleUnitDiscardReason TestLifecycleUnit::GetDiscardReason() const { … }
void ExpectCanDiscardTrue(const LifecycleUnit* lifecycle_unit,
LifecycleUnitDiscardReason discard_reason) { … }
void ExpectCanDiscardTrueAllReasons(const LifecycleUnit* lifecycle_unit) { … }
void ExpectCanDiscardFalse(const LifecycleUnit* lifecycle_unit,
DecisionFailureReason failure_reason,
LifecycleUnitDiscardReason discard_reason) { … }
void ExpectCanDiscardFalseAllReasons(const LifecycleUnit* lifecycle_unit,
DecisionFailureReason failure_reason) { … }
void ExpectCanDiscardFalseTrivial(const LifecycleUnit* lifecycle_unit,
LifecycleUnitDiscardReason discard_reason) { … }
void ExpectCanDiscardFalseTrivialAllReasons(
const LifecycleUnit* lifecycle_unit) { … }
}