summaryrefslogtreecommitdiff
path: root/chromium/content/browser/browser_main_loop_unittest.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-10 16:19:40 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-10 16:01:50 +0000
commit51f6c2793adab2d864b3d2b360000ef8db1d3e92 (patch)
tree835b3b4446b012c75e80177cef9fbe6972cc7dbe /chromium/content/browser/browser_main_loop_unittest.cc
parent6036726eb981b6c4b42047513b9d3f4ac865daac (diff)
downloadqtwebengine-chromium-51f6c2793adab2d864b3d2b360000ef8db1d3e92.tar.gz
BASELINE: Update Chromium to 71.0.3578.93
Change-Id: I6a32086c33670e1b033f8b10e6bf1fd4da1d105d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/content/browser/browser_main_loop_unittest.cc')
-rw-r--r--chromium/content/browser/browser_main_loop_unittest.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/chromium/content/browser/browser_main_loop_unittest.cc b/chromium/content/browser/browser_main_loop_unittest.cc
index a4bebc6547d..b5d345fc2d0 100644
--- a/chromium/content/browser/browser_main_loop_unittest.cc
+++ b/chromium/content/browser/browser_main_loop_unittest.cc
@@ -10,6 +10,8 @@
#include "base/task/task_scheduler/task_scheduler.h"
#include "base/test/scoped_command_line.h"
#include "content/browser/browser_thread_impl.h"
+#include "content/browser/scheduler/browser_task_executor.h"
+#include "content/browser/startup_helper.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
@@ -21,13 +23,17 @@ namespace content {
// the number of cores in its foreground pool.
TEST(BrowserMainLoopTest, CreateThreadsInSingleProcess) {
{
- base::TaskScheduler::Create("Browser");
base::test::ScopedCommandLine scoped_command_line;
scoped_command_line.GetProcessCommandLine()->AppendSwitch(
switches::kSingleProcess);
+ base::TaskScheduler::Create("Browser");
+ StartBrowserTaskScheduler();
+ BrowserTaskExecutor::Create();
MainFunctionParams main_function_params(
*scoped_command_line.GetProcessCommandLine());
- BrowserMainLoop browser_main_loop(main_function_params);
+ BrowserMainLoop browser_main_loop(
+ main_function_params,
+ std::make_unique<base::TaskScheduler::ScopedExecutionFence>());
browser_main_loop.MainMessageLoopStart();
browser_main_loop.Init();
browser_main_loop.CreateThreads();
@@ -37,6 +43,7 @@ TEST(BrowserMainLoopTest, CreateThreadsInSingleProcess) {
base::SysInfo::NumberOfProcessors() - 1);
browser_main_loop.ShutdownThreadsAndCleanUp();
}
+ BrowserTaskExecutor::ResetForTesting();
for (int id = BrowserThread::UI; id < BrowserThread::ID_COUNT; ++id) {
BrowserThreadImpl::ResetGlobalsForTesting(
static_cast<BrowserThread::ID>(id));