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

Side by Side Diff: chrome/browser/download/download_browsertest.cc

Issue 7245013: Checking that items exist in the downloads panel on ChromeOS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 browser()->profile()->GetDownloadManager()->SearchDownloads( 1567 browser()->profile()->GetDownloadManager()->SearchDownloads(
1568 string16(), &downloads); 1568 string16(), &downloads);
1569 ASSERT_EQ(1u, downloads.size()); 1569 ASSERT_EQ(1u, downloads.size());
1570 EXPECT_EQ(DownloadItem::COMPLETE, downloads[0]->state()); 1570 EXPECT_EQ(DownloadItem::COMPLETE, downloads[0]->state());
1571 EXPECT_TRUE(downloads[0]->opened()); 1571 EXPECT_TRUE(downloads[0]->opened());
1572 1572
1573 // As long as we're here, confirmed everything else is good. 1573 // As long as we're here, confirmed everything else is good.
1574 EXPECT_EQ(1, browser()->tab_count()); 1574 EXPECT_EQ(1, browser()->tab_count());
1575 CheckDownload(browser(), file, file); 1575 CheckDownload(browser(), file, file);
1576 // Download shelf should close. Download panel stays open on ChromeOS. 1576 // Download shelf should close. Download panel stays open on ChromeOS.
1577 CheckDownloadUI(browser(), false, true, file); 1577 CheckDownloadUI(browser(), false, true, FilePath());
1578 } 1578 }
1579 1579
1580 // Download an extension. Expect a dangerous download warning. 1580 // Download an extension. Expect a dangerous download warning.
1581 // Deny the download. 1581 // Deny the download.
1582 IN_PROC_BROWSER_TEST_F(DownloadTest, CrxDenyInstall) { 1582 IN_PROC_BROWSER_TEST_F(DownloadTest, CrxDenyInstall) {
1583 ASSERT_TRUE(InitialSetup(false)); 1583 ASSERT_TRUE(InitialSetup(false));
1584 GURL extension_url(URLRequestMockHTTPJob::GetMockUrl(kGoodCrxPath)); 1584 GURL extension_url(URLRequestMockHTTPJob::GetMockUrl(kGoodCrxPath));
1585 1585
1586 scoped_ptr<DownloadsObserver> observer( 1586 scoped_ptr<DownloadsObserver> observer(
1587 DangerousInstallWaiter(browser(), 1587 DangerousInstallWaiter(browser(),
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 EXPECT_EQ(1u, observer->NumDangerousDownloadsSeen()); 1710 EXPECT_EQ(1u, observer->NumDangerousDownloadsSeen());
1711 1711
1712 // Download shelf should close. Download panel stays open on ChromeOS. 1712 // Download shelf should close. Download panel stays open on ChromeOS.
1713 CheckDownloadUI(browser(), false, true, FilePath()); 1713 CheckDownloadUI(browser(), false, true, FilePath());
1714 1714
1715 // Check that the extension was installed. 1715 // Check that the extension was installed.
1716 ExtensionService* extension_service = 1716 ExtensionService* extension_service =
1717 browser()->profile()->GetExtensionService(); 1717 browser()->profile()->GetExtensionService();
1718 ASSERT_TRUE(extension_service->GetExtensionById(kLargeThemeCrxId, false)); 1718 ASSERT_TRUE(extension_service->GetExtensionById(kLargeThemeCrxId, false));
1719 } 1719 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698