Home | History | Annotate | Download | only in base

Lines Matching refs:custom

266   TestBackoffEntry custom(&base_policy);
268 custom.SetCustomReleaseTime(custom_horizon);
269 custom.InformOfRequest(false);
270 custom.InformOfRequest(true);
271 custom.set_now(TimeTicks() + TimeDelta::FromDays(2));
272 custom.InformOfRequest(false);
273 custom.InformOfRequest(true);
274 EXPECT_EQ(custom_horizon, custom.GetReleaseTime());
276 // Now check that once we are at or past the custom horizon,
278 custom.set_now(TimeTicks() + TimeDelta::FromDays(3));
279 custom.InformOfRequest(false);
282 custom.GetReleaseTime());
289 TestBackoffEntry custom(&lenient_policy);
291 custom.SetCustomReleaseTime(custom_horizon);
292 custom.InformOfRequest(false); // This must not reset the horizon.
293 EXPECT_EQ(custom_horizon, custom.GetReleaseTime());
299 TestBackoffEntry custom(&large_multiply_policy);
305 custom.set_now(custom.ImplGetTimeNow() + custom.GetTimeUntilRelease());
306 custom.InformOfRequest(false);
307 ASSERT_TRUE(custom.ShouldRejectRequest());
311 EXPECT_EQ(20000, custom.GetTimeUntilRelease().InMilliseconds());