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/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 } // namespace | 90 } // namespace |
91 | 91 |
92 template<const char Option[]> | 92 template<const char Option[]> |
93 class DistillablePageUtilsBrowserTestOption : public InProcessBrowserTest { | 93 class DistillablePageUtilsBrowserTestOption : public InProcessBrowserTest { |
94 public: | 94 public: |
95 void SetUpCommandLine(base::CommandLine* command_line) override { | 95 void SetUpCommandLine(base::CommandLine* command_line) override { |
96 command_line->AppendSwitch(switches::kEnableDomDistiller); | 96 command_line->AppendSwitch(switches::kEnableDomDistiller); |
97 command_line->AppendSwitchASCII(switches::kReaderModeHeuristics, | 97 command_line->AppendSwitchASCII(switches::kReaderModeHeuristics, |
98 Option); | 98 Option); |
| 99 command_line->AppendSwitch(switches::kEnableDistillabilityService); |
99 } | 100 } |
100 | 101 |
101 void SetUpOnMainThread() override { | 102 void SetUpOnMainThread() override { |
102 InProcessBrowserTest::SetUpOnMainThread(); | 103 InProcessBrowserTest::SetUpOnMainThread(); |
103 ASSERT_TRUE(embedded_test_server()->Start()); | 104 ASSERT_TRUE(embedded_test_server()->Start()); |
104 web_contents_ = | 105 web_contents_ = |
105 browser()->tab_strip_model()->GetActiveWebContents(); | 106 browser()->tab_strip_model()->GetActiveWebContents(); |
106 setDelegate(web_contents_, holder_.GetDelegate()); | 107 setDelegate(web_contents_, holder_.GetDelegate()); |
107 } | 108 } |
108 | 109 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 { | 196 { |
196 testing::InSequence dummy; | 197 testing::InSequence dummy; |
197 EXPECT_CALL(holder_, OnResult(false, false)).Times(1); | 198 EXPECT_CALL(holder_, OnResult(false, false)).Times(1); |
198 EXPECT_CALL(holder_, OnResult(false, true)) | 199 EXPECT_CALL(holder_, OnResult(false, true)) |
199 .WillOnce(testing::InvokeWithoutArgs(QuitSoon)); | 200 .WillOnce(testing::InvokeWithoutArgs(QuitSoon)); |
200 NavigateAndWait(kNonArticlePath, 0); | 201 NavigateAndWait(kNonArticlePath, 0); |
201 } | 202 } |
202 } | 203 } |
203 | 204 |
204 } // namespace dom_distiller | 205 } // namespace dom_distiller |
OLD | NEW |