OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/glue/webkit_glue.h" | |
6 | |
7 #include <string> | 5 #include <string> |
8 | 6 |
9 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
10 #include "base/time/time.h" | 8 #include "base/time/time.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "webkit/child/webkitplatformsupport_impl.h" | 10 #include "webkit/child/webkitplatformsupport_impl.h" |
13 | 11 |
14 namespace { | 12 namespace { |
15 | 13 |
16 // Derives WebKitPlatformSupportImpl for testing shared timers. | 14 // Derives WebKitPlatformSupportImpl for testing shared timers. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // Set a mock time after 1 second to simulate timers suspended for 1 second. | 78 // Set a mock time after 1 second to simulate timers suspended for 1 second. |
81 double new_time = base::Time::Now().ToDoubleT() + 1; | 79 double new_time = base::Time::Now().ToDoubleT() + 1; |
82 platform_support.set_mock_monotonically_increasing_time(new_time); | 80 platform_support.set_mock_monotonically_increasing_time(new_time); |
83 // Resume timers so that the timer set above will be set again to fire | 81 // Resume timers so that the timer set above will be set again to fire |
84 // immediately. | 82 // immediately. |
85 platform_support.ResumeSharedTimer(); | 83 platform_support.ResumeSharedTimer(); |
86 EXPECT_TRUE(base::TimeDelta() == platform_support.shared_timer_delay()); | 84 EXPECT_TRUE(base::TimeDelta() == platform_support.shared_timer_delay()); |
87 } | 85 } |
88 | 86 |
89 } // namespace | 87 } // namespace |
OLD | NEW |