| Index: components/dom_distiller/core/distilled_content_store_unittest.cc
|
| diff --git a/components/dom_distiller/core/distilled_content_store_unittest.cc b/components/dom_distiller/core/distilled_content_store_unittest.cc
|
| index 6a3ad46f42047328467e116fc7acfaa836e039f8..96583b4b0a0bbd67c166fac45910cac90c813a37 100644
|
| --- a/components/dom_distiller/core/distilled_content_store_unittest.cc
|
| +++ b/components/dom_distiller/core/distilled_content_store_unittest.cc
|
| @@ -86,14 +86,14 @@ TEST_F(InMemoryContentStoreTest, SaveAndLoadSingleArticle) {
|
| stored_proto,
|
| base::Bind(&InMemoryContentStoreTest::OnSaveCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(save_success_);
|
| save_success_ = false;
|
|
|
| store_->LoadContent(entry,
|
| base::Bind(&InMemoryContentStoreTest::OnLoadCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(load_success_);
|
| EXPECT_EQ(stored_proto.SerializeAsString(),
|
| loaded_proto_->SerializeAsString());
|
| @@ -107,7 +107,7 @@ TEST_F(InMemoryContentStoreTest, LoadNonExistentArticle) {
|
| store_->LoadContent(entry,
|
| base::Bind(&InMemoryContentStoreTest::OnLoadCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_FALSE(load_success_);
|
| }
|
|
|
| @@ -124,7 +124,7 @@ TEST_F(InMemoryContentStoreTest, SaveAndLoadMultipleArticles) {
|
| first_stored_proto,
|
| base::Bind(&InMemoryContentStoreTest::OnSaveCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(save_success_);
|
| save_success_ = false;
|
|
|
| @@ -137,7 +137,7 @@ TEST_F(InMemoryContentStoreTest, SaveAndLoadMultipleArticles) {
|
| second_stored_proto,
|
| base::Bind(&InMemoryContentStoreTest::OnSaveCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(save_success_);
|
| save_success_ = false;
|
|
|
| @@ -145,7 +145,7 @@ TEST_F(InMemoryContentStoreTest, SaveAndLoadMultipleArticles) {
|
| store_->LoadContent(second_entry,
|
| base::Bind(&InMemoryContentStoreTest::OnLoadCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(load_success_);
|
| load_success_ = false;
|
| EXPECT_EQ(second_stored_proto.SerializeAsString(),
|
| @@ -156,7 +156,7 @@ TEST_F(InMemoryContentStoreTest, SaveAndLoadMultipleArticles) {
|
| store_->LoadContent(first_entry,
|
| base::Bind(&InMemoryContentStoreTest::OnLoadCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(load_success_);
|
| EXPECT_EQ(first_stored_proto.SerializeAsString(),
|
| loaded_proto_->SerializeAsString());
|
| @@ -179,7 +179,7 @@ TEST_F(InMemoryContentStoreTest, SaveAndLoadMoreThanMaxArticles) {
|
| first_stored_proto,
|
| base::Bind(&InMemoryContentStoreTest::OnSaveCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(save_success_);
|
| save_success_ = false;
|
|
|
| @@ -192,7 +192,7 @@ TEST_F(InMemoryContentStoreTest, SaveAndLoadMoreThanMaxArticles) {
|
| second_stored_proto,
|
| base::Bind(&InMemoryContentStoreTest::OnSaveCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(save_success_);
|
| save_success_ = false;
|
|
|
| @@ -204,7 +204,7 @@ TEST_F(InMemoryContentStoreTest, SaveAndLoadMoreThanMaxArticles) {
|
| third_stored_proto,
|
| base::Bind(&InMemoryContentStoreTest::OnSaveCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(save_success_);
|
| save_success_ = false;
|
|
|
| @@ -213,7 +213,7 @@ TEST_F(InMemoryContentStoreTest, SaveAndLoadMoreThanMaxArticles) {
|
| store_->LoadContent(first_entry,
|
| base::Bind(&InMemoryContentStoreTest::OnLoadCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(load_success_);
|
| load_success_ = false;
|
| EXPECT_EQ(first_stored_proto.SerializeAsString(),
|
| @@ -229,7 +229,7 @@ TEST_F(InMemoryContentStoreTest, SaveAndLoadMoreThanMaxArticles) {
|
| fourth_stored_proto,
|
| base::Bind(&InMemoryContentStoreTest::OnSaveCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(save_success_);
|
| save_success_ = false;
|
|
|
| @@ -238,7 +238,7 @@ TEST_F(InMemoryContentStoreTest, SaveAndLoadMoreThanMaxArticles) {
|
| store_->LoadContent(second_entry,
|
| base::Bind(&InMemoryContentStoreTest::OnLoadCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| // Since the store can only contain |kMaxNumArticles| entries, this load
|
| // should fail.
|
| EXPECT_FALSE(load_success_);
|
| @@ -254,7 +254,7 @@ TEST_F(InMemoryContentStoreTest, LookupArticleByURL) {
|
| stored_proto,
|
| base::Bind(&InMemoryContentStoreTest::OnSaveCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(save_success_);
|
| save_success_ = false;
|
|
|
| @@ -263,7 +263,7 @@ TEST_F(InMemoryContentStoreTest, LookupArticleByURL) {
|
| store_->LoadContent(lookup_entry1,
|
| base::Bind(&InMemoryContentStoreTest::OnLoadCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(load_success_);
|
| EXPECT_EQ(stored_proto.SerializeAsString(),
|
| loaded_proto_->SerializeAsString());
|
| @@ -274,7 +274,7 @@ TEST_F(InMemoryContentStoreTest, LookupArticleByURL) {
|
| store_->LoadContent(lookup_entry2,
|
| base::Bind(&InMemoryContentStoreTest::OnLoadCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(load_success_);
|
| EXPECT_EQ(stored_proto.SerializeAsString(),
|
| loaded_proto_->SerializeAsString());
|
| @@ -297,7 +297,7 @@ TEST_F(InMemoryContentStoreTest, LoadArticleByURLAfterExpungedFromCache) {
|
| first_stored_proto,
|
| base::Bind(&InMemoryContentStoreTest::OnSaveCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(save_success_);
|
| save_success_ = false;
|
|
|
| @@ -308,7 +308,7 @@ TEST_F(InMemoryContentStoreTest, LoadArticleByURLAfterExpungedFromCache) {
|
| store_->LoadContent(first_entry_lookup,
|
| base::Bind(&InMemoryContentStoreTest::OnLoadCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(load_success_);
|
| EXPECT_EQ(first_stored_proto.SerializeAsString(),
|
| loaded_proto_->SerializeAsString());
|
| @@ -322,7 +322,7 @@ TEST_F(InMemoryContentStoreTest, LoadArticleByURLAfterExpungedFromCache) {
|
| second_stored_proto,
|
| base::Bind(&InMemoryContentStoreTest::OnSaveCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_TRUE(save_success_);
|
| save_success_ = false;
|
|
|
| @@ -330,7 +330,7 @@ TEST_F(InMemoryContentStoreTest, LoadArticleByURLAfterExpungedFromCache) {
|
| store_->LoadContent(first_entry_lookup,
|
| base::Bind(&InMemoryContentStoreTest::OnLoadCallback,
|
| base::Unretained(this)));
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| EXPECT_FALSE(load_success_);
|
| }
|
|
|
|
|