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

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: fixed tests Created 4 years, 8 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
« no previous file with comments | « content/common/inter_process_time_ticks_converter.cc ('k') | content/common/resource_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9d53d7935f1f8943cbc029ee86464ba8e41b9ce1 100644
--- a/content/common/inter_process_time_ticks_converter_unittest.cc
+++ b/content/common/inter_process_time_ticks_converter_unittest.cc
@@ -249,6 +249,32 @@ TEST(InterProcessTimeTicksConverterTest, DisjointRanges) {
EXPECT_EQ(0, results.result_delta);
}
+TEST(InterProcessTimeTicksConverterTest, ValuesOutsideOfRange) {
+ InterProcessTimeTicksConverter converter(
+ LocalTimeTicks::FromTimeTicks(TimeTicks::FromInternalValue(15)),
+ LocalTimeTicks::FromTimeTicks(TimeTicks::FromInternalValue(20)),
+ RemoteTimeTicks::FromTimeTicks(TimeTicks::FromInternalValue(10)),
+ RemoteTimeTicks::FromTimeTicks(TimeTicks::FromInternalValue(25)));
+
+ RemoteTimeTicks remote_ticks =
+ RemoteTimeTicks::FromTimeTicks(TimeTicks::FromInternalValue(10));
+ int64_t result =
+ converter.ToLocalTimeTicks(remote_ticks).ToTimeTicks().ToInternalValue();
+ EXPECT_EQ(15, result);
+
+ remote_ticks =
+ RemoteTimeTicks::FromTimeTicks(TimeTicks::FromInternalValue(25));
+ result =
+ converter.ToLocalTimeTicks(remote_ticks).ToTimeTicks().ToInternalValue();
+ EXPECT_EQ(20, result);
+
+ remote_ticks =
+ RemoteTimeTicks::FromTimeTicks(TimeTicks::FromInternalValue(9));
+ result =
+ converter.ToLocalTimeTicks(remote_ticks).ToTimeTicks().ToInternalValue();
+ EXPECT_EQ(14, result);
+}
+
} // anonymous namespace
} // namespace content
« no previous file with comments | « content/common/inter_process_time_ticks_converter.cc ('k') | content/common/resource_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698