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

Unified Diff: content/renderer/render_thread_impl_browsertest.cc

Issue 2445763002: Disallow posting tasks to SequencedWorkerPools by default. (Closed)
Patch Set: self-review Created 4 years, 1 month 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/renderer/render_thread_impl_browsertest.cc
diff --git a/content/renderer/render_thread_impl_browsertest.cc b/content/renderer/render_thread_impl_browsertest.cc
index 73d3748e4ffde96483970ad0fa703c1d794c19e2..4a7353c80df79a38009f26c374281c5f3023e33c 100644
--- a/content/renderer/render_thread_impl_browsertest.cc
+++ b/content/renderer/render_thread_impl_browsertest.cc
@@ -15,6 +15,7 @@
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/thread_task_runner_handle.h"
#include "cc/output/buffer_to_texture_target_map.h"
#include "content/app/mojo/mojo_init.h"
@@ -167,6 +168,12 @@ class QuitOnTestMsgFilter : public IPC::MessageFilter {
class RenderThreadImplBrowserTest : public testing::Test {
public:
void SetUp() override {
+ // SequencedWorkerPool is enabled by default in tests. Disable it for this
+ // test to avoid a DCHECK failure when RenderThreadImpl::Init enables it.
+ // TODO(fdoray): Remove this once the SequencedWorkerPool to TaskScheduler
+ // redirection experiment concludes https://crbug.com/622400.
+ base::SequencedWorkerPool::DisableForProcessForTesting();
+
content_renderer_client_.reset(new ContentRendererClient());
SetRendererClientForTesting(content_renderer_client_.get());
« chrome/browser/chrome_browser_main.cc ('K') | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698