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

Unified Diff: components/dom_distiller/core/distiller_unittest.cc

Issue 493853006: Remove DistilledPageInfo and related structs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed DCHECK Created 6 years, 3 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 | « components/dom_distiller/core/distiller_page.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/distiller_unittest.cc
diff --git a/components/dom_distiller/core/distiller_unittest.cc b/components/dom_distiller/core/distiller_unittest.cc
index 109912f69f72831d8aa9e95ce708a8c0b10548d6..e6e7797b58de6fc7b72d9ff00d72ad5c8023d0d2 100644
--- a/components/dom_distiller/core/distiller_unittest.cc
+++ b/components/dom_distiller/core/distiller_unittest.cc
@@ -167,7 +167,7 @@ void VerifyArticleProtoMatchesMultipageData(
const dom_distiller::DistilledArticleProto* article_proto,
const MultipageDistillerData* distiller_data,
size_t pages_size) {
- EXPECT_EQ(pages_size, static_cast<size_t>(article_proto->pages_size()));
+ ASSERT_EQ(pages_size, static_cast<size_t>(article_proto->pages_size()));
EXPECT_EQ(kTitle, article_proto->title());
for (size_t page_num = 0; page_num < pages_size; ++page_num) {
const dom_distiller::DistilledPageProto& page =
@@ -335,7 +335,7 @@ TEST_F(DistillerTest, DistillPage) {
DistillPage(kURL, CreateMockDistillerPage(result.get(), GURL(kURL)).Pass());
base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kTitle, article_proto_->title());
- EXPECT_EQ(article_proto_->pages_size(), 1);
+ ASSERT_EQ(article_proto_->pages_size(), 1);
const DistilledPageProto& first_page = article_proto_->pages(0);
EXPECT_EQ(kContent, first_page.html());
EXPECT_EQ(kURL, first_page.url());
@@ -353,11 +353,11 @@ TEST_F(DistillerTest, DistillPageWithImages) {
DistillPage(kURL, CreateMockDistillerPage(result.get(), GURL(kURL)).Pass());
base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kTitle, article_proto_->title());
- EXPECT_EQ(article_proto_->pages_size(), 1);
+ ASSERT_EQ(article_proto_->pages_size(), 1);
const DistilledPageProto& first_page = article_proto_->pages(0);
EXPECT_EQ(kContent, first_page.html());
EXPECT_EQ(kURL, first_page.url());
- EXPECT_EQ(2, first_page.image_size());
+ ASSERT_EQ(2, first_page.image_size());
EXPECT_EQ(kImageData[0], first_page.image(0).data());
EXPECT_EQ(GetImageName(1, 0), first_page.image(0).name());
EXPECT_EQ(kImageData[1], first_page.image(1).data());
@@ -536,7 +536,7 @@ TEST_F(DistillerTest, IncrementalUpdates) {
distiller_data.get(), kNumPages, start_page_num).Pass());
base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kTitle, article_proto_->title());
- EXPECT_EQ(kNumPages, static_cast<size_t>(article_proto_->pages_size()));
+ ASSERT_EQ(kNumPages, static_cast<size_t>(article_proto_->pages_size()));
EXPECT_EQ(kNumPages, in_sequence_updates_.size());
VerifyIncrementalUpdatesMatch(
@@ -581,7 +581,7 @@ TEST_F(DistillerTest, DeletingArticleDoesNotInterfereWithUpdates) {
base::MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(kNumPages, in_sequence_updates_.size());
EXPECT_EQ(kTitle, article_proto_->title());
- EXPECT_EQ(kNumPages, static_cast<size_t>(article_proto_->pages_size()));
+ ASSERT_EQ(kNumPages, static_cast<size_t>(article_proto_->pages_size()));
// Delete the article.
article_proto_.reset();
« no previous file with comments | « components/dom_distiller/core/distiller_page.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698