| Index: chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm b/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm
|
| index 96ab9158e23dd6931507b94493b720f892a2bcac..b014a1f0a938e7500681cb96bb442ed2642ea106 100644
|
| --- a/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm
|
| @@ -6,7 +6,10 @@
|
|
|
| #import <QuartzCore/QuartzCore.h>
|
|
|
| +#include "base/bind.h"
|
| +#include "base/callback.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "base/message_loop/message_pump_mac.h"
|
| #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
|
| #import "third_party/ocmock/gtest_support.h"
|
| @@ -53,7 +56,7 @@ TEST_F(HistoryOverlayControllerTest, DismissClearsAnimations) {
|
| [[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]);
|
| [controller showPanelForView:test_view()];
|
|
|
| - scoped_refptr<base::MessagePumpNSRunLoop> message_pump(
|
| + scoped_ptr<base::MessagePumpNSRunLoop> message_pump(
|
| new base::MessagePumpNSRunLoop);
|
|
|
| id mock = [OCMockObject partialMockForObject:controller];
|
| @@ -61,8 +64,10 @@ TEST_F(HistoryOverlayControllerTest, DismissClearsAnimations) {
|
| [[[mock expect] andForwardToRealObject] dismiss];
|
|
|
| // Called after |-animationDidStop:finished:|.
|
| + base::Closure quit_closure = base::Bind(&base::MessagePumpNSRunLoop::Quit,
|
| + base::Unretained(message_pump.get()));
|
| void (^quit_loop)(NSInvocation* invocation) = ^(NSInvocation* invocation) {
|
| - message_pump->Quit();
|
| + quit_closure.Run();
|
| };
|
| // Set up the mock to first forward to the real implementation and then call
|
| // the above block to quit the run loop.
|
|
|