diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 10:22:43 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 12:36:28 +0000 |
commit | 271a6c3487a14599023a9106329505597638d793 (patch) | |
tree | e040d58ffc86c1480b79ca8528020ca9ec919bf8 /chromium/content/browser/browser_main_loop_unittest.cc | |
parent | 7b2ffa587235a47d4094787d72f38102089f402a (diff) | |
download | qtwebengine-chromium-271a6c3487a14599023a9106329505597638d793.tar.gz |
BASELINE: Update Chromium to 77.0.3865.59
Change-Id: I1e89a5f3b009a9519a6705102ad65c92fe736f21
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/content/browser/browser_main_loop_unittest.cc')
-rw-r--r-- | chromium/content/browser/browser_main_loop_unittest.cc | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/chromium/content/browser/browser_main_loop_unittest.cc b/chromium/content/browser/browser_main_loop_unittest.cc index 4c9e0734004..f3ed33e4973 100644 --- a/chromium/content/browser/browser_main_loop_unittest.cc +++ b/chromium/content/browser/browser_main_loop_unittest.cc @@ -13,7 +13,6 @@ #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/service_manager/service_manager_context.h" #include "content/browser/startup_data_impl.h" #include "content/browser/startup_helper.h" #include "content/public/browser/browser_thread.h" @@ -59,34 +58,31 @@ class BrowserMainLoopTest : public testing::Test { // Verify that a single-process browser process has at least as many threads as // the number of cores in its foreground pool. TEST_F(BrowserMainLoopTest, CreateThreadsInSingleProcess) { - { - MainFunctionParams main_function_params(GetProcessCommandLine()); - - BrowserMainLoop browser_main_loop( - main_function_params, - std::make_unique<base::ThreadPoolInstance::ScopedExecutionFence>()); - browser_main_loop.MainMessageLoopStart(); - browser_main_loop.Init(); - browser_main_loop.CreateThreads(); - EXPECT_GE(base::ThreadPoolInstance::Get() - ->GetMaxConcurrentNonBlockedTasksWithTraitsDeprecated( - {base::TaskPriority::USER_VISIBLE}), - base::SysInfo::NumberOfProcessors() - 1); - browser_main_loop.ShutdownThreadsAndCleanUp(); - } + MainFunctionParams main_function_params(GetProcessCommandLine()); + + StartupDataImpl startup_data; + startup_data.ipc_thread = BrowserTaskExecutor::CreateIOThread(); + main_function_params.startup_data = &startup_data; + + BrowserMainLoop browser_main_loop( + main_function_params, + std::make_unique<base::ThreadPoolInstance::ScopedExecutionFence>()); + browser_main_loop.MainMessageLoopStart(); + browser_main_loop.Init(); + browser_main_loop.CreateThreads(); + EXPECT_GE(base::ThreadPoolInstance::Get() + ->GetMaxConcurrentNonBlockedTasksWithTraitsDeprecated( + {base::TaskPriority::USER_VISIBLE}), + base::SysInfo::NumberOfProcessors() - 1); + browser_main_loop.ShutdownThreadsAndCleanUp(); } TEST_F(BrowserMainLoopTest, PostTaskToIOThreadBeforeThreadCreationDoesNotRunTask) { MainFunctionParams main_function_params(GetProcessCommandLine()); - auto service_manager_thread = BrowserTaskExecutor::CreateIOThread(); - ServiceManagerContext service_manager_context( - service_manager_thread->task_runner()); - StartupDataImpl startup_data; - startup_data.thread = std::move(service_manager_thread); - startup_data.service_manager_context = &service_manager_context; + startup_data.ipc_thread = BrowserTaskExecutor::CreateIOThread(); main_function_params.startup_data = &startup_data; BrowserMainLoop browser_main_loop( |