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

Side by Side Diff: test/unittests/run-all-unittests.cc

Issue 1292053002: Rework startup-data-util. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Same as Patch Set 3, but revert the "Test for all platforms" bits. Created 5 years, 4 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 | « test/cctest/cctest.gyp ('k') | test/unittests/unittests.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "include/libplatform/libplatform.h" 5 #include "include/libplatform/libplatform.h"
6 #include "include/v8.h" 6 #include "include/v8.h"
7 #include "src/base/compiler-specific.h" 7 #include "src/base/compiler-specific.h"
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 9
10 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
11 #include "src/startup-data-util.h"
12 #endif // V8_USE_EXTERNAL_STARTUP_DATA
13
14 namespace { 10 namespace {
15 11
16 class DefaultPlatformEnvironment final : public ::testing::Environment { 12 class DefaultPlatformEnvironment final : public ::testing::Environment {
17 public: 13 public:
18 DefaultPlatformEnvironment() : platform_(NULL) {} 14 DefaultPlatformEnvironment() : platform_(NULL) {}
19 ~DefaultPlatformEnvironment() {} 15 ~DefaultPlatformEnvironment() {}
20 16
21 virtual void SetUp() override { 17 virtual void SetUp() override {
22 EXPECT_EQ(NULL, platform_); 18 EXPECT_EQ(NULL, platform_);
23 platform_ = v8::platform::CreateDefaultPlatform(); 19 platform_ = v8::platform::CreateDefaultPlatform();
(...skipping 14 matching lines...) Expand all
38 v8::Platform* platform_; 34 v8::Platform* platform_;
39 }; 35 };
40 36
41 } // namespace 37 } // namespace
42 38
43 39
44 int main(int argc, char** argv) { 40 int main(int argc, char** argv) {
45 testing::InitGoogleMock(&argc, argv); 41 testing::InitGoogleMock(&argc, argv);
46 testing::AddGlobalTestEnvironment(new DefaultPlatformEnvironment); 42 testing::AddGlobalTestEnvironment(new DefaultPlatformEnvironment);
47 v8::V8::SetFlagsFromCommandLine(&argc, argv, true); 43 v8::V8::SetFlagsFromCommandLine(&argc, argv, true);
48 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 44 v8::V8::InitializeExternalStartupData(argv[0]);
49 v8::StartupDataHandler startup_data(argv[0], NULL, NULL);
50 #endif
51 return RUN_ALL_TESTS(); 45 return RUN_ALL_TESTS();
52 } 46 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.gyp ('k') | test/unittests/unittests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698