Commit b4a2f773 authored by tzik's avatar tzik Committed by Commit Bot

Remove BrowserThread dependency from FileSystemOperationRunnerTest

Change-Id: I7ecaf4c2924ad4f8937f607b9478ab3636d3459b
Reviewed-on: https://chromium-review.googlesource.com/597559Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491329}
parent 65db7edc
......@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/run_loop.h"
#include "base/task_scheduler/post_task.h"
#include "base/task_scheduler/task_scheduler.h"
#include "base/task_scheduler/task_traits.h"
#include "base/test/scoped_task_environment.h"
#include "base/threading/thread_restrictions.h"
......@@ -238,13 +239,8 @@ TEST_F(MultiThreadFileSystemOperationRunnerTest, OpenAndShutdown) {
base::Bind(&DidOpenFile));
operation_runner()->Shutdown();
// Wait until the task posted on FILE thread is done.
base::RunLoop run_loop;
BrowserThread::PostTaskAndReply(
BrowserThread::FILE, FROM_HERE,
base::Bind(&base::DoNothing),
run_loop.QuitClosure());
run_loop.Run();
// Wait until the task posted on the blocking thread is done.
base::TaskScheduler::GetInstance()->FlushForTesting();
// This should finish without thread assertion failure on debug build.
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment