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

Unified Diff: chrome/browser/ui/cocoa/download/download_shelf_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_shelf_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm b/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
index 0de045236aeebeb8fb0619022f52b331fc33fec9..1fcaaa172ced76d78f832977c665f4a96a23d0e3 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
@@ -12,6 +12,7 @@
#import "base/mac/scoped_block.h"
#import "base/mac/scoped_nsobject.h"
#include "base/run_loop.h"
+#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
#import "chrome/browser/ui/cocoa/download/download_item_controller.h"
@@ -252,7 +253,7 @@ TEST_F(DownloadShelfControllerTest, AutoCloseAfterOpenWithMouseInShelf) {
// The download opens.
EXPECT_CALL(*[[item wrappedMockDownload] mockDownload], GetOpened())
.WillRepeatedly(Return(true));
- [shelf_ downloadWasOpened:item.get()];
+ [shelf_ downloadWasOpenedOrShown:item.get()];
// The shelf should now be waiting for the mouse to exit.
EXPECT_TRUE([shelf_ isVisible]);
@@ -281,7 +282,7 @@ TEST_F(DownloadShelfControllerTest, AutoCloseAfterOpenWithMouseOffShelf) {
// The download is opened.
EXPECT_CALL(*[[item wrappedMockDownload] mockDownload], GetOpened())
.WillRepeatedly(Return(true));
- [shelf_ downloadWasOpened:item.get()];
+ [shelf_ downloadWasOpenedOrShown:item.get()];
// The shelf should be closed immediately since the mouse is not over the
// shelf.
@@ -308,7 +309,7 @@ TEST_F(DownloadShelfControllerTest, CloseWithPendingAutoClose) {
// The download opens.
EXPECT_CALL(*[[item wrappedMockDownload] mockDownload], GetOpened())
.WillRepeatedly(Return(true));
- [shelf_ downloadWasOpened:item.get()];
+ [shelf_ downloadWasOpenedOrShown:item.get()];
// The shelf should now be waiting for the mouse to exit. autoClose should not
// be scheduled yet.
@@ -349,7 +350,7 @@ TEST_F(DownloadShelfControllerTest, AddItemWithPendingAutoClose) {
// The download opens.
EXPECT_CALL(*[[item wrappedMockDownload] mockDownload], GetOpened())
.WillRepeatedly(Return(true));
- [shelf_ downloadWasOpened:item.get()];
+ [shelf_ downloadWasOpenedOrShown:item.get()];
// The shelf should now be waiting for the mouse to exit. autoClose should not
// be scheduled yet.
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_shelf_controller.mm ('k') | chrome/browser/ui/views/download/download_item_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698