OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/media_galleries/media_galleries_dialog_controller_mock.
h" | 5 #include "chrome/browser/media_galleries/media_galleries_dialog_controller_mock.
h" |
6 | 6 |
7 #include "base/bind.h" | 7 using ::testing::_; |
8 #include "base/bind_helpers.h" | |
9 | |
10 using ::testing::Return; | 8 using ::testing::Return; |
11 | 9 |
12 namespace { | 10 MediaGalleriesDialogControllerMock::MediaGalleriesDialogControllerMock() { |
13 MediaGalleriesDialog* NullDialog(MediaGalleriesDialogController*) { | 11 ON_CALL(*this, GetHeader()). |
14 return NULL; | 12 WillByDefault(Return(base::string16())); |
15 } | 13 ON_CALL(*this, GetSubtext()). |
16 | 14 WillByDefault(Return(base::string16())); |
17 } // namespace | 15 ON_CALL(*this, GetAcceptButtonText()). |
18 | 16 WillByDefault(Return(base::string16())); |
19 MediaGalleriesDialogControllerMock::MediaGalleriesDialogControllerMock( | 17 ON_CALL(*this, GetAuxilliaryButtonText()). |
20 const extensions::Extension& extension) | 18 WillByDefault(Return(base::string16())); |
21 : MediaGalleriesDialogController( | 19 ON_CALL(*this, GetSectionEntries(_)). |
22 extension, NULL, | 20 WillByDefault(Return(Entries())); |
23 base::Bind(&NullDialog), | |
24 base::Bind(&base::DoNothing)) { | |
25 EXPECT_CALL(*this, GetHeader()). | |
26 WillRepeatedly(Return(base::string16())); | |
27 EXPECT_CALL(*this, GetSubtext()). | |
28 WillRepeatedly(Return(base::string16())); | |
29 } | 21 } |
30 | 22 |
31 MediaGalleriesDialogControllerMock::~MediaGalleriesDialogControllerMock() { | 23 MediaGalleriesDialogControllerMock::~MediaGalleriesDialogControllerMock() { |
32 } | 24 } |
OLD | NEW |