Chromium Code Reviews| Index: chrome/browser/dom_distiller/distillable_page_utils_browsertest.cc |
| diff --git a/chrome/browser/dom_distiller/distillable_page_utils_browsertest.cc b/chrome/browser/dom_distiller/distillable_page_utils_browsertest.cc |
| index 9575617ee3b45b4ce374b1594753a6fa30b74c23..85cd282633a43d0d11a897ac5963bb06982e4776 100644 |
| --- a/chrome/browser/dom_distiller/distillable_page_utils_browsertest.cc |
| +++ b/chrome/browser/dom_distiller/distillable_page_utils_browsertest.cc |
| @@ -26,9 +26,18 @@ using namespace switches::reader_mode_heuristics; |
| namespace { |
| const char kSimpleArticlePath[] = "/dom_distiller/simple_article.html"; |
| +const char kSimpleArticleIFramePath[] = |
| + "/dom_distiller/simple_article_iframe.html"; |
| const char kArticlePath[] = "/dom_distiller/og_article.html"; |
| const char kNonArticlePath[] = "/dom_distiller/non_og_article.html"; |
| +const char* kAllPaths[] = { |
|
dglazkov
2016/01/15 19:41:47
We need to test this at a higher level, since the
wychen
2016/01/15 22:31:02
I'll add one in WebViewTest. I think it would stil
|
| + kSimpleArticlePath, |
| + kSimpleArticleIFramePath, |
| + kArticlePath, |
| + kNonArticlePath |
| +}; |
| + |
| class Holder { |
| public: |
| virtual ~Holder() {} |
| @@ -96,6 +105,11 @@ IN_PROC_BROWSER_TEST_F(DistillablePageUtilsBrowserTestAlways, |
| EXPECT_CALL(holder_, OnResult(true, true)).Times(1); |
| NavigateAndWait(kSimpleArticlePath); |
| } |
| + for (unsigned i = 0; i < sizeof(kAllPaths) / sizeof(kAllPaths[0]); ++i) { |
| + testing::InSequence dummy; |
| + EXPECT_CALL(holder_, OnResult(true, true)).Times(1); |
| + NavigateAndWait(kAllPaths[i]); |
| + } |
| // Test pages that we don't care about its distillability. |
| { |
| testing::InSequence dummy; |
| @@ -138,11 +152,12 @@ using DistillablePageUtilsBrowserTestAdaboost = |
| IN_PROC_BROWSER_TEST_F(DistillablePageUtilsBrowserTestAdaboost, |
| TestDelegate) { |
| - { |
| + const char* paths[] = {kSimpleArticlePath, kSimpleArticleIFramePath}; |
| + for (unsigned i = 0; i < sizeof(paths)/sizeof(paths[0]); ++i) { |
| testing::InSequence dummy; |
| EXPECT_CALL(holder_, OnResult(true, false)).Times(1); |
| EXPECT_CALL(holder_, OnResult(true, true)).Times(1); |
| - NavigateAndWait(kSimpleArticlePath); |
| + NavigateAndWait(paths[i]); |
| } |
| { |
| testing::InSequence dummy; |