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

Unified Diff: components/dom_distiller/content/distiller_page_web_contents_browsertest.cc

Issue 1130703003: Show template before distiller finishes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios-superclass
Patch Set: Fix flaky test Created 5 years, 7 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.gypi ('k') | components/dom_distiller/content/dom_distiller_viewer_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/content/distiller_page_web_contents_browsertest.cc
diff --git a/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc b/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc
index 5244a194f3eb7a28d0069b08424cef793d5b0a02..aa01a86d24ff6b386bbe018bca4079e2ba40f508 100644
--- a/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc
+++ b/components/dom_distiller/content/distiller_page_web_contents_browsertest.cc
@@ -417,42 +417,6 @@ IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, MarkupInfo) {
EXPECT_EQ(600, markup_image2.height());
}
-IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest, TestTitleNeverEmpty) {
- const std::string some_title = "some title";
- const std::string no_title =
- l10n_util::GetStringUTF8(IDS_DOM_DISTILLER_VIEWER_NO_DATA_TITLE);
-
- { // Test empty title for article.
- scoped_ptr<DistilledArticleProto> article_proto(
- new DistilledArticleProto());
- article_proto->set_title("");
- (*(article_proto->add_pages())).set_html("");
- std::string html = viewer::GetUnsafeArticleTemplateHtml(
- &article_proto.get()->pages(0), DistilledPagePrefs::LIGHT,
- DistilledPagePrefs::SERIF);
- EXPECT_THAT(html, HasSubstr(no_title));
- EXPECT_THAT(html, Not(HasSubstr(some_title)));
- }
-
- { // Test empty title for page.
- scoped_ptr<DistilledPageProto> page_proto(new DistilledPageProto());
- page_proto->set_title("");
- page_proto->set_html("");
- std::string html = viewer::GetUnsafeArticleTemplateHtml(
- page_proto.get(), DistilledPagePrefs::LIGHT, DistilledPagePrefs::SERIF);
- EXPECT_THAT(html, HasSubstr(no_title));
- EXPECT_THAT(html, Not(HasSubstr(some_title)));
- }
-
- { // Test missing title for page.
- scoped_ptr<DistilledPageProto> page_proto(new DistilledPageProto());
- std::string html = viewer::GetUnsafeArticleTemplateHtml(
- page_proto.get(), DistilledPagePrefs::LIGHT, DistilledPagePrefs::SERIF);
- EXPECT_THAT(html, HasSubstr(no_title));
- EXPECT_THAT(html, Not(HasSubstr(some_title)));
- }
-}
-
IN_PROC_BROWSER_TEST_F(DistillerPageWebContentsTest,
TestNoContentDoesNotCrash) {
const std::string no_content =
« no previous file with comments | « components/dom_distiller.gypi ('k') | components/dom_distiller/content/dom_distiller_viewer_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698