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

Side by Side Diff: chrome/browser/media_galleries/media_galleries_dialog_controller_mock.cc

Issue 310383004: Make a controller interface for media galleries dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "base/strings/utf_string_conversions.h"
8 #include "base/bind_helpers.h"
9 8
9 using ::testing::_;
10 using ::testing::Return; 10 using ::testing::Return;
11 11
12 namespace { 12 MediaGalleriesDialogControllerMock::MediaGalleriesDialogControllerMock() {
13 MediaGalleriesDialog* NullDialog(MediaGalleriesDialogController*) { 13 ON_CALL(*this, GetHeader()).
14 return NULL; 14 WillByDefault(Return(base::ASCIIToUTF16("Title")));
15 } 15 ON_CALL(*this, GetSubtext()).
16 16 WillByDefault(Return(base::ASCIIToUTF16("Desc")));
17 } // namespace 17 ON_CALL(*this, GetAcceptButtonText()).
18 18 WillByDefault(Return(base::ASCIIToUTF16("OK")));
19 MediaGalleriesDialogControllerMock::MediaGalleriesDialogControllerMock( 19 ON_CALL(*this, GetAuxiliaryButtonText()).
20 const extensions::Extension& extension) 20 WillByDefault(Return(base::ASCIIToUTF16("Button")));
21 : MediaGalleriesDialogController( 21 ON_CALL(*this, GetSectionEntries(_)).
22 extension, NULL, 22 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 } 23 }
30 24
31 MediaGalleriesDialogControllerMock::~MediaGalleriesDialogControllerMock() { 25 MediaGalleriesDialogControllerMock::~MediaGalleriesDialogControllerMock() {
32 } 26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698