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

Unified Diff: content/public/test/browser_test_base.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/browser/browser_main_loop.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/browser_test_base.cc
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc
index 0b510beb8b483eefcdec4d63d0ceac8e1fa3d53e..2333cceee12396f5938785a2917750cb748aeeef 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -17,6 +17,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/sys_info.h"
#include "base/test/test_timeouts.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "build/build_config.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/tracing/tracing_controller_impl.h"
@@ -165,6 +166,13 @@ BrowserTestBase::BrowserTestBase()
base::i18n::AllowMultipleInitializeCallsForTesting();
embedded_test_server_.reset(new net::EmbeddedTestServer);
+
+ // SequencedWorkerPool is enabled by default in tests (see
+ // base::TestSuite::Initialize). In browser tests, disable it and expect it
+ // to be re-enabled as part of BrowserMainLoop::PreCreateThreads().
+ // TODO(fdoray): Remove this once the SequencedWorkerPool to TaskScheduler
+ // redirection experiment concludes https://crbug.com/622400.
+ base::SequencedWorkerPool::DisableForProcessForTesting();
}
BrowserTestBase::~BrowserTestBase() {
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698