| OLD | NEW |
| 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 public BrowserCloseManagerBrowserTest { | 701 public BrowserCloseManagerBrowserTest { |
| 702 public: | 702 public: |
| 703 BrowserCloseManagerWithDownloadsBrowserTest() {} | 703 BrowserCloseManagerWithDownloadsBrowserTest() {} |
| 704 virtual ~BrowserCloseManagerWithDownloadsBrowserTest() {} | 704 virtual ~BrowserCloseManagerWithDownloadsBrowserTest() {} |
| 705 | 705 |
| 706 void SetUpOnMainThread() override { | 706 void SetUpOnMainThread() override { |
| 707 BrowserCloseManagerBrowserTest::SetUpOnMainThread(); | 707 BrowserCloseManagerBrowserTest::SetUpOnMainThread(); |
| 708 ASSERT_TRUE(scoped_download_directory_.CreateUniqueTempDir()); | 708 ASSERT_TRUE(scoped_download_directory_.CreateUniqueTempDir()); |
| 709 } | 709 } |
| 710 | 710 |
| 711 // Disable new downloads UI as it is very very slow. https://crbug.com/526577 | |
| 712 // TODO(dbeam): remove this once the downloads UI is not slow. | |
| 713 void SetUpCommandLine(base::CommandLine* command_line) override { | |
| 714 BrowserCloseManagerBrowserTest::SetUpCommandLine(command_line); | |
| 715 command_line->AppendSwitch(switches::kDisableMaterialDesignDownloads); | |
| 716 } | |
| 717 | |
| 718 void SetDownloadPathForProfile(Profile* profile) { | 711 void SetDownloadPathForProfile(Profile* profile) { |
| 719 DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(profile); | 712 DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(profile); |
| 720 download_prefs->SetDownloadPath(download_path()); | 713 download_prefs->SetDownloadPath(download_path()); |
| 721 } | 714 } |
| 722 | 715 |
| 723 const base::FilePath& download_path() const { | 716 const base::FilePath& download_path() const { |
| 724 return scoped_download_directory_.path(); | 717 return scoped_download_directory_.path(); |
| 725 } | 718 } |
| 726 | 719 |
| 727 private: | 720 private: |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 | 1029 |
| 1037 chrome::CloseAllBrowsers(); | 1030 chrome::CloseAllBrowsers(); |
| 1038 EXPECT_FALSE(browser_shutdown::IsTryingToQuit()); | 1031 EXPECT_FALSE(browser_shutdown::IsTryingToQuit()); |
| 1039 EXPECT_TRUE(BrowserList::GetInstance()->empty()); | 1032 EXPECT_TRUE(BrowserList::GetInstance()->empty()); |
| 1040 EXPECT_TRUE(IsBackgroundModeSuspended()); | 1033 EXPECT_TRUE(IsBackgroundModeSuspended()); |
| 1041 } | 1034 } |
| 1042 | 1035 |
| 1043 INSTANTIATE_TEST_CASE_P(BrowserCloseManagerWithBackgroundModeBrowserTest, | 1036 INSTANTIATE_TEST_CASE_P(BrowserCloseManagerWithBackgroundModeBrowserTest, |
| 1044 BrowserCloseManagerWithBackgroundModeBrowserTest, | 1037 BrowserCloseManagerWithBackgroundModeBrowserTest, |
| 1045 testing::Bool()); | 1038 testing::Bool()); |
| OLD | NEW |