Index: net/base/file_stream_unittest.cc |
diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc |
index 76099294fca46c030b64698b5aef6107bac0df02..1522da06e64df599542819cb5ad24dc3518e55e4 100644 |
--- a/net/base/file_stream_unittest.cc |
+++ b/net/base/file_stream_unittest.cc |
@@ -16,8 +16,8 @@ |
#include "base/run_loop.h" |
#include "base/strings/string_util.h" |
#include "base/synchronization/waitable_event.h" |
-#include "base/test/sequenced_worker_pool_owner.h" |
#include "base/test/test_timeouts.h" |
+#include "base/threading/thread.h" |
#include "base/threading/thread_restrictions.h" |
#include "base/threading/thread_task_runner_handle.h" |
#include "net/base/io_buffer.h" |
@@ -727,10 +727,12 @@ TEST_F(FileStreamTest, WriteClose) { |
} |
TEST_F(FileStreamTest, OpenAndDelete) { |
- base::SequencedWorkerPoolOwner pool_owner(1, "StreamTest"); |
+ base::Thread worker_thread("StreamTest"); |
+ ASSERT_TRUE(worker_thread.Start()); |
bool prev = base::ThreadRestrictions::SetIOAllowed(false); |
- std::unique_ptr<FileStream> stream(new FileStream(pool_owner.pool())); |
+ std::unique_ptr<FileStream> stream( |
+ new FileStream(worker_thread.task_runner())); |
int flags = base::File::FLAG_OPEN | base::File::FLAG_WRITE | |
base::File::FLAG_ASYNC; |
TestCompletionCallback open_callback; |
@@ -742,7 +744,8 @@ TEST_F(FileStreamTest, OpenAndDelete) { |
stream.reset(); |
// Force an operation through the pool. |
eroman
2016/09/14 19:54:02
Rename/clarify "pool" in this comment?
gab
2016/09/14 20:08:47
Done.
|
- std::unique_ptr<FileStream> stream2(new FileStream(pool_owner.pool())); |
+ std::unique_ptr<FileStream> stream2( |
+ new FileStream(worker_thread.task_runner())); |
TestCompletionCallback open_callback2; |
rv = stream2->Open(temp_file_path(), flags, open_callback2.callback()); |
EXPECT_THAT(open_callback2.GetResult(rv), IsOk()); |