Commit 5a8321e9 authored by rajendrant's avatar rajendrant Committed by Chromium LUCI CQ

Update image compression one-time infobar recent date

This CL updates the date before which users who have enabled LiteMode
will be treated as non-recent users. These users will show a one time
infobar when the first page gets compressed.

Bug: 1159971
Change-Id: I98b2fed0475a3b79c8e3f698853ad1122d1f355e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2598464
Commit-Queue: rajendrant <rajendrant@chromium.org>
Reviewed-by: default avatarMichael Crouse <mcrouse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#838717}
parent 4da5dc96
......@@ -31,9 +31,9 @@ constexpr char kHasSeenInfoBar[] =
// The time used to compare and identify recent LiteMode users. Users who
// enabled LiteMode before this time are treated as non-recent and the one-time
// https image compression InfoBar is shown for them. Set approximate as M85
// release date, which is the target for https image compression feature.
constexpr char kRecentLiteModeUserEnableTime[] = "2020-08-25T00:00:01Z";
// https image compression InfoBar is shown for them. Set approximate as M88
// release date, which is the target for https image compression V2 feature.
constexpr char kRecentLiteModeUserEnableTime[] = "2021-01-19T00:00:01Z";
} // namespace
......
......@@ -130,7 +130,7 @@ TEST_F(HttpsImageCompressionInfoBarDeciderPrefTest, TestDRPEnabledThenNotify) {
}
TEST_F(HttpsImageCompressionInfoBarDeciderPrefTest, TestRecentLiteModeUser) {
SetLiteModeLastEnableDate("2020-12-01T00:00:01Z");
SetLiteModeLastEnableDate("2021-12-01T00:00:01Z");
HttpsImageCompressionInfoBarDecider* decider = GetDeciderWithDRPEnabled(true);
EXPECT_FALSE(decider->NeedToShowInfoBar());
......@@ -143,7 +143,7 @@ TEST_F(HttpsImageCompressionInfoBarDeciderPrefTest, TestRecentLiteModeUser) {
TEST_F(HttpsImageCompressionInfoBarDeciderPrefTest, TestNonRecentLiteModeUser) {
HttpsImageCompressionInfoBarDecider* decider = GetDeciderWithDRPEnabled(true);
SetLiteModeLastEnableDate("2020-01-01T00:00:01Z");
SetLiteModeLastEnableDate("2021-01-01T00:00:01Z");
EXPECT_TRUE(decider->NeedToShowInfoBar());
decider->SetUserHasSeenInfoBar();
EXPECT_FALSE(decider->NeedToShowInfoBar());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment