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

Side by Side Diff: third_party/WebKit/Source/platform/testing/RunAllTests.cpp

Issue 1619443002: Move Partitions::initialize() before Platform::initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move Partitions::shutdown out of WTF::shutdown Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebKit.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 static int runTestSuite(base::TestSuite* testSuite) 51 static int runTestSuite(base::TestSuite* testSuite)
52 { 52 {
53 int result = testSuite->Run(); 53 int result = testSuite->Run();
54 blink::Heap::collectAllGarbage(); 54 blink::Heap::collectAllGarbage();
55 return result; 55 return result;
56 } 56 }
57 57
58 int main(int argc, char** argv) 58 int main(int argc, char** argv)
59 { 59 {
60 WTF::Partitions::initialize(nullptr);
60 WTF::setAlwaysZeroRandomSourceForTesting(); 61 WTF::setAlwaysZeroRandomSourceForTesting();
61 WTF::initialize(CurrentTime, CurrentTime, nullptr, nullptr); 62 WTF::initialize(CurrentTime, CurrentTime, nullptr);
62 WTF::initializeMainThread(0); 63 WTF::initializeMainThread(0);
63 64
64 blink::TestingPlatformSupport::Config platformConfig; 65 blink::TestingPlatformSupport::Config platformConfig;
65 cc_blink::WebCompositorSupportImpl compositorSupport; 66 cc_blink::WebCompositorSupportImpl compositorSupport;
66 platformConfig.compositorSupport = &compositorSupport; 67 platformConfig.compositorSupport = &compositorSupport;
67 blink::TestingPlatformSupport platform(platformConfig); 68 blink::TestingPlatformSupport platform(platformConfig);
68 69
69 blink::Heap::init(); 70 blink::Heap::init();
70 blink::ThreadState::attachMainThread(); 71 blink::ThreadState::attachMainThread();
71 blink::ThreadState::current()->registerTraceDOMWrappers(nullptr, nullptr); 72 blink::ThreadState::current()->registerTraceDOMWrappers(nullptr, nullptr);
72 blink::EventTracer::initialize(); 73 blink::EventTracer::initialize();
73 74
74 blink::HTTPNames::init(); 75 blink::HTTPNames::init();
75 76
76 base::TestSuite testSuite(argc, argv); 77 base::TestSuite testSuite(argc, argv);
77 int result = base::LaunchUnitTests(argc, argv, base::Bind(runTestSuite, base ::Unretained(&testSuite))); 78 int result = base::LaunchUnitTests(argc, argv, base::Bind(runTestSuite, base ::Unretained(&testSuite)));
78 79
79 blink::ThreadState::detachMainThread(); 80 blink::ThreadState::detachMainThread();
80 blink::Heap::shutdown(); 81 blink::Heap::shutdown();
81 82
82 WTF::shutdown(); 83 WTF::shutdown();
84 WTF::Partitions::shutdown();
83 return result; 85 return result;
84 } 86 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/WebKit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698