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

Unified 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, 11 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_blink_web_unit_test_support.cc
diff --git a/content/test/test_blink_web_unit_test_support.cc b/content/test/test_blink_web_unit_test_support.cc
index b358a0e5c1d6a44f557aa10c690866beb6925f61..77bd9e6220c210d128cbdfe7ac7858bfb602d7ec 100644
--- a/content/test/test_blink_web_unit_test_support.cc
+++ b/content/test/test_blink_web_unit_test_support.cc
@@ -12,6 +12,8 @@
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "content/public/common/content_switches.h"
+#include "content/renderer/scheduler/renderer_scheduler.h"
+#include "content/renderer/scheduler/web_scheduler_impl.h"
#include "content/test/mock_webclipboard_impl.h"
#include "content/test/web_gesture_curve_mock.h"
#include "content/test/web_layer_tree_view_impl_for_testing.h"
@@ -319,4 +321,14 @@ bool TestBlinkWebUnitTestSupport::getBlobItems(
return blob_registry_.GetBlobItems(uuid, items);
}
+blink::WebScheduler* TestBlinkWebUnitTestSupport::scheduler() {
+ // Lazily create the WebSchedulerImpl and RendererScheduler if needed.
+ if (!web_scheduler_) {
+ if (!renderer_scheduler_)
+ renderer_scheduler_ = RendererScheduler::Create();
+ web_scheduler_.reset(new WebSchedulerImpl(renderer_scheduler_.get()));
+ }
+ return web_scheduler_.get();
+}
+
} // namespace content
« 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