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

Unified Diff: content/test/test_blink_web_unit_test_support.cc

Issue 890333003: TestBlinkWebUnitTestSupport to create the scheduler on the main thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | 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 77bd9e6220c210d128cbdfe7ac7858bfb602d7ec..38ecbab3f95428c7f70d9a4bd82040134b8f1000 100644
--- a/content/test/test_blink_web_unit_test_support.cc
+++ b/content/test/test_blink_web_unit_test_support.cc
@@ -64,6 +64,11 @@ TestBlinkWebUnitTestSupport::TestBlinkWebUnitTestSupport() {
gin::IsolateHolder::LoadV8Snapshot();
#endif
+ if (base::MessageLoopProxy::current()) {
Sami 2015/02/02 14:28:33 Is this ever going to be false?
alex clarke (OOO till 29th) 2015/02/02 14:30:06 Yes. The UnitTestTestSuite uses this but (unlike b
+ renderer_scheduler_ = RendererScheduler::Create();
+ web_scheduler_.reset(new WebSchedulerImpl(renderer_scheduler_.get()));
+ }
+
blink::initialize(this);
blink::mainThreadIsolate()->SetCounterFunction(
base::StatsTable::FindLocation);
@@ -322,12 +327,6 @@ bool TestBlinkWebUnitTestSupport::getBlobItems(
}
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698