| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 "platform/UserGestureIndicator.h" | 5 #include "platform/UserGestureIndicator.h" |
| 6 | 6 |
| 7 #include "platform/wtf/CurrentTime.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "wtf/CurrentTime.h" | |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 static double g_current_time = 1000.0; | 12 static double g_current_time = 1000.0; |
| 13 | 13 |
| 14 static void AdvanceClock(double seconds) { | 14 static void AdvanceClock(double seconds) { |
| 15 g_current_time += seconds; | 15 g_current_time += seconds; |
| 16 } | 16 } |
| 17 | 17 |
| 18 static double MockTimeFunction() { | 18 static double MockTimeFunction() { |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 AdvanceClock(0.75); | 227 AdvanceClock(0.75); |
| 228 EXPECT_TRUE(token->HasGestures()); | 228 EXPECT_TRUE(token->HasGestures()); |
| 229 AdvanceClock(0.75); | 229 AdvanceClock(0.75); |
| 230 EXPECT_FALSE(token->HasGestures()); | 230 EXPECT_FALSE(token->HasGestures()); |
| 231 } | 231 } |
| 232 | 232 |
| 233 SetTimeFunctionsForTesting(previous); | 233 SetTimeFunctionsForTesting(previous); |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace blink | 236 } // namespace blink |
| OLD | NEW |