#include "chrome/browser/upgrade_detector/upgrade_detector.h"
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include "base/environment.h"
#include "base/test/task_environment.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 "chrome/common/pref_names.h"
#include "chrome/test/base/scoped_testing_local_state.h"
#include "chrome/test/base/testing_browser_process.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
class TestUpgradeDetector : public UpgradeDetector { … };
}
class UpgradeDetectorTest : public ::testing::Test { … };
TEST_F(UpgradeDetectorTest, RelaunchWindowPolicy) { … }
TEST_F(UpgradeDetectorTest, DeadlineAdjustment) { … }
TEST_F(UpgradeDetectorTest, DeadlineAdjustmentFor24HrsDuration) { … }
TEST_F(UpgradeDetectorTest, DeadlineAdjustmentForOneDuration) { … }
TEST_F(UpgradeDetectorTest, DeadlineAdjustmentOverMidnight) { … }
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
TEST_F(UpgradeDetectorTest, DeadlineAdjustmentDst) { … }
#endif