Chromium Code Reviews| Index: third_party/WebKit/Source/wtf/testing/RunAllTests.cpp |
| diff --git a/third_party/WebKit/Source/wtf/testing/RunAllTests.cpp b/third_party/WebKit/Source/wtf/testing/RunAllTests.cpp |
| index 1e844528be5fa37ac31718ce1d781b10beb4722c..f6ffc2e039fc642c3378bbf37d4a9c6c0597d0f1 100644 |
| --- a/third_party/WebKit/Source/wtf/testing/RunAllTests.cpp |
| +++ b/third_party/WebKit/Source/wtf/testing/RunAllTests.cpp |
| @@ -29,16 +29,12 @@ |
| */ |
| #include "wtf/CryptographicallyRandomNumber.h" |
| +#include "wtf/CurrentTime.h" |
| #include "wtf/MainThread.h" |
| #include "wtf/WTF.h" |
| #include <base/test/test_suite.h> |
| #include <string.h> |
| -static double CurrentTime() |
| -{ |
| - return 0.0; |
| -} |
| - |
| static void AlwaysZeroNumberSource(unsigned char* buf, size_t len) |
| { |
| memset(buf, '\0', len); |
| @@ -47,7 +43,10 @@ static void AlwaysZeroNumberSource(unsigned char* buf, size_t len) |
| int main(int argc, char** argv) |
| { |
| WTF::setRandomSource(AlwaysZeroNumberSource); |
| - WTF::initialize(CurrentTime, nullptr, nullptr, nullptr, nullptr); |
| + WTF::setTimeFunctionsForTesting([]() -> double { |
|
haraken
2015/12/28 02:24:27
Ditto.
|
| + return 0.0; |
| + }); |
| + WTF::initialize(nullptr, nullptr); |
| WTF::initializeMainThread(0); |
| return base::RunUnitTestsUsingBaseTestSuite(argc, argv); |
| } |