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 |