OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/test_blink_web_unit_test_support.h" | 5 #include "content/test/test_blink_web_unit_test_support.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/feature_list.h" | 8 #include "base/feature_list.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 base::mac::ScopedNSAutoreleasePool autorelease_pool; | 98 base::mac::ScopedNSAutoreleasePool autorelease_pool; |
99 #endif | 99 #endif |
100 | 100 |
101 url_loader_factory_ = blink::WebURLLoaderMockFactory::Create(); | 101 url_loader_factory_ = blink::WebURLLoaderMockFactory::Create(); |
102 mock_clipboard_.reset(new MockWebClipboardImpl()); | 102 mock_clipboard_.reset(new MockWebClipboardImpl()); |
103 | 103 |
104 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 104 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
105 gin::V8Initializer::LoadV8Snapshot(); | 105 gin::V8Initializer::LoadV8Snapshot(); |
106 gin::V8Initializer::LoadV8Natives(); | 106 gin::V8Initializer::LoadV8Natives(); |
107 #endif | 107 #endif |
| 108 gin::V8Initializer::LoadV8Context(); |
108 | 109 |
109 scoped_refptr<base::SingleThreadTaskRunner> dummy_task_runner; | 110 scoped_refptr<base::SingleThreadTaskRunner> dummy_task_runner; |
110 std::unique_ptr<base::ThreadTaskRunnerHandle> dummy_task_runner_handle; | 111 std::unique_ptr<base::ThreadTaskRunnerHandle> dummy_task_runner_handle; |
111 if (!base::ThreadTaskRunnerHandle::IsSet()) { | 112 if (!base::ThreadTaskRunnerHandle::IsSet()) { |
112 // Dummy task runner is initialized here because the blink::initialize | 113 // Dummy task runner is initialized here because the blink::initialize |
113 // creates IsolateHolder which needs the current task runner handle. There | 114 // creates IsolateHolder which needs the current task runner handle. There |
114 // should be no task posted to this task runner. The message loop is not | 115 // should be no task posted to this task runner. The message loop is not |
115 // created before this initialization because some tests need specific kinds | 116 // created before this initialization because some tests need specific kinds |
116 // of message loops, and their types are not known upfront. Some tests also | 117 // of message loops, and their types are not known upfront. Some tests also |
117 // create their own thread bundles or message loops, and doing the same in | 118 // create their own thread bundles or message loops, and doing the same in |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 blink::WebRTCCertificateGenerator* | 333 blink::WebRTCCertificateGenerator* |
333 TestBlinkWebUnitTestSupport::CreateRTCCertificateGenerator() { | 334 TestBlinkWebUnitTestSupport::CreateRTCCertificateGenerator() { |
334 #if BUILDFLAG(ENABLE_WEBRTC) | 335 #if BUILDFLAG(ENABLE_WEBRTC) |
335 return new TestWebRTCCertificateGenerator(); | 336 return new TestWebRTCCertificateGenerator(); |
336 #else | 337 #else |
337 return nullptr; | 338 return nullptr; |
338 #endif | 339 #endif |
339 } | 340 } |
340 | 341 |
341 } // namespace content | 342 } // namespace content |
OLD | NEW |