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

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

Issue 2952163002: Remove InProcessBrowserTest::SetUpOnMainThread() calls. (Closed)
Patch Set: rebase 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
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 class DistillablePageUtilsBrowserTestOption : public InProcessBrowserTest { 94 class DistillablePageUtilsBrowserTestOption : public InProcessBrowserTest {
95 public: 95 public:
96 void SetUpCommandLine(base::CommandLine* command_line) override { 96 void SetUpCommandLine(base::CommandLine* command_line) override {
97 command_line->AppendSwitch(switches::kEnableDomDistiller); 97 command_line->AppendSwitch(switches::kEnableDomDistiller);
98 command_line->AppendSwitchASCII(switches::kReaderModeHeuristics, 98 command_line->AppendSwitchASCII(switches::kReaderModeHeuristics,
99 Option); 99 Option);
100 command_line->AppendSwitch(switches::kEnableDistillabilityService); 100 command_line->AppendSwitch(switches::kEnableDistillabilityService);
101 } 101 }
102 102
103 void SetUpOnMainThread() override { 103 void SetUpOnMainThread() override {
104 InProcessBrowserTest::SetUpOnMainThread();
105 ASSERT_TRUE(embedded_test_server()->Start()); 104 ASSERT_TRUE(embedded_test_server()->Start());
106 web_contents_ = 105 web_contents_ =
107 browser()->tab_strip_model()->GetActiveWebContents(); 106 browser()->tab_strip_model()->GetActiveWebContents();
108 setDelegate(web_contents_, holder_.GetDelegate()); 107 setDelegate(web_contents_, holder_.GetDelegate());
109 } 108 }
110 109
111 void NavigateAndWait(const char* url, int timeout_ms) { 110 void NavigateAndWait(const char* url, int timeout_ms) {
112 GURL article_url(url); 111 GURL article_url(url);
113 if (base::StartsWith(url, "/", base::CompareCase::SENSITIVE)) { 112 if (base::StartsWith(url, "/", base::CompareCase::SENSITIVE)) {
114 article_url = embedded_test_server()->GetURL(url); 113 article_url = embedded_test_server()->GetURL(url);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 { 196 {
198 testing::InSequence dummy; 197 testing::InSequence dummy;
199 EXPECT_CALL(holder_, OnResult(false, false)).Times(1); 198 EXPECT_CALL(holder_, OnResult(false, false)).Times(1);
200 EXPECT_CALL(holder_, OnResult(false, true)) 199 EXPECT_CALL(holder_, OnResult(false, true))
201 .WillOnce(testing::InvokeWithoutArgs(QuitSoon)); 200 .WillOnce(testing::InvokeWithoutArgs(QuitSoon));
202 NavigateAndWait(kNonArticlePath, 0); 201 NavigateAndWait(kNonArticlePath, 0);
203 } 202 }
204 } 203 }
205 204
206 } // namespace dom_distiller 205 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/mixin_based_browser_test.cc ('k') | chrome/browser/dom_distiller/tab_utils_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698