Merge CDM LRU change to Android.

[ Merge of http://go/wvgerrit/81903 ]
[ Merge of http://go/wvgerrit/87473 ]
[ Merge of http://go/wvgerrit/82568 ]
[ Merge of http://go/wvgerrit/87266 ]
[ Merge of http://go/wvgerrit/87474 ]
[ Merge of http://go/wvgerrit/87475 ]

Bug: 135046978
Test: GTS and Android unit tests
Change-Id: Iff2ff62cea21eeb36d7b56c8bb852fce8447ff89
This commit is contained in:
Alex Dale
2019-11-12 18:23:17 -08:00
parent e24b1ef824
commit 061b0e7caf
15 changed files with 2159 additions and 174 deletions

View File

@@ -15,6 +15,18 @@ class MockClock : public Clock {
MOCK_METHOD0(GetCurrentTime, int64_t());
};
// 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 {
int64_t always_time_;
public:
FrozenClock(int64_t always_time = 0) : always_time_(always_time) {}
int64_t GetCurrentTime() override { return always_time_; }
void SetTime(int64_t new_time) { always_time_ = new_time; }
};
} // wvcdm
#endif // CDM_TEST_MOCK_CLOCK_H_