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

Side by Side Diff: chrome/browser/search/instant_service_unittest.cc

Issue 164023002: [Clean up] Delete InstantUnitTestBase::SetUpWithoutCacheableNTP(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/search/instant_unittest_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 18 matching lines...) Expand all
29 class MockInstantServiceObserver : public InstantServiceObserver { 29 class MockInstantServiceObserver : public InstantServiceObserver {
30 public: 30 public:
31 MOCK_METHOD0(DefaultSearchProviderChanged, void()); 31 MOCK_METHOD0(DefaultSearchProviderChanged, void());
32 MOCK_METHOD0(GoogleURLUpdated, void()); 32 MOCK_METHOD0(GoogleURLUpdated, void());
33 MOCK_METHOD1(OmniboxStartMarginChanged, void(int)); 33 MOCK_METHOD1(OmniboxStartMarginChanged, void(int));
34 }; 34 };
35 35
36 class InstantServiceTest : public InstantUnitTestBase { 36 class InstantServiceTest : public InstantUnitTestBase {
37 protected: 37 protected:
38 virtual void SetUp() OVERRIDE { 38 virtual void SetUp() OVERRIDE {
39 InstantUnitTestBase::SetUpWithoutCacheableNTP(); 39 InstantUnitTestBase::SetUp();
40 40
41 instant_service_observer_.reset(new MockInstantServiceObserver()); 41 instant_service_observer_.reset(new MockInstantServiceObserver());
42 instant_service_->AddObserver(instant_service_observer_.get()); 42 instant_service_->AddObserver(instant_service_observer_.get());
43 } 43 }
44 44
45 virtual void TearDown() OVERRIDE { 45 virtual void TearDown() OVERRIDE {
46 instant_service_->RemoveObserver(instant_service_observer_.get()); 46 instant_service_->RemoveObserver(instant_service_observer_.get());
47 InstantUnitTestBase::TearDown(); 47 InstantUnitTestBase::TearDown();
48 } 48 }
49 49
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 NotifyGoogleBaseURLUpdate(new_base_url); 142 NotifyGoogleBaseURLUpdate(new_base_url);
143 EXPECT_NE(old_prerenderer, GetInstantSearchPrerenderer()); 143 EXPECT_NE(old_prerenderer, GetInstantSearchPrerenderer());
144 } 144 }
145 145
146 TEST_F(InstantServiceTest, OmniboxStartMarginChanged) { 146 TEST_F(InstantServiceTest, OmniboxStartMarginChanged) {
147 int new_start_margin = 92; 147 int new_start_margin = 92;
148 EXPECT_CALL(*instant_service_observer_.get(), 148 EXPECT_CALL(*instant_service_observer_.get(),
149 OmniboxStartMarginChanged(new_start_margin)).Times(1); 149 OmniboxStartMarginChanged(new_start_margin)).Times(1);
150 UpdateOmniboxStartMargin(new_start_margin); 150 UpdateOmniboxStartMargin(new_start_margin);
151 } 151 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/search/instant_unittest_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698