summaryrefslogtreecommitdiffstats
path: root/chrome/browser/protector/mock_protector.h
diff options
context:
space:
mode:
authorivankr@chromium.org <ivankr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 09:36:22 +0000
committerivankr@chromium.org <ivankr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 09:36:22 +0000
commit63b59a811e7eb68625da7c94085e85c3b19f6fd0 (patch)
tree4a65027dc6f1d4e176b74ec534df46c061aa65e3 /chrome/browser/protector/mock_protector.h
parentd399866c2fe77410afed5be486f2b72581823bed (diff)
downloadchromium_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_protector.h')
-rw-r--r--chrome/browser/protector/mock_protector.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/chrome/browser/protector/mock_protector.h b/chrome/browser/protector/mock_protector.h
new file mode 100644
index 0000000..513d6a5
--- /dev/null
+++ b/chrome/browser/protector/mock_protector.h
@@ -0,0 +1,31 @@
+// 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.
+
+#ifndef CHROME_BROWSER_PROTECTOR_MOCK_PROTECTOR_H_
+#define CHROME_BROWSER_PROTECTOR_MOCK_PROTECTOR_H_
+#pragma once
+
+#include "chrome/browser/protector/protector.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace protector {
+
+class MockProtector : public Protector {
+ public:
+ explicit MockProtector(Profile* profile);
+ virtual ~MockProtector();
+
+ MOCK_METHOD1(ShowChange, void(BaseSettingChange*));
+ MOCK_METHOD0(DismissChange, void());
+ MOCK_METHOD1(OpenTab, void(const GURL&));
+
+ MOCK_METHOD0(OnApplyChange, void());
+ MOCK_METHOD0(OnDiscardChange, void());
+ MOCK_METHOD0(OnDecisionTimeout, void());
+ MOCK_METHOD0(OnRemovedFromProfile, void());
+};
+
+} // namespace protector
+
+#endif // CHROME_BROWSER_PROTECTOR_MOCK_PROTECTOR_H_