OLD | NEW |
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 Loading... |
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 |
OLD | NEW |