#include "components/feed/core/v2/scheduling.h"
#include "base/check.h"
#include "base/json/json_writer.h"
#include "base/strings/string_util.h"
#include "base/test/scoped_feature_list.h"
#include "base/values.h"
#include "components/feed/core/v2/config.h"
#include "components/feed/core/v2/feedstore_util.h"
#include "components/feed/core/v2/public/stream_type.h"
#include "components/feed/feed_feature_list.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace feed {
namespace {
const base::Time kAnchorTime = …;
const base::TimeDelta kDefaultScheduleInterval = …;
std::string ToJSON(base::ValueView value) { … }
TEST(RequestSchedule, CanSerialize) { … }
TEST(RequestSchedule, GetScheduleType) { … }
class NextScheduledRequestTimeTest : public testing::Test { … };
TEST_F(NextScheduledRequestTimeTest, NormalUsage) { … }
TEST_F(NextScheduledRequestTimeTest, NowPastRequestTimeSkipsRequest) { … }
TEST_F(NextScheduledRequestTimeTest, NowPastAllRequestTimes) { … }
TEST_F(NextScheduledRequestTimeTest, NowInPast) { … }
TEST_F(NextScheduledRequestTimeTest, NowInFarFuture) { … }
class ContentLifetimeTest : public testing::Test { … };
TEST_F(ContentLifetimeTest, ShouldWaitForNewContent_DefaultThreshold) { … }
TEST_F(ContentLifetimeTest, ShouldWaitForNewContent_ServerThreshold_Valid) { … }
TEST_F(ContentLifetimeTest, ShouldWaitForNewContent_WithNoSubscriptions) { … }
TEST_F(ContentLifetimeTest, ShouldWaitForNewContent_ServerThreshold_Invalid) { … }
TEST_F(ContentLifetimeTest, ContentInvalidFromAge_DefaultThreshold) { … }
TEST_F(ContentLifetimeTest, ContentInvalidFromAge_ServerThreshold_Valid) { … }
TEST_F(ContentLifetimeTest, ContentInvalidFromAge_ServerThreshold_Invalid) { … }
TEST_F(ContentLifetimeTest, ContentInvalidFromAge_SubscriptionlessThreshold) { … }
}
}