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

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

Issue 2132593002: Remove remaining calls to deprecated MessageLoop methods on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: h264_vt_encoder_unittest.cc Created 4 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 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 a181d9acc805c2a016ee874d66ded5b69427080f..0de045236aeebeb8fb0619022f52b331fc33fec9 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller_unittest.mm
@@ -11,6 +11,7 @@
#import "base/mac/scoped_block.h"
#import "base/mac/scoped_nsobject.h"
+#include "base/run_loop.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"
@@ -391,11 +392,14 @@ TEST_F(DownloadShelfControllerTest, ViewVisibility) {
[shelf_ showDownloadShelf:YES isUserAction:NO];
EXPECT_FALSE([[shelf_ view] isHidden]);
+ base::RunLoop run_loop;
+ base::RunLoop* const run_loop_ptr = &run_loop;
+
[shelf_ setCloseAnimationHandler:^{
- base::MessageLoop::current()->QuitNow();
+ run_loop_ptr->Quit();
}];
[shelf_ showDownloadShelf:NO isUserAction:NO];
- base::MessageLoop::current()->Run();
+ run_loop.Run();
EXPECT_TRUE([[shelf_ view] isHidden]);
[shelf_ showDownloadShelf:YES isUserAction:NO];

Powered by Google App Engine
This is Rietveld 408576698