Source release 17.1.0
This commit is contained in:
@@ -1,24 +1,25 @@
|
||||
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine Master
|
||||
// License Agreement.
|
||||
// source code may only be used and distributed under the Widevine License
|
||||
// Agreement.
|
||||
|
||||
#ifndef CDM_TEST_MOCK_CLOCK_H_
|
||||
#define CDM_TEST_MOCK_CLOCK_H_
|
||||
|
||||
#include "clock.h"
|
||||
#include <gmock/gmock.h>
|
||||
|
||||
#include "clock.h"
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
class MockClock : public Clock {
|
||||
class MockClock : public wvutil::Clock {
|
||||
public:
|
||||
MOCK_METHOD0(GetCurrentTime, int64_t());
|
||||
MOCK_METHOD(int64_t, GetCurrentTime, (), (override));
|
||||
};
|
||||
|
||||
// Frozen clock will always return the same value for the current time.
|
||||
// Intended to be used for testing where using the actual time would
|
||||
// cause flaky tests.
|
||||
class FrozenClock : public Clock {
|
||||
class FrozenClock : public wvutil::Clock {
|
||||
int64_t always_time_;
|
||||
|
||||
public:
|
||||
@@ -27,6 +28,6 @@ class FrozenClock : public Clock {
|
||||
void SetTime(int64_t new_time) { always_time_ = new_time; }
|
||||
};
|
||||
|
||||
} // wvcdm
|
||||
} // namespace wvcdm
|
||||
|
||||
#endif // CDM_TEST_MOCK_CLOCK_H_
|
||||
|
||||
Reference in New Issue
Block a user