1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/bubble/bubble_manager_mocks.h"
7 MockBubbleUi::MockBubbleUi() {}
9 MockBubbleUi::~MockBubbleUi() { Destroyed(); }
11 MockBubbleDelegate::MockBubbleDelegate() {}
13 MockBubbleDelegate::~MockBubbleDelegate() { Destroyed(); }
16 scoped_ptr
<MockBubbleDelegate
> MockBubbleDelegate::Default() {
17 MockBubbleDelegate
* delegate
= new MockBubbleDelegate
;
18 EXPECT_CALL(*delegate
, BuildBubbleUiMock())
19 .WillOnce(testing::Return(new MockBubbleUi
));
20 EXPECT_CALL(*delegate
, ShouldClose(testing::_
))
21 .WillOnce(testing::Return(true));
22 return make_scoped_ptr(delegate
);
26 scoped_ptr
<MockBubbleDelegate
> MockBubbleDelegate::Stubborn() {
27 MockBubbleDelegate
* delegate
= new MockBubbleDelegate
;
28 EXPECT_CALL(*delegate
, BuildBubbleUiMock())
29 .WillOnce(testing::Return(new MockBubbleUi
));
30 EXPECT_CALL(*delegate
, ShouldClose(testing::_
))
31 .WillRepeatedly(testing::Return(false));
32 return make_scoped_ptr(delegate
);