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

Side by Side Diff: chrome/browser/lifetime/browser_close_manager_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/lifetime/browser_close_manager.h" 5 #include "chrome/browser/lifetime/browser_close_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 DISALLOW_COPY_AND_ASSIGN(FakeBackgroundModeManager); 216 DISALLOW_COPY_AND_ASSIGN(FakeBackgroundModeManager);
217 }; 217 };
218 218
219 } // namespace 219 } // namespace
220 220
221 class BrowserCloseManagerBrowserTest 221 class BrowserCloseManagerBrowserTest
222 : public InProcessBrowserTest, 222 : public InProcessBrowserTest,
223 public testing::WithParamInterface<bool> { 223 public testing::WithParamInterface<bool> {
224 protected: 224 protected:
225 void SetUpOnMainThread() override { 225 void SetUpOnMainThread() override {
226 InProcessBrowserTest::SetUpOnMainThread();
227 SessionStartupPref::SetStartupPref( 226 SessionStartupPref::SetStartupPref(
228 browser()->profile(), SessionStartupPref(SessionStartupPref::LAST)); 227 browser()->profile(), SessionStartupPref(SessionStartupPref::LAST));
229 browsers_.push_back(browser()); 228 browsers_.push_back(browser());
230 content::BrowserThread::PostTask( 229 content::BrowserThread::PostTask(
231 content::BrowserThread::IO, FROM_HERE, 230 content::BrowserThread::IO, FROM_HERE,
232 base::BindOnce(&chrome_browser_net::SetUrlRequestMocksEnabled, true)); 231 base::BindOnce(&chrome_browser_net::SetUrlRequestMocksEnabled, true));
233 } 232 }
234 233
235 void SetUpCommandLine(base::CommandLine* command_line) override { 234 void SetUpCommandLine(base::CommandLine* command_line) override {
236 if (GetParam()) 235 if (GetParam())
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 1299
1301 chrome::CloseAllBrowsers(); 1300 chrome::CloseAllBrowsers();
1302 EXPECT_FALSE(browser_shutdown::IsTryingToQuit()); 1301 EXPECT_FALSE(browser_shutdown::IsTryingToQuit());
1303 EXPECT_TRUE(BrowserList::GetInstance()->empty()); 1302 EXPECT_TRUE(BrowserList::GetInstance()->empty());
1304 EXPECT_TRUE(IsBackgroundModeSuspended()); 1303 EXPECT_TRUE(IsBackgroundModeSuspended());
1305 } 1304 }
1306 1305
1307 INSTANTIATE_TEST_CASE_P(BrowserCloseManagerWithBackgroundModeBrowserTest, 1306 INSTANTIATE_TEST_CASE_P(BrowserCloseManagerWithBackgroundModeBrowserTest,
1308 BrowserCloseManagerWithBackgroundModeBrowserTest, 1307 BrowserCloseManagerWithBackgroundModeBrowserTest,
1309 testing::Bool()); 1308 testing::Bool());
OLDNEW
« no previous file with comments | « chrome/browser/io_thread_browsertest.cc ('k') | chrome/browser/loader/chrome_resource_dispatcher_host_delegate_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698