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

Unified Diff: chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm

Issue 209613002: Download shelf autohides on showing in shell, just same as regular open Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added browser and unit tests. Renamed 'UserActed' to 'OpenedOrShown'. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm b/chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm
index ebe8e59caccd4228500bcc2dc7a4248928f3fcfd..33b7ee7fa8397e699eb2b1a399939169bb6f0551 100644
--- a/chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_controller_unittest.mm
@@ -104,10 +104,16 @@ class DownloadItemControllerTest : public CocoaProfileTest {
TEST_F(DownloadItemControllerTest, ShelfNotifiedOfOpenedDownload) {
base::scoped_nsobject<DownloadItemController> item(CreateItemController());
- [[(id)shelf_ expect] downloadWasOpened:[OCMArg any]];
+ [[(id)shelf_ expect] downloadWasOpenedOrShown:[OCMArg any]];
download_item_->NotifyObserversDownloadOpened();
}
+TEST_F(DownloadItemControllerTest, ShelfNotifiedOfShownDownload) {
+ base::scoped_nsobject<DownloadItemController> item(CreateItemController());
+ [[(id)shelf_ expect] downloadWasOpenedOrShown:[OCMArg any]];
+ download_item_->NotifyObserversDownloadShown();
+}
+
TEST_F(DownloadItemControllerTest, RemovesSelfWhenDownloadIsDestroyed) {
base::scoped_nsobject<DownloadItemController> item(CreateItemController());
[[(id)shelf_ expect] remove:[OCMArg any]];
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_item_controller.mm ('k') | chrome/browser/ui/cocoa/download/download_item_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698