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

Side by Side Diff: chrome/browser/protector/mock_setting_change.cc

Issue 9968007: [protector] Support for collapsing multiple changes into a single one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tried to compile after merge. Created 8 years, 8 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/protector/mock_setting_change.h" 5 #include "chrome/browser/protector/mock_setting_change.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "grit/theme_resources.h" 8 #include "grit/theme_resources.h"
9 #include "grit/theme_resources_standard.h" 9 #include "grit/theme_resources_standard.h"
10 10
11 using ::testing::Return; 11 using ::testing::Return;
12 12
13 namespace protector { 13 namespace protector {
14 14
15 MockSettingChange::MockSettingChange() { 15 MockSettingChange::MockSettingChange() {
16 ON_CALL(*this, GetBadgeIconID()).WillByDefault(Return(IDR_UPDATE_BADGE4)); 16 ON_CALL(*this, GetBadgeIconID()).WillByDefault(Return(IDR_UPDATE_BADGE4));
17 ON_CALL(*this, GetMenuItemIconID()).WillByDefault(Return(IDR_UPDATE_MENU4)); 17 ON_CALL(*this, GetMenuItemIconID()).WillByDefault(Return(IDR_UPDATE_MENU4));
18 ON_CALL(*this, GetBubbleIconID()).WillByDefault(Return(IDR_INPUT_ALERT)); 18 ON_CALL(*this, GetBubbleIconID()).WillByDefault(Return(IDR_INPUT_ALERT));
19 19
20 ON_CALL(*this, GetBubbleTitle()). 20 ON_CALL(*this, GetBubbleTitle()).
21 WillByDefault(Return(UTF8ToUTF16("Title"))); 21 WillByDefault(Return(UTF8ToUTF16("Title")));
22 ON_CALL(*this, GetBubbleMessage()). 22 ON_CALL(*this, GetBubbleMessage()).
23 WillByDefault(Return(UTF8ToUTF16("Message"))); 23 WillByDefault(Return(UTF8ToUTF16("Message")));
24 ON_CALL(*this, GetApplyButtonText()). 24 ON_CALL(*this, GetApplyButtonText()).
25 WillByDefault(Return(UTF8ToUTF16("Apply"))); 25 WillByDefault(Return(UTF8ToUTF16("Apply")));
26 ON_CALL(*this, GetDiscardButtonText()). 26 ON_CALL(*this, GetDiscardButtonText()).
27 WillByDefault(Return(UTF8ToUTF16("Discard"))); 27 WillByDefault(Return(UTF8ToUTF16("Discard")));
28
29 ON_CALL(*this, GetApplyDisplayName()).
30 WillByDefault(Return(
31 DisplayName(kDefaultNamePriority, UTF8ToUTF16("new settings"))));
32 ON_CALL(*this, GetApplyKeyword()).
33 WillByDefault(Return(std::string()));
28 } 34 }
29 35
30 MockSettingChange::~MockSettingChange() { 36 MockSettingChange::~MockSettingChange() {
31 } 37 }
32 38
33 bool MockSettingChange::Init(Profile* profile) { 39 bool MockSettingChange::Init(Profile* profile) {
34 if (!BaseSettingChange::Init(profile)) 40 if (!BaseSettingChange::Init(profile))
35 return false; 41 return false;
36 return MockInit(profile); 42 return MockInit(profile);
37 } 43 }
38 44
39 } // namespace protector 45 } // namespace protector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698