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

Unified Diff: cc/scheduler/vsync_time_source_unittest.cc

Issue 12623026: cc: Chromify TimeSource, DelayBasedTimeSource and test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Back to doubles Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/scheduler/vsync_time_source.cc ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/vsync_time_source_unittest.cc
diff --git a/cc/scheduler/vsync_time_source_unittest.cc b/cc/scheduler/vsync_time_source_unittest.cc
index ea9c79d9cd9ad7f63ffc23194116ba3bb92e9157..c9cb984a119ec157d2bc7f8d2c3e037a3f502c5b 100644
--- a/cc/scheduler/vsync_time_source_unittest.cc
+++ b/cc/scheduler/vsync_time_source_unittest.cc
@@ -35,7 +35,7 @@ class VSyncTimeSourceTest : public testing::Test {
public:
VSyncTimeSourceTest()
: timer_(VSyncTimeSource::create(&provider_)) {
- timer_->setClient(&client_);
+ timer_->SetClient(&client_);
}
protected:
@@ -48,13 +48,13 @@ TEST_F(VSyncTimeSourceTest, TaskPostedAndTickCalled)
{
EXPECT_FALSE(provider_.IsVSyncNotificationEnabled());
- timer_->setActive(true);
+ timer_->SetActive(true);
EXPECT_TRUE(provider_.IsVSyncNotificationEnabled());
base::TimeTicks frame_time = base::TimeTicks::Now();
provider_.Trigger(frame_time);
EXPECT_TRUE(client_.tickCalled());
- EXPECT_EQ(timer_->lastTickTime(), frame_time);
+ EXPECT_EQ(timer_->LastTickTime(), frame_time);
}
TEST_F(VSyncTimeSourceTest, NotificationDisabledLazily)
@@ -62,14 +62,14 @@ TEST_F(VSyncTimeSourceTest, NotificationDisabledLazily)
base::TimeTicks frame_time = base::TimeTicks::Now();
// Enable timer and trigger sync once.
- timer_->setActive(true);
+ timer_->SetActive(true);
EXPECT_TRUE(provider_.IsVSyncNotificationEnabled());
provider_.Trigger(frame_time);
EXPECT_TRUE(client_.tickCalled());
// Disabling the timer should not disable vsync notification immediately.
client_.reset();
- timer_->setActive(false);
+ timer_->SetActive(false);
EXPECT_TRUE(provider_.IsVSyncNotificationEnabled());
// At the next vsync the notification is disabled, but the timer isn't ticked.
@@ -89,14 +89,14 @@ TEST_F(VSyncTimeSourceTest, ValidNextTickTime)
base::TimeTicks frame_time = base::TimeTicks::Now();
base::TimeDelta interval = base::TimeDelta::FromSeconds(1);
- ASSERT_EQ(timer_->nextTickTime(), base::TimeTicks());
+ ASSERT_EQ(timer_->NextTickTime(), base::TimeTicks());
- timer_->setActive(true);
+ timer_->SetActive(true);
provider_.Trigger(frame_time);
- ASSERT_EQ(timer_->nextTickTime(), frame_time);
+ ASSERT_EQ(timer_->NextTickTime(), frame_time);
- timer_->setTimebaseAndInterval(frame_time, interval);
- ASSERT_EQ(timer_->nextTickTime(), frame_time + interval);
+ timer_->SetTimebaseAndInterval(frame_time, interval);
+ ASSERT_EQ(timer_->NextTickTime(), frame_time + interval);
}
} // namespace
« no previous file with comments | « cc/scheduler/vsync_time_source.cc ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698