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

Side by Side Diff: content/test/test_blink_web_unit_test_support.cc

Issue 1011133006: Move V8 snapshot loading code from isolate_holder to gin/v8_startup_data.{h,cc}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing #ifdef in V8Initializer::Initialize. Created 5 years, 8 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 | « content/test/content_test_launcher.cc ('k') | gin/BUILD.gn » ('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 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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 21 matching lines...) Expand all
32 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" 32 #include "third_party/WebKit/public/web/WebSecurityPolicy.h"
33 #include "third_party/WebKit/public/web/WebStorageEventDispatcher.h" 33 #include "third_party/WebKit/public/web/WebStorageEventDispatcher.h"
34 #include "v8/include/v8.h" 34 #include "v8/include/v8.h"
35 35
36 #if defined(OS_MACOSX) 36 #if defined(OS_MACOSX)
37 #include "base/mac/foundation_util.h" 37 #include "base/mac/foundation_util.h"
38 #include "base/mac/scoped_nsautorelease_pool.h" 38 #include "base/mac/scoped_nsautorelease_pool.h"
39 #endif 39 #endif
40 40
41 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 41 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
42 #include "gin/public/isolate_holder.h" 42 #include "gin/v8_initializer.h"
43 #endif 43 #endif
44 44
45 namespace content { 45 namespace content {
46 46
47 TestBlinkWebUnitTestSupport::TestBlinkWebUnitTestSupport() { 47 TestBlinkWebUnitTestSupport::TestBlinkWebUnitTestSupport() {
48 #if defined(OS_MACOSX) 48 #if defined(OS_MACOSX)
49 base::mac::ScopedNSAutoreleasePool autorelease_pool; 49 base::mac::ScopedNSAutoreleasePool autorelease_pool;
50 #endif 50 #endif
51 51
52 url_loader_factory_.reset(new WebURLLoaderMockFactory()); 52 url_loader_factory_.reset(new WebURLLoaderMockFactory());
53 mock_clipboard_.reset(new MockWebClipboardImpl()); 53 mock_clipboard_.reset(new MockWebClipboardImpl());
54 54
55 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 55 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
56 gin::IsolateHolder::LoadV8Snapshot(); 56 gin::V8Initializer::LoadV8Snapshot();
57 #endif 57 #endif
58 58
59 if (base::MessageLoopProxy::current()) { 59 if (base::MessageLoopProxy::current()) {
60 renderer_scheduler_ = RendererScheduler::Create(); 60 renderer_scheduler_ = RendererScheduler::Create();
61 web_scheduler_.reset(new WebSchedulerImpl(renderer_scheduler_.get())); 61 web_scheduler_.reset(new WebSchedulerImpl(renderer_scheduler_.get()));
62 web_thread_.reset(new WebThreadImplForScheduler(renderer_scheduler_.get())); 62 web_thread_.reset(new WebThreadImplForScheduler(renderer_scheduler_.get()));
63 } 63 }
64 64
65 blink::initialize(this); 65 blink::initialize(this);
66 blink::setLayoutTestMode(true); 66 blink::setLayoutTestMode(true);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 return web_scheduler_.get(); 316 return web_scheduler_.get();
317 } 317 }
318 318
319 blink::WebThread* TestBlinkWebUnitTestSupport::currentThread() { 319 blink::WebThread* TestBlinkWebUnitTestSupport::currentThread() {
320 if (web_thread_ && web_thread_->isCurrentThread()) 320 if (web_thread_ && web_thread_->isCurrentThread())
321 return web_thread_.get(); 321 return web_thread_.get();
322 return BlinkPlatformImpl::currentThread(); 322 return BlinkPlatformImpl::currentThread();
323 } 323 }
324 324
325 } // namespace content 325 } // namespace content
OLDNEW
« no previous file with comments | « content/test/content_test_launcher.cc ('k') | gin/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698