| 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/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 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 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 | 28 |
| 29 ON_CALL(*this, GetApplyDisplayName()). | 29 ON_CALL(*this, GetApplyDisplayName()). |
| 30 WillByDefault(Return( | 30 WillByDefault(Return( |
| 31 DisplayName(kDefaultNamePriority, UTF8ToUTF16("new settings")))); | 31 DisplayName(kDefaultNamePriority, UTF8ToUTF16("new settings")))); |
| 32 | 32 |
| 33 ON_CALL(*this, GetNewSettingURL()).WillByDefault(Return(GURL())); | 33 ON_CALL(*this, GetNewSettingURL()).WillByDefault(Return(GURL())); |
| 34 ON_CALL(*this, CanBeMerged()).WillByDefault(Return(false)); | 34 ON_CALL(*this, CanBeMerged()).WillByDefault(Return(false)); |
| 35 |
| 36 ON_CALL(*this, IsUserVisible()).WillByDefault(Return(true)); |
| 35 } | 37 } |
| 36 | 38 |
| 37 MockSettingChange::~MockSettingChange() { | 39 MockSettingChange::~MockSettingChange() { |
| 38 } | 40 } |
| 39 | 41 |
| 40 bool MockSettingChange::Init(Profile* profile) { | 42 bool MockSettingChange::Init(Profile* profile) { |
| 41 if (!BaseSettingChange::Init(profile)) | 43 if (!BaseSettingChange::Init(profile)) |
| 42 return false; | 44 return false; |
| 43 return MockInit(profile); | 45 return MockInit(profile); |
| 44 } | 46 } |
| 45 | 47 |
| 46 } // namespace protector | 48 } // namespace protector |
| OLD | NEW |