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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/renderer/user_model_unittest.cc

Issue 2118903002: scheduler: Move the Blink scheduler into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698