| Index: content/browser/appcache/appcache_response_unittest.cc
|
| diff --git a/content/browser/appcache/appcache_response_unittest.cc b/content/browser/appcache/appcache_response_unittest.cc
|
| index 3fd5f1c51c93a2ef1f036f22e6dd18f5d89aea80..34ed2c41f715d0a050ae4f630df3eb053dac6dc9 100644
|
| --- a/content/browser/appcache/appcache_response_unittest.cc
|
| +++ b/content/browser/appcache/appcache_response_unittest.cc
|
| @@ -15,10 +15,10 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/location.h"
|
| #include "base/macros.h"
|
| -#include "base/message_loop/message_loop.h"
|
| #include "base/pickle.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/synchronization/waitable_event.h"
|
| +#include "base/test/scoped_task_environment.h"
|
| #include "base/threading/thread.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| #include "content/browser/appcache/appcache_response.h"
|
| @@ -69,13 +69,15 @@ class AppCacheResponseTest : public testing::Test {
|
| }
|
|
|
| static void SetUpTestCase() {
|
| + scoped_task_environment_.reset(new base::test::ScopedTaskEnvironment);
|
| io_thread_.reset(new base::Thread("AppCacheResponseTest Thread"));
|
| base::Thread::Options options(base::MessageLoop::TYPE_IO, 0);
|
| io_thread_->StartWithOptions(options);
|
| }
|
|
|
| static void TearDownTestCase() {
|
| - io_thread_.reset(NULL);
|
| + io_thread_.reset();
|
| + scoped_task_environment_.reset();
|
| }
|
|
|
| AppCacheResponseTest() {}
|
| @@ -784,10 +786,14 @@ class AppCacheResponseTest : public testing::Test {
|
| bool write_callback_was_called_;
|
|
|
| static std::unique_ptr<base::Thread> io_thread_;
|
| + static std::unique_ptr<base::test::ScopedTaskEnvironment>
|
| + scoped_task_environment_;
|
| };
|
|
|
| // static
|
| std::unique_ptr<base::Thread> AppCacheResponseTest::io_thread_;
|
| +std::unique_ptr<base::test::ScopedTaskEnvironment>
|
| + AppCacheResponseTest::scoped_task_environment_;
|
|
|
| TEST_F(AppCacheResponseTest, ReadNonExistentResponse) {
|
| RunTestOnIOThread(&AppCacheResponseTest::ReadNonExistentResponse);
|
|
|