OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/scheduler/renderer/user_model.h" | 5 #include "platform/scheduler/renderer/user_model.h" |
6 | 6 |
7 #include "base/test/simple_test_tick_clock.h" | 7 #include "base/test/simple_test_tick_clock.h" |
8 #include "testing/gmock/include/gmock/gmock.h" | 8 #include "testing/gmock/include/gmock/gmock.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
| 11 namespace blink { |
11 namespace scheduler { | 12 namespace scheduler { |
12 | 13 |
13 class UserModelTest : public testing::Test { | 14 class UserModelTest : public testing::Test { |
14 public: | 15 public: |
15 UserModelTest() {} | 16 UserModelTest() {} |
16 ~UserModelTest() override {} | 17 ~UserModelTest() override {} |
17 | 18 |
18 void SetUp() override { | 19 void SetUp() override { |
19 clock_.reset(new base::SimpleTestTickClock()); | 20 clock_.reset(new base::SimpleTestTickClock()); |
20 clock_->Advance(base::TimeDelta::FromMicroseconds(5000)); | 21 clock_->Advance(base::TimeDelta::FromMicroseconds(5000)); |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 UserModel::kMedianGestureDurationMillis * 2)); | 246 UserModel::kMedianGestureDurationMillis * 2)); |
246 clock_->Advance(delta); | 247 clock_->Advance(delta); |
247 | 248 |
248 base::TimeDelta prediction_valid_duration; | 249 base::TimeDelta prediction_valid_duration; |
249 EXPECT_FALSE(user_model_->IsGestureExpectedToContinue( | 250 EXPECT_FALSE(user_model_->IsGestureExpectedToContinue( |
250 clock_->NowTicks(), &prediction_valid_duration)); | 251 clock_->NowTicks(), &prediction_valid_duration)); |
251 EXPECT_EQ(base::TimeDelta(), prediction_valid_duration); | 252 EXPECT_EQ(base::TimeDelta(), prediction_valid_duration); |
252 } | 253 } |
253 | 254 |
254 } // namespace scheduler | 255 } // namespace scheduler |
| 256 } // namespace blink |
OLD | NEW |