OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/scoped_temp_dir.h" | 9 #include "base/scoped_temp_dir.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 } | 576 } |
577 | 577 |
578 // Create a DownloadsObserver that will wait for the | 578 // Create a DownloadsObserver that will wait for the |
579 // specified number of downloads to finish. | 579 // specified number of downloads to finish. |
580 DownloadsObserver* CreateWaiter(Browser* browser, int num_downloads) { | 580 DownloadsObserver* CreateWaiter(Browser* browser, int num_downloads) { |
581 DownloadManager* download_manager = | 581 DownloadManager* download_manager = |
582 browser->profile()->GetDownloadManager(); | 582 browser->profile()->GetDownloadManager(); |
583 return new DownloadsObserver( | 583 return new DownloadsObserver( |
584 download_manager, num_downloads, | 584 download_manager, num_downloads, |
585 DownloadItem::COMPLETE, // Really done | 585 DownloadItem::COMPLETE, // Really done |
586 false, // Bail on select file | 586 true, // Bail on select file |
587 ON_DANGEROUS_DOWNLOAD_FAIL); | 587 ON_DANGEROUS_DOWNLOAD_FAIL); |
588 } | 588 } |
589 | 589 |
590 // Create a DownloadsObserver that will wait for the | 590 // Create a DownloadsObserver that will wait for the |
591 // specified number of downloads to start. | 591 // specified number of downloads to start. |
592 DownloadsObserver* CreateInProgressWaiter(Browser* browser, | 592 DownloadsObserver* CreateInProgressWaiter(Browser* browser, |
593 int num_downloads) { | 593 int num_downloads) { |
594 DownloadManager* download_manager = | 594 DownloadManager* download_manager = |
595 browser->profile()->GetDownloadManager(); | 595 browser->profile()->GetDownloadManager(); |
596 return new DownloadsObserver( | 596 return new DownloadsObserver( |
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1730 EXPECT_EQ(1u, observer->NumDangerousDownloadsSeen()); | 1730 EXPECT_EQ(1u, observer->NumDangerousDownloadsSeen()); |
1731 | 1731 |
1732 // Download shelf should close. Download panel stays open on ChromeOS. | 1732 // Download shelf should close. Download panel stays open on ChromeOS. |
1733 CheckDownloadUI(browser(), false, true, FilePath()); | 1733 CheckDownloadUI(browser(), false, true, FilePath()); |
1734 | 1734 |
1735 // Check that the extension was installed. | 1735 // Check that the extension was installed. |
1736 ExtensionService* extension_service = | 1736 ExtensionService* extension_service = |
1737 browser()->profile()->GetExtensionService(); | 1737 browser()->profile()->GetExtensionService(); |
1738 ASSERT_TRUE(extension_service->GetExtensionById(kLargeThemeCrxId, false)); | 1738 ASSERT_TRUE(extension_service->GetExtensionById(kLargeThemeCrxId, false)); |
1739 } | 1739 } |
OLD | NEW |