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

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
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e5df94ac1ede01650e93e5e046746baa1b69d4ad..eec899e109cb7d0a8f6ea7c476365c6cac885a46 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());
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698