Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1209)

Unified Diff: chrome/browser/android/offline_pages/offline_page_utils_unittest.cc

Issue 2418583002: Fix OfflinePageUtilsTest.CheckExistenceOfPagesWithURL. (Closed)
Patch Set: CR Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
diff --git a/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc b/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
index 80772e7944261d6ecc7a0dac047779f77c83ef8d..01d17afcb231c5555d094ac1c42bf2c9d8a0a188 100644
--- a/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
+++ b/chrome/browser/android/offline_pages/offline_page_utils_unittest.cc
@@ -13,8 +13,8 @@
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
+#include "base/run_loop.h"
#include "base/strings/string16.h"
-#include "base/test/test_simple_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
#include "chrome/browser/android/offline_pages/test_offline_page_model_builder.h"
@@ -26,6 +26,7 @@
#include "components/offline_pages/offline_page_test_archiver.h"
#include "components/offline_pages/offline_page_test_store.h"
#include "components/offline_pages/offline_page_types.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "net/base/filename_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -79,17 +80,13 @@ class OfflinePageUtilsTest
const GURL& url,
const base::FilePath& file_name);
+ content::TestBrowserThreadBundle browser_thread_bundle_;
int64_t offline_id_;
GURL url_;
-
- scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
- base::ThreadTaskRunnerHandle task_runner_handle_;
TestingProfile profile_;
};
-OfflinePageUtilsTest::OfflinePageUtilsTest()
- : task_runner_(new base::TestSimpleTaskRunner),
- task_runner_handle_(task_runner_) {}
+OfflinePageUtilsTest::OfflinePageUtilsTest() = default;
OfflinePageUtilsTest::~OfflinePageUtilsTest() {}
@@ -113,7 +110,7 @@ void OfflinePageUtilsTest::SetUp() {
}
void OfflinePageUtilsTest::RunUntilIdle() {
- task_runner_->RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
}
void OfflinePageUtilsTest::OnSavePageDone(SavePageResult result,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698