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

Side by Side Diff: chrome/browser/dom_distiller/distillable_page_utils_browsertest.cc

Issue 2961533002: Add "AllArticles" mode to Reader Mode heuristics (Closed)
Patch Set: Revert "exclude ios" Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string.h> 5 #include <string.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 { 197 {
198 testing::InSequence dummy; 198 testing::InSequence dummy;
199 EXPECT_CALL(holder_, OnResult(false, false)).Times(1); 199 EXPECT_CALL(holder_, OnResult(false, false)).Times(1);
200 EXPECT_CALL(holder_, OnResult(false, true)) 200 EXPECT_CALL(holder_, OnResult(false, true))
201 .WillOnce(testing::InvokeWithoutArgs(QuitSoon)); 201 .WillOnce(testing::InvokeWithoutArgs(QuitSoon));
202 NavigateAndWait(kNonArticlePath, 0); 202 NavigateAndWait(kNonArticlePath, 0);
203 } 203 }
204 } 204 }
205 205
206 using DistillablePageUtilsBrowserTestAllArticles =
207 DistillablePageUtilsBrowserTestOption<kAllArticles>;
208
209 IN_PROC_BROWSER_TEST_F(DistillablePageUtilsBrowserTestAllArticles,
210 TestDelegate) {
211 const char* paths[] = {kSimpleArticlePath, kSimpleArticleIFramePath};
212 for (unsigned i = 0; i < sizeof(paths) / sizeof(paths[0]); ++i) {
213 testing::InSequence dummy;
214 EXPECT_CALL(holder_, OnResult(true, false)).Times(1);
215 EXPECT_CALL(holder_, OnResult(true, true))
216 .WillOnce(testing::InvokeWithoutArgs(QuitSoon));
217 NavigateAndWait(paths[i], 0);
218 }
219 {
220 testing::InSequence dummy;
221 EXPECT_CALL(holder_, OnResult(false, false)).Times(1);
222 EXPECT_CALL(holder_, OnResult(false, true))
223 .WillOnce(testing::InvokeWithoutArgs(QuitSoon));
224 NavigateAndWait(kNonArticlePath, 0);
225 }
226 }
227
206 } // namespace dom_distiller 228 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698