#include "chrome/browser/upgrade_detector/upgrade_detector_impl.h"
#include <initializer_list>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "base/memory/raw_ptr.h"
#include "base/time/clock.h"
#include "base/time/tick_clock.h"
#include "base/time/time.h"
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/upgrade_detector/installed_version_poller.h"
#include "chrome/browser/upgrade_detector/upgrade_observer.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/scoped_testing_local_state.h"
#include "chrome/test/base/testing_browser_process.h"
#include "components/prefs/testing_pref_service.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#if !BUILDFLAG(IS_CHROMEOS_ASH)
#include "components/enterprise/browser/controller/fake_browser_dm_token_storage.h"
#endif
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#include "chromeos/lacros/lacros_test_helper.h"
#endif
#if BUILDFLAG(IS_WIN)
#include "chrome/install_static/install_modes.h"
#include "chrome/install_static/test/scoped_install_details.h"
#endif
AnyNumber;
namespace {
class TestUpgradeDetectorImpl : public UpgradeDetectorImpl { … };
class TestUpgradeNotificationListener : public UpgradeObserver { … };
class MockUpgradeObserver : public UpgradeObserver { … };
}
class UpgradeDetectorImplTest : public ::testing::Test { … };
TEST_F(UpgradeDetectorImplTest, VariationsChanges) { … }
TEST_F(UpgradeDetectorImplTest, VariationsCriticalChanges) { … }
TEST_F(UpgradeDetectorImplTest, TestPeriodChanges) { … }
ACTION_P2(AppendTicksAndStage, detector, notifications) { … }
class UpgradeDetectorImplTimerTest : public UpgradeDetectorImplTest,
public ::testing::WithParamInterface<int> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(UpgradeDetectorImplTimerTest, TestNotificationTimer) { … }
TEST_F(UpgradeDetectorImplTest, TestDeadlineAdjustmentDefaultPeriod) { … }
TEST_F(UpgradeDetectorImplTest, TestDeadlineAdjustmentCustomPeriod) { … }
TEST_F(UpgradeDetectorImplTest, AnnoyanceLevelDeadlines) { … }