Home | History | Annotate | Download | only in base

Lines Matching refs:entry

43   TestBackoffEntry entry(&base_policy);
44 EXPECT_FALSE(entry.ShouldRejectRequest());
46 entry.InformOfRequest(false);
47 EXPECT_TRUE(entry.ShouldRejectRequest());
60 TestBackoffEntry entry(&base_policy);
62 EXPECT_FALSE(entry.CanDiscard());
65 entry.InformOfRequest(false);
66 EXPECT_FALSE(entry.CanDiscard());
69 entry.set_now(
70 entry.GetReleaseTime() + TimeDelta::FromMilliseconds(1));
71 EXPECT_FALSE(entry.CanDiscard());
72 entry.set_now(entry.GetReleaseTime() + TimeDelta::FromMilliseconds(
74 EXPECT_TRUE(entry.CanDiscard());
77 entry.set_now(entry.GetReleaseTime() + TimeDelta::FromMilliseconds(
79 entry.InformOfRequest(true);
80 EXPECT_FALSE(entry.CanDiscard());
81 entry.set_now(entry.GetReleaseTime() + TimeDelta::FromMilliseconds(
83 EXPECT_TRUE(entry.CanDiscard());
97 BackoffEntry entry(&lenient_policy);
98 entry.InformOfRequest(false);
99 EXPECT_FALSE(entry.ShouldRejectRequest());
100 entry.InformOfRequest(false);
101 EXPECT_FALSE(entry.ShouldRejectRequest());
102 entry.InformOfRequest(false);
103 EXPECT_TRUE(entry.ShouldRejectRequest());
107 TestBackoffEntry entry(&base_policy);
110 TimeTicks result = entry.GetReleaseTime();
111 EXPECT_EQ(entry.GetTimeNow(), result);
114 entry.InformOfRequest(false);
115 result = entry.GetReleaseTime();
116 EXPECT_EQ(entry.GetTimeNow() + TimeDelta::FromMilliseconds(1000), result);
119 entry.InformOfRequest(false);
120 result = entry.GetReleaseTime();
121 EXPECT_EQ(entry.GetTimeNow() + TimeDelta::FromMilliseconds(2000), result);
124 entry.InformOfRequest(false);
125 result = entry.GetReleaseTime();
126 EXPECT_EQ(entry.GetTimeNow() + TimeDelta::FromMilliseconds(4000), result);
129 entry.InformOfRequest(false);
130 entry.InformOfRequest(false);
131 entry.InformOfRequest(false);
132 result = entry.GetReleaseTime();
133 EXPECT_EQ(entry.GetTimeNow() + TimeDelta::FromMilliseconds(20000), result);
141 TestBackoffEntry entry(&jittery_policy);
143 entry.InformOfRequest(false);
144 entry.InformOfRequest(false);
145 entry.InformOfRequest(false);
146 TimeTicks result = entry.GetReleaseTime();
147 EXPECT_LE(entry.GetTimeNow() + TimeDelta::FromMilliseconds(3200), result);
148 EXPECT_GE(entry.GetTimeNow() + TimeDelta::FromMilliseconds(4000), result);
153 TestBackoffEntry entry(&base_policy);
156 entry.InformOfRequest(false);
157 TimeTicks release_time = entry.GetReleaseTime();
162 entry.set_now(release_time - TimeDelta::FromMilliseconds(200));
163 entry.InformOfRequest(true);
164 EXPECT_EQ(release_time, entry.GetReleaseTime());
167 entry.InformOfRequest(false);
169 entry.GetReleaseTime());