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

Unified Diff: content/test/test_blink_web_unit_test_support.cc

Issue 2118903002: scheduler: Move the Blink scheduler into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another GYP fix Created 4 years, 5 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
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 47ae6f00dfea391609fc6020f0a9cee626cbf73b..39a75448c5962cd5b4f1b663cd9c86fb5257d01f 100644
--- a/content/test/test_blink_web_unit_test_support.cc
+++ b/content/test/test_blink_web_unit_test_support.cc
@@ -18,9 +18,6 @@
#include "build/build_config.h"
#include "cc/blink/web_layer_impl.h"
#include "cc/trees/layer_tree_settings.h"
-#include "components/scheduler/renderer/renderer_scheduler_impl.h"
-#include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h"
-#include "components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tests.h"
#include "content/child/web_url_loader_impl.h"
#include "content/test/mock_webclipboard_impl.h"
#include "content/test/web_gesture_curve_mock.h"
@@ -31,9 +28,10 @@
#include "third_party/WebKit/public/platform/WebData.h"
#include "third_party/WebKit/public/platform/WebPluginListBuilder.h"
#include "third_party/WebKit/public/platform/WebString.h"
-#include "third_party/WebKit/public/platform/WebTaskRunner.h"
#include "third_party/WebKit/public/platform/WebThread.h"
#include "third_party/WebKit/public/platform/WebURL.h"
+#include "third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h"
+#include "third_party/WebKit/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebNetworkStateNotifier.h"
#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
@@ -111,8 +109,7 @@ TestBlinkWebUnitTestSupport::TestBlinkWebUnitTestSupport() {
dummy_task_runner_handle.reset(
new base::ThreadTaskRunnerHandle(dummy_task_runner));
}
- renderer_scheduler_ = base::WrapUnique(new scheduler::RendererSchedulerImpl(
- scheduler::LazySchedulerMessageLoopDelegateForTests::Create()));
+ renderer_scheduler_ = blink::scheduler::CreateRendererSchedulerForTests();
web_thread_ = renderer_scheduler_->CreateMainThread();
// Set up a FeatureList instance, so that code using that API will not hit a
@@ -188,11 +185,9 @@ blink::WebMimeRegistry* TestBlinkWebUnitTestSupport::mimeRegistry() {
}
blink::WebURLLoader* TestBlinkWebUnitTestSupport::createURLLoader() {
- blink::WebThread* currentThread = Platform::current()->currentThread();
// This loader should be used only for process-local resources such as
// data URLs.
- blink::WebURLLoader* default_loader = new WebURLLoaderImpl(
- nullptr, base::WrapUnique(currentThread->getWebTaskRunner()->clone()));
+ blink::WebURLLoader* default_loader = new WebURLLoaderImpl(nullptr);
return url_loader_factory_->createURLLoader(default_loader);
}

Powered by Google App Engine
This is Rietveld 408576698