summaryrefslogtreecommitdiff
path: root/media/base/clock_unittest.cc
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-03-28 15:31:22 +0000
committerTorne (Richard Coles) <torne@google.com>2013-03-28 15:31:22 +0000
commit2a99a7e74a7f215066514fe81d2bfa6639d9eddd (patch)
tree7c2d04841fcd599fd83b0f0bb1100e1c89a35bae /media/base/clock_unittest.cc
parent61c449bbbb53310a8c041d8cefdd6b01a126cc7e (diff)
downloadchromium_org-2a99a7e74a7f215066514fe81d2bfa6639d9eddd.tar.gz
Merge from Chromium at DEPS revision r190564
This commit was generated by merge_to_master.py. Change-Id: Icadecbce29854b8fa25fd335b2c1949b5ca5d170
Diffstat (limited to 'media/base/clock_unittest.cc')
-rw-r--r--media/base/clock_unittest.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/media/base/clock_unittest.cc b/media/base/clock_unittest.cc
index 6773a5bb05..919c7e5cb3 100644
--- a/media/base/clock_unittest.cc
+++ b/media/base/clock_unittest.cc
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/compiler_specific.h"
#include "base/logging.h"
-#include "base/test/mock_time_provider.h"
+#include "base/test/simple_test_clock.h"
+#include "base/time/clock.h"
#include "media/base/clock.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -28,11 +30,8 @@ static const int kDurationInSeconds = 120;
class ClockTest : public ::testing::Test {
public:
- ClockTest()
- : clock_(&base::MockTimeProvider::StaticNow) {
+ ClockTest() : clock_(&test_clock_) {
SetDuration();
- EXPECT_CALL(mock_time_, Now())
- .WillRepeatedly(Return(base::Time::UnixEpoch()));
}
protected:
@@ -44,13 +43,11 @@ class ClockTest : public ::testing::Test {
}
void AdvanceSystemTime(base::TimeDelta delta) {
- time_elapsed_ += delta;
- EXPECT_CALL(mock_time_, Now())
- .WillRepeatedly(Return(base::Time::UnixEpoch() + time_elapsed_));
+ test_clock_.Advance(delta);
}
+ base::SimpleTestClock test_clock_;
Clock clock_;
- StrictMock<base::MockTimeProvider> mock_time_;
base::TimeDelta time_elapsed_;
};