Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Unified Diff: content/common/inter_process_time_ticks_converter_unittest.cc

Issue 1828203005: Expose SPDY pushes in DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adjusted time interpolation to not scale outside of source range Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/inter_process_time_ticks_converter_unittest.cc
diff --git a/content/common/inter_process_time_ticks_converter_unittest.cc b/content/common/inter_process_time_ticks_converter_unittest.cc
index e098bda1f3e19c574b3da24771a6b28c28975c32..b6aa865d0f69b80a41874a9e1253a3951f57b9d4 100644
--- a/content/common/inter_process_time_ticks_converter_unittest.cc
+++ b/content/common/inter_process_time_ticks_converter_unittest.cc
@@ -249,6 +249,30 @@ TEST(InterProcessTimeTicksConverterTest, DisjointRanges) {
EXPECT_EQ(0, results.result_delta);
}
+TEST(InterProcessTimeTicksConverterTest, ValuesOutsideOfRange) {
+ TestParams p;
+ p.local_lower_bound = 15;
+ p.remote_lower_bound = 10;
+ p.remote_upper_bound = 25;
+ p.local_upper_bound = 20;
+
+ p.test_time = 10;
+ TestResults results = RunTest(p);
+ EXPECT_EQ(15, results.result_time);
+
+ p.test_time = 25;
+ results = RunTest(p);
+ EXPECT_EQ(20, results.result_time);
+
+ p.test_time = 9;
+ results = RunTest(p);
+ EXPECT_EQ(14, results.result_time);
+
+ p.test_time = 26;
+ results = RunTest(p);
+ EXPECT_EQ(31, results.result_time);
+}
+
} // anonymous namespace
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698