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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "chrome/browser/background/background_mode_manager.h" | 9 #include "chrome/browser/background/background_mode_manager.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 public BrowserCloseManagerBrowserTest { | 697 public BrowserCloseManagerBrowserTest { |
698 public: | 698 public: |
699 BrowserCloseManagerWithDownloadsBrowserTest() {} | 699 BrowserCloseManagerWithDownloadsBrowserTest() {} |
700 virtual ~BrowserCloseManagerWithDownloadsBrowserTest() {} | 700 virtual ~BrowserCloseManagerWithDownloadsBrowserTest() {} |
701 | 701 |
702 void SetUpOnMainThread() override { | 702 void SetUpOnMainThread() override { |
703 BrowserCloseManagerBrowserTest::SetUpOnMainThread(); | 703 BrowserCloseManagerBrowserTest::SetUpOnMainThread(); |
704 ASSERT_TRUE(scoped_download_directory_.CreateUniqueTempDir()); | 704 ASSERT_TRUE(scoped_download_directory_.CreateUniqueTempDir()); |
705 } | 705 } |
706 | 706 |
| 707 // Disable new downloads UI as it is very very slow. https://crbug.com/526577 |
| 708 // TODO(dbeam): remove this once the downloads UI is not slow. |
| 709 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 710 BrowserCloseManagerBrowserTest::SetUpCommandLine(command_line); |
| 711 command_line->AppendSwitch(switches::kDisableMaterialDesignDownloads); |
| 712 } |
| 713 |
707 void SetDownloadPathForProfile(Profile* profile) { | 714 void SetDownloadPathForProfile(Profile* profile) { |
708 DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(profile); | 715 DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(profile); |
709 download_prefs->SetDownloadPath(download_path()); | 716 download_prefs->SetDownloadPath(download_path()); |
710 } | 717 } |
711 | 718 |
712 const base::FilePath& download_path() const { | 719 const base::FilePath& download_path() const { |
713 return scoped_download_directory_.path(); | 720 return scoped_download_directory_.path(); |
714 } | 721 } |
715 | 722 |
716 private: | 723 private: |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 | 1032 |
1026 chrome::CloseAllBrowsers(); | 1033 chrome::CloseAllBrowsers(); |
1027 EXPECT_FALSE(browser_shutdown::IsTryingToQuit()); | 1034 EXPECT_FALSE(browser_shutdown::IsTryingToQuit()); |
1028 EXPECT_TRUE(chrome::BrowserIterator().done()); | 1035 EXPECT_TRUE(chrome::BrowserIterator().done()); |
1029 EXPECT_TRUE(IsBackgroundModeSuspended()); | 1036 EXPECT_TRUE(IsBackgroundModeSuspended()); |
1030 } | 1037 } |
1031 | 1038 |
1032 INSTANTIATE_TEST_CASE_P(BrowserCloseManagerWithBackgroundModeBrowserTest, | 1039 INSTANTIATE_TEST_CASE_P(BrowserCloseManagerWithBackgroundModeBrowserTest, |
1033 BrowserCloseManagerWithBackgroundModeBrowserTest, | 1040 BrowserCloseManagerWithBackgroundModeBrowserTest, |
1034 testing::Bool()); | 1041 testing::Bool()); |
OLD | NEW |