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 0a90a9132001c3af9ea790c01fc3ae9bc3e62243..c2ad8d53b31cbbe4051ad3276f7bd19976f488d6 100644 |
| --- a/third_party/WebKit/Source/wtf/testing/RunAllTests.cpp |
| +++ b/third_party/WebKit/Source/wtf/testing/RunAllTests.cpp |
| @@ -29,22 +29,20 @@ |
| */ |
| #include "wtf/CryptographicallyRandomNumber.h" |
| +#include "wtf/CurrentTime.h" |
| #include "wtf/MainThread.h" |
| #include "wtf/Partitions.h" |
| #include "wtf/WTF.h" |
| #include <base/test/test_suite.h> |
| #include <string.h> |
| -static double CurrentTime() |
| -{ |
| - return 0.0; |
| -} |
| - |
| int main(int argc, char** argv) |
| { |
| WTF::Partitions::initialize(nullptr); |
| - WTF::setAlwaysZeroRandomSourceForTesting(); |
| - WTF::initialize(CurrentTime, nullptr, nullptr); |
| + WTF::setTimeFunctionsForTesting([]() -> double { |
|
haraken
2016/02/09 09:13:58
It looks like that a lambda function in this style
|
| + return 0.0; |
| + }); |
| + WTF::initialize(nullptr); |
| WTF::initializeMainThread(0); |
| return base::RunUnitTestsUsingBaseTestSuite(argc, argv); |
| } |