Chromium Code Reviews| Index: third_party/WebKit/Source/platform/testing/RunAllTests.cpp |
| diff --git a/third_party/WebKit/Source/platform/testing/RunAllTests.cpp b/third_party/WebKit/Source/platform/testing/RunAllTests.cpp |
| index a852c3c82cebb30a1b8dd506a3c2bc4c712dcb5f..273664ef58feb01ece1e2b93ee562ea2e5b09904 100644 |
| --- a/third_party/WebKit/Source/platform/testing/RunAllTests.cpp |
| +++ b/third_party/WebKit/Source/platform/testing/RunAllTests.cpp |
| @@ -33,6 +33,7 @@ |
| #include "platform/heap/Heap.h" |
| #include "platform/testing/TestingPlatformSupport.h" |
| #include "wtf/CryptographicallyRandomNumber.h" |
| +#include "wtf/CurrentTime.h" |
| #include "wtf/MainThread.h" |
| #include "wtf/Partitions.h" |
| #include "wtf/WTF.h" |
| @@ -43,11 +44,6 @@ |
| #include <cc/blink/web_compositor_support_impl.h> |
| #include <string.h> |
| -static double CurrentTime() |
| -{ |
| - return 0.0; |
| -} |
| - |
| static int runTestSuite(base::TestSuite* testSuite) |
| { |
| int result = testSuite->Run(); |
| @@ -58,8 +54,10 @@ static int runTestSuite(base::TestSuite* testSuite) |
| int main(int argc, char** argv) |
| { |
| WTF::Partitions::initialize(nullptr); |
| - WTF::setAlwaysZeroRandomSourceForTesting(); |
| - WTF::initialize(CurrentTime, CurrentTime, nullptr); |
| + WTF::setTimeFunctionsForTesting([]() -> double { |
|
haraken
2016/02/09 09:13:58
It looks like that a lambda function in this style
Yuta Kitamura
2016/02/09 09:54:56
It's in the "allowed features" section (with notes
tkent
2016/02/10 00:04:39
Lambda is ok, but you don't need to convert existi
Yuta Kitamura
2016/02/15 07:26:38
Reverted.
|
| + return 0.0; |
| + }); |
| + WTF::initialize(nullptr); |
| WTF::initializeMainThread(0); |
| blink::TestingPlatformSupport::Config platformConfig; |