| 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 Browser* popup = ActiveDownloadsUI::GetPopup(); | 102 Browser* popup = ActiveDownloadsUI::GetPopup(); |
| 103 EXPECT_TRUE(popup); | 103 EXPECT_TRUE(popup); |
| 104 ActiveDownloadsUI* downloads_ui = static_cast<ActiveDownloadsUI*>( | 104 ActiveDownloadsUI* downloads_ui = static_cast<ActiveDownloadsUI*>( |
| 105 popup->GetSelectedTabContents()->web_ui()); | 105 popup->GetSelectedTabContents()->web_ui()); |
| 106 EXPECT_TRUE(downloads_ui); | 106 EXPECT_TRUE(downloads_ui); |
| 107 return downloads_ui->GetDownloads(); | 107 return downloads_ui->GetDownloads(); |
| 108 } | 108 } |
| 109 #endif | 109 #endif |
| 110 | 110 |
| 111 void CheckDownloadUI(const FilePath& download_path) const { | 111 void CheckDownloadUI(const FilePath& download_path) const { |
| 112 #if defined(OS_CHROMEOS) | 112 #if defined(OS_CHROMEOS) && !defined(USE_AURA) |
| 113 const ActiveDownloadsUI::DownloadList& downloads = GetDownloads(); | 113 const ActiveDownloadsUI::DownloadList& downloads = GetDownloads(); |
| 114 EXPECT_EQ(downloads.size(), 1U); | 114 EXPECT_EQ(downloads.size(), 1U); |
| 115 | 115 |
| 116 bool found = false; | 116 bool found = false; |
| 117 for (size_t i = 0; i < downloads.size(); ++i) { | 117 for (size_t i = 0; i < downloads.size(); ++i) { |
| 118 if (downloads[i]->full_path() == download_path) { | 118 if (downloads[i]->full_path() == download_path) { |
| 119 found = true; | 119 found = true; |
| 120 break; | 120 break; |
| 121 } | 121 } |
| 122 } | 122 } |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, ExplicitCancel) { | 352 IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, ExplicitCancel) { |
| 353 GURL url = NavigateToMockURL("a"); | 353 GURL url = NavigateToMockURL("a"); |
| 354 FilePath full_file_name, dir; | 354 FilePath full_file_name, dir; |
| 355 GetDestinationPaths("a", &full_file_name, &dir); | 355 GetDestinationPaths("a", &full_file_name, &dir); |
| 356 scoped_refptr<SavePackage> save_package(new SavePackage(GetCurrentTab(), | 356 scoped_refptr<SavePackage> save_package(new SavePackage(GetCurrentTab(), |
| 357 SavePackage::SAVE_AS_ONLY_HTML, full_file_name, dir)); | 357 SavePackage::SAVE_AS_ONLY_HTML, full_file_name, dir)); |
| 358 save_package->Cancel(true); | 358 save_package->Cancel(true); |
| 359 } | 359 } |
| 360 | 360 |
| 361 } // namespace | 361 } // namespace |
| OLD | NEW |