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

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

Issue 878413002: Wire the scheduler up in TestBlinkWebUnitTestSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Lazily create the WebSchedulerImpl and RendererScheduler if needed Created 5 years, 10 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/test_blink_web_unit_test_support.h ('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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
11 #include "base/metrics/stats_counters.h" 11 #include "base/metrics/stats_counters.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "content/public/common/content_switches.h" 14 #include "content/public/common/content_switches.h"
15 #include "content/renderer/scheduler/renderer_scheduler.h"
16 #include "content/renderer/scheduler/web_scheduler_impl.h"
15 #include "content/test/mock_webclipboard_impl.h" 17 #include "content/test/mock_webclipboard_impl.h"
16 #include "content/test/web_gesture_curve_mock.h" 18 #include "content/test/web_gesture_curve_mock.h"
17 #include "content/test/web_layer_tree_view_impl_for_testing.h" 19 #include "content/test/web_layer_tree_view_impl_for_testing.h"
18 #include "content/test/weburl_loader_mock_factory.h" 20 #include "content/test/weburl_loader_mock_factory.h"
19 #include "media/base/media.h" 21 #include "media/base/media.h"
20 #include "net/cookies/cookie_monster.h" 22 #include "net/cookies/cookie_monster.h"
21 #include "net/test/spawned_test_server/spawned_test_server.h" 23 #include "net/test/spawned_test_server/spawned_test_server.h"
22 #include "storage/browser/database/vfs_backend.h" 24 #include "storage/browser/database/vfs_backend.h"
23 #include "third_party/WebKit/public/platform/WebData.h" 25 #include "third_party/WebKit/public/platform/WebData.h"
24 #include "third_party/WebKit/public/platform/WebFileSystem.h" 26 #include "third_party/WebKit/public/platform/WebFileSystem.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 314
313 return blink::WebData(buffer.data(), buffer.size()); 315 return blink::WebData(buffer.data(), buffer.size());
314 } 316 }
315 317
316 bool TestBlinkWebUnitTestSupport::getBlobItems( 318 bool TestBlinkWebUnitTestSupport::getBlobItems(
317 const blink::WebString& uuid, 319 const blink::WebString& uuid,
318 blink::WebVector<blink::WebBlobData::Item*>* items) { 320 blink::WebVector<blink::WebBlobData::Item*>* items) {
319 return blob_registry_.GetBlobItems(uuid, items); 321 return blob_registry_.GetBlobItems(uuid, items);
320 } 322 }
321 323
324 blink::WebScheduler* TestBlinkWebUnitTestSupport::scheduler() {
325 // Lazily create the WebSchedulerImpl and RendererScheduler if needed.
326 if (!web_scheduler_) {
327 if (!renderer_scheduler_)
328 renderer_scheduler_ = RendererScheduler::Create();
329 web_scheduler_.reset(new WebSchedulerImpl(renderer_scheduler_.get()));
330 }
331 return web_scheduler_.get();
332 }
333
322 } // namespace content 334 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_blink_web_unit_test_support.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698