Migration from jb-mr2 to master for Widevine CDM
Android development of the widevine CDM has been done on the jb-mr2 branch of the cdm code base. This CL contains a merge of that jb-mr2 work to CDM master, and also reflects the evolution of the common Modular DRM code base since jb-mr2 branched. Change-Id: I1d7e1a12d092c00044a4298261146cb97808d4ef
This commit is contained in:
@@ -14,7 +14,7 @@ class TestTimerHandler : public TimerHandler {
|
||||
timer_events_++;
|
||||
}
|
||||
|
||||
uint32_t GetTimerEvents() { return timer_events_; }
|
||||
uint32_t timer_events() { return timer_events_; }
|
||||
void ResetTimerEvents() { timer_events_ = 0; }
|
||||
|
||||
private:
|
||||
@@ -34,21 +34,21 @@ TEST(TimerTest, TimerCheck) {
|
||||
Timer timer;
|
||||
uint32_t duration = 10;
|
||||
|
||||
EXPECT_EQ(static_cast<uint32_t>(0), handler.GetTimerEvents());
|
||||
EXPECT_EQ(0u, handler.timer_events());
|
||||
EXPECT_FALSE(timer.IsRunning());
|
||||
|
||||
EXPECT_TRUE(timer.Start(&handler, 1));
|
||||
EXPECT_TRUE(timer.IsRunning());
|
||||
sleep(duration);
|
||||
|
||||
EXPECT_TRUE(duration-1 <= handler.GetTimerEvents());
|
||||
EXPECT_TRUE(handler.GetTimerEvents() <= duration+1);
|
||||
EXPECT_LE(duration-1, handler.timer_events());
|
||||
EXPECT_LE(handler.timer_events(), duration+1);
|
||||
timer.Stop();
|
||||
EXPECT_FALSE(timer.IsRunning());
|
||||
sleep(duration);
|
||||
|
||||
EXPECT_TRUE(duration-1 <= handler.GetTimerEvents());
|
||||
EXPECT_TRUE(handler.GetTimerEvents() <= duration+1);
|
||||
EXPECT_LE(duration-1, handler.timer_events());
|
||||
EXPECT_LE(handler.timer_events(), duration+1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user