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

Side by Side Diff: chrome/browser/ui/search/search_model_unittest.cc

Issue 2122903002: Move search-related files from chrome/common to chrome/common/search (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move search-related files Created 4 years, 5 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
« no previous file with comments | « chrome/browser/ui/search/search_model.h ('k') | chrome/browser/ui/search/search_tab_helper.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 "chrome/browser/ui/search/search_model.h" 5 #include "chrome/browser/ui/search/search_model.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/ui/search/search_model_observer.h" 9 #include "chrome/browser/ui/search/search_model_observer.h"
10 #include "chrome/browser/ui/search/search_tab_helper.h" 10 #include "chrome/browser/ui/search/search_tab_helper.h"
11 #include "chrome/common/chrome_switches.h" 11 #include "chrome/common/chrome_switches.h"
12 #include "chrome/common/search_types.h" 12 #include "chrome/common/search/search_types.h"
13 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 13 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
14 14
15 namespace { 15 namespace {
16 16
17 class MockSearchModelObserver : public SearchModelObserver { 17 class MockSearchModelObserver : public SearchModelObserver {
18 public: 18 public:
19 MockSearchModelObserver(); 19 MockSearchModelObserver();
20 ~MockSearchModelObserver() override; 20 ~MockSearchModelObserver() override;
21 21
22 void ModelChanged(const SearchModel::State& old_state, 22 void ModelChanged(const SearchModel::State& old_state,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 TEST_F(SearchModelTest, UpdateSearchModelState) { 137 TEST_F(SearchModelTest, UpdateSearchModelState) {
138 SearchModel::State expected_new_state(model->state()); 138 SearchModel::State expected_new_state(model->state());
139 expected_new_state.instant_support = INSTANT_SUPPORT_NO; 139 expected_new_state.instant_support = INSTANT_SUPPORT_NO;
140 EXPECT_FALSE(model->state() == expected_new_state); 140 EXPECT_FALSE(model->state() == expected_new_state);
141 model->SetState(expected_new_state); 141 model->SetState(expected_new_state);
142 mock_observer.VerifyNotificationCount(1); 142 mock_observer.VerifyNotificationCount(1);
143 EXPECT_TRUE(model->state() == expected_new_state); 143 EXPECT_TRUE(model->state() == expected_new_state);
144 } 144 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_model.h ('k') | chrome/browser/ui/search/search_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698