OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium 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 "content/public/test/unittest_test_suite.h" | 5 #include "content/public/test/unittest_test_suite.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
9 #include "base/test/test_suite.h" | 9 #include "base/test/test_suite.h" |
10 #if !defined(OS_IOS) | 10 #if !defined(OS_IOS) |
11 #include "content/test/test_blink_web_unit_test_support.h" | 11 #include "content/test/test_blink_web_unit_test_support.h" |
12 #endif | 12 #endif |
13 #include "third_party/WebKit/public/web/WebKit.h" | 13 #include "third_party/WebKit/public/web/WebKit.h" |
14 | 14 |
15 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | |
16 #include "gin/public/isolate_holder.h" | |
17 #endif | |
18 | |
15 namespace content { | 19 namespace content { |
16 | 20 |
17 UnitTestTestSuite::UnitTestTestSuite(base::TestSuite* test_suite) | 21 UnitTestTestSuite::UnitTestTestSuite(base::TestSuite* test_suite) |
18 : test_suite_(test_suite) { | 22 : test_suite_(test_suite) { |
19 DCHECK(test_suite); | 23 DCHECK(test_suite); |
24 | |
25 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | |
26 gin::IsolateHolder::LoadV8Snapshot(); | |
rmcilroy
2014/10/06 15:41:03
You are already doing this in TestBlinkWebUnitTest
baixo
2014/10/07 14:53:27
Done.
| |
27 #endif | |
28 | |
20 #if !defined(OS_IOS) | 29 #if !defined(OS_IOS) |
21 blink_test_support_.reset(new TestBlinkWebUnitTestSupport); | 30 blink_test_support_.reset(new TestBlinkWebUnitTestSupport); |
22 #endif | 31 #endif |
23 } | 32 } |
24 | 33 |
25 UnitTestTestSuite::~UnitTestTestSuite() { | 34 UnitTestTestSuite::~UnitTestTestSuite() { |
26 #if !defined(OS_IOS) | 35 #if !defined(OS_IOS) |
27 blink_test_support_.reset(); | 36 blink_test_support_.reset(); |
28 #endif | 37 #endif |
29 } | 38 } |
30 | 39 |
31 int UnitTestTestSuite::Run() { | 40 int UnitTestTestSuite::Run() { |
32 return test_suite_->Run(); | 41 return test_suite_->Run(); |
33 } | 42 } |
34 | 43 |
35 } // namespace content | 44 } // namespace content |
OLD | NEW |