diff options
author | ivankr@chromium.org <ivankr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 09:36:22 +0000 |
---|---|---|
committer | ivankr@chromium.org <ivankr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 09:36:22 +0000 |
commit | 63b59a811e7eb68625da7c94085e85c3b19f6fd0 (patch) | |
tree | 4a65027dc6f1d4e176b74ec534df46c061aa65e3 /chrome/browser/protector/mock_setting_change.cc | |
parent | d399866c2fe77410afed5be486f2b72581823bed (diff) | |
download | chromium_src-63b59a811e7eb68625da7c94085e85c3b19f6fd0.zip chromium_src-63b59a811e7eb68625da7c94085e85c3b19f6fd0.tar.gz chromium_src-63b59a811e7eb68625da7c94085e85c3b19f6fd0.tar.bz2 |
Initial set of browser_tests for Protector and DefaultSearchProviderChange.
Some slight changes is Protector/BaseSettingChange: removed the OnBeforeRemoved callback (without calling any callback before the removal).
BUG=None
TEST=browser_tests:ProtectorTest.*,browser_tests:DefaultSearchProviderChange.*
Review URL: https://chromiumcodereview.appspot.com/9236001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118083 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/protector/mock_setting_change.cc')
-rw-r--r-- | chrome/browser/protector/mock_setting_change.cc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/chrome/browser/protector/mock_setting_change.cc b/chrome/browser/protector/mock_setting_change.cc new file mode 100644 index 0000000..63726ec --- /dev/null +++ b/chrome/browser/protector/mock_setting_change.cc @@ -0,0 +1,39 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/protector/mock_setting_change.h" + +#include "base/utf_string_conversions.h" +#include "grit/theme_resources.h" +#include "grit/theme_resources_standard.h" + +using ::testing::Return; + +namespace protector { + +MockSettingChange::MockSettingChange() { + ON_CALL(*this, GetBadgeIconID()).WillByDefault(Return(IDR_UPDATE_BADGE4)); + ON_CALL(*this, GetMenuItemIconID()).WillByDefault(Return(IDR_UPDATE_MENU4)); + ON_CALL(*this, GetBubbleIconID()).WillByDefault(Return(IDR_INPUT_ALERT)); + + ON_CALL(*this, GetBubbleTitle()). + WillByDefault(Return(UTF8ToUTF16("Title"))); + ON_CALL(*this, GetBubbleMessage()). + WillByDefault(Return(UTF8ToUTF16("Message"))); + ON_CALL(*this, GetApplyButtonText()). + WillByDefault(Return(UTF8ToUTF16("Apply"))); + ON_CALL(*this, GetDiscardButtonText()). + WillByDefault(Return(UTF8ToUTF16("Discard"))); +} + +MockSettingChange::~MockSettingChange() { +} + +bool MockSettingChange::Init(Protector* protector) { + if (!BaseSettingChange::Init(protector)) + return false; + return MockInit(protector); +} + +} // namespace protector |