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

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

Issue 1088933002: Revert of Add a WorkerScheduler and a WebThreadImplForWorker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/renderer/scheduler/webthread_impl_for_scheduler_unittest.cc ('k') | no next file » | 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"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "content/renderer/scheduler/renderer_scheduler.h" 12 #include "content/renderer/scheduler/renderer_scheduler.h"
13 #include "content/renderer/scheduler/web_scheduler_impl.h" 13 #include "content/renderer/scheduler/web_scheduler_impl.h"
14 #include "content/renderer/scheduler/webthread_impl_for_renderer_scheduler.h" 14 #include "content/renderer/scheduler/webthread_impl_for_scheduler.h"
15 #include "content/test/mock_webclipboard_impl.h" 15 #include "content/test/mock_webclipboard_impl.h"
16 #include "content/test/web_gesture_curve_mock.h" 16 #include "content/test/web_gesture_curve_mock.h"
17 #include "content/test/web_layer_tree_view_impl_for_testing.h" 17 #include "content/test/web_layer_tree_view_impl_for_testing.h"
18 #include "content/test/weburl_loader_mock_factory.h" 18 #include "content/test/weburl_loader_mock_factory.h"
19 #include "media/base/media.h" 19 #include "media/base/media.h"
20 #include "net/cookies/cookie_monster.h" 20 #include "net/cookies/cookie_monster.h"
21 #include "net/test/spawned_test_server/spawned_test_server.h" 21 #include "net/test/spawned_test_server/spawned_test_server.h"
22 #include "storage/browser/database/vfs_backend.h" 22 #include "storage/browser/database/vfs_backend.h"
23 #include "third_party/WebKit/public/platform/WebData.h" 23 #include "third_party/WebKit/public/platform/WebData.h"
24 #include "third_party/WebKit/public/platform/WebFileSystem.h" 24 #include "third_party/WebKit/public/platform/WebFileSystem.h"
(...skipping 27 matching lines...) Expand all
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::V8Initializer::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( 62 web_thread_.reset(new WebThreadImplForScheduler(renderer_scheduler_.get()));
63 new WebThreadImplForRendererScheduler(renderer_scheduler_.get()));
64 } 63 }
65 64
66 blink::initialize(this); 65 blink::initialize(this);
67 blink::setLayoutTestMode(true); 66 blink::setLayoutTestMode(true);
68 blink::WebSecurityPolicy::registerURLSchemeAsLocal( 67 blink::WebSecurityPolicy::registerURLSchemeAsLocal(
69 blink::WebString::fromUTF8("test-shell-resource")); 68 blink::WebString::fromUTF8("test-shell-resource"));
70 blink::WebSecurityPolicy::registerURLSchemeAsNoAccess( 69 blink::WebSecurityPolicy::registerURLSchemeAsNoAccess(
71 blink::WebString::fromUTF8("test-shell-resource")); 70 blink::WebString::fromUTF8("test-shell-resource"));
72 blink::WebSecurityPolicy::registerURLSchemeAsDisplayIsolated( 71 blink::WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(
73 blink::WebString::fromUTF8("test-shell-resource")); 72 blink::WebString::fromUTF8("test-shell-resource"));
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 return web_scheduler_.get(); 318 return web_scheduler_.get();
320 } 319 }
321 320
322 blink::WebThread* TestBlinkWebUnitTestSupport::currentThread() { 321 blink::WebThread* TestBlinkWebUnitTestSupport::currentThread() {
323 if (web_thread_ && web_thread_->isCurrentThread()) 322 if (web_thread_ && web_thread_->isCurrentThread())
324 return web_thread_.get(); 323 return web_thread_.get();
325 return BlinkPlatformImpl::currentThread(); 324 return BlinkPlatformImpl::currentThread();
326 } 325 }
327 326
328 } // namespace content 327 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/scheduler/webthread_impl_for_scheduler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698