Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1061)

Unified Diff: third_party/WebKit/Source/platform/testing/RunAllTests.cpp

Issue 1785163002: Move the contents of initializeWithoutV8/shutdownWithoutV8 to Platform::initialize/shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/exported/Platform.cpp ('k') | third_party/WebKit/Source/web/WebKit.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8b3fa3b09a2c1d30de7c973b0635435c09d3ad6c..15791e547834e88d1d8e6b46e4d4c178461f709c 100644
--- a/third_party/WebKit/Source/platform/testing/RunAllTests.cpp
+++ b/third_party/WebKit/Source/platform/testing/RunAllTests.cpp
@@ -33,6 +33,7 @@
#include "mojo/edk/test/scoped_ipc_support.h"
#include "platform/EventTracer.h"
#include "platform/HTTPNames.h"
+#include "platform/graphics/CompositorFactory.h"
#include "platform/heap/Heap.h"
#include "platform/testing/TestingPlatformSupport.h"
#include "public/platform/Platform.h"
@@ -73,40 +74,38 @@ int main(int argc, char** argv)
{
base::CommandLine::Init(argc, argv);
+ OwnPtr<DummyPlatform> platform = adoptPtr(new DummyPlatform);
+ blink::Platform::setCurrentPlatformForTesting(platform.get());
+
WTF::Partitions::initialize(nullptr);
WTF::setTimeFunctionsForTesting(dummyCurrentTime);
WTF::initialize();
WTF::initializeMainThread(0);
+ blink::CompositorFactory::initializeDefault();
int result = 0;
{
- OwnPtr<DummyPlatform> platform = adoptPtr(new DummyPlatform);
- blink::Platform::initialize(platform.get());
- {
- blink::TestingPlatformSupport::Config platformConfig;
- cc_blink::WebCompositorSupportImpl compositorSupport;
- platformConfig.compositorSupport = &compositorSupport;
- blink::TestingPlatformSupport platform(platformConfig);
-
- blink::Heap::init();
- blink::ThreadState::attachMainThread();
- blink::ThreadState::current()->registerTraceDOMWrappers(nullptr, nullptr);
- blink::EventTracer::initialize();
+ blink::TestingPlatformSupport::Config platformConfig;
+ cc_blink::WebCompositorSupportImpl compositorSupport;
+ platformConfig.compositorSupport = &compositorSupport;
+ blink::TestingPlatformSupport platform(platformConfig);
- blink::HTTPNames::init();
+ blink::Heap::init();
+ blink::ThreadState::attachMainThread();
+ blink::ThreadState::current()->registerTraceDOMWrappers(nullptr, nullptr);
+ blink::EventTracer::initialize();
+ blink::HTTPNames::init();
- base::TestSuite testSuite(argc, argv);
+ base::TestSuite testSuite(argc, argv);
- mojo::edk::Init();
- base::TestIOThread testIoThread(base::TestIOThread::kAutoStart);
- WTF::OwnPtr<mojo::edk::test::ScopedIPCSupport> ipcSupport(adoptPtr(new mojo::edk::test::ScopedIPCSupport(testIoThread.task_runner())));
- result = base::LaunchUnitTests(argc, argv, base::Bind(runTestSuite, base::Unretained(&testSuite)));
+ mojo::edk::Init();
+ base::TestIOThread testIoThread(base::TestIOThread::kAutoStart);
+ WTF::OwnPtr<mojo::edk::test::ScopedIPCSupport> ipcSupport(adoptPtr(new mojo::edk::test::ScopedIPCSupport(testIoThread.task_runner())));
+ result = base::LaunchUnitTests(argc, argv, base::Bind(runTestSuite, base::Unretained(&testSuite)));
- blink::ThreadState::detachMainThread();
- blink::Heap::shutdown();
- }
- blink::Platform::shutdown();
+ blink::ThreadState::detachMainThread();
+ blink::Heap::shutdown();
}
-
+ blink::CompositorFactory::shutdown();
WTF::shutdown();
WTF::Partitions::shutdown();
return result;
« no previous file with comments | « third_party/WebKit/Source/platform/exported/Platform.cpp ('k') | third_party/WebKit/Source/web/WebKit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698