diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-05 17:56:39 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-05 17:56:39 +0000 |
commit | 3339229822e7af543067d5267d3b9795bd6e4485 (patch) | |
tree | 76d893bdea7b1895303aad3c265cbb0946c5154f /chrome/browser/prefs/pref_observer_mock.h | |
parent | 8cb02edc531a8334b2bd48087a91b4cbdf40c2d7 (diff) | |
download | chromium_src-3339229822e7af543067d5267d3b9795bd6e4485.zip chromium_src-3339229822e7af543067d5267d3b9795bd6e4485.tar.gz chromium_src-3339229822e7af543067d5267d3b9795bd6e4485.tar.bz2 |
Move lots of GMock stuff out of line.
Nico did some treemapping of our build time on Mac, and (surprise!) gmock
unittests dominated. Gmock works with several large, heavy templates, and previous patches that out of line the ctors/dtors have significantly sped up compilation (e.g.GLMock) and have reduced thrashing.
Nico says I should plug this again: http://www.chromium.org/developers/coding-style/cpp-dos-and-donts
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6056008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70516 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/prefs/pref_observer_mock.h')
-rw-r--r-- | chrome/browser/prefs/pref_observer_mock.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/chrome/browser/prefs/pref_observer_mock.h b/chrome/browser/prefs/pref_observer_mock.h index f339841..0c651ca 100644 --- a/chrome/browser/prefs/pref_observer_mock.h +++ b/chrome/browser/prefs/pref_observer_mock.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -39,8 +39,8 @@ MATCHER_P3(PrefValueMatches, prefs, pref_name, value, "") { // A mock for testing preference notifications and easy setup of expectations. class PrefObserverMock : public NotificationObserver { public: - PrefObserverMock() {} - virtual ~PrefObserverMock() {} + PrefObserverMock(); + virtual ~PrefObserverMock(); MOCK_METHOD3(Observe, void(NotificationType type, const NotificationSource& source, @@ -48,13 +48,7 @@ class PrefObserverMock : public NotificationObserver { void Expect(const PrefService* prefs, const std::string& pref_name, - const Value* value) { - EXPECT_CALL(*this, Observe(NotificationType(NotificationType::PREF_CHANGED), - Source<PrefService>(prefs), - Property(&Details<std::string>::ptr, - Pointee(pref_name)))) - .With(PrefValueMatches(prefs, pref_name, value)); - } + const Value* value); }; #endif // CHROME_BROWSER_PREFS_PREF_OBSERVER_MOCK_H_ |