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

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

Issue 24733003: Update defaults for InstantExtended. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up test. Created 7 years, 2 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
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_ipc_router.h" 5 #include "chrome/browser/ui/search/search_ipc_router.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 MOCK_METHOD0(ShouldSendSetDisplayInstantResults, bool()); 43 MOCK_METHOD0(ShouldSendSetDisplayInstantResults, bool());
44 MOCK_METHOD0(ShouldSendMostVisitedItems, bool()); 44 MOCK_METHOD0(ShouldSendMostVisitedItems, bool());
45 MOCK_METHOD0(ShouldSendThemeBackgroundInfo, bool()); 45 MOCK_METHOD0(ShouldSendThemeBackgroundInfo, bool());
46 }; 46 };
47 47
48 } // namespace 48 } // namespace
49 49
50 class SearchIPCRouterTest : public ChromeRenderViewHostTestHarness { 50 class SearchIPCRouterTest : public ChromeRenderViewHostTestHarness {
51 public: 51 public:
52 virtual void SetUp() { 52 virtual void SetUp() {
53 CommandLine::ForCurrentProcess()->AppendSwitch(
54 switches::kEnableInstantExtendedAPI);
55 ChromeRenderViewHostTestHarness::SetUp(); 53 ChromeRenderViewHostTestHarness::SetUp();
56 SearchTabHelper::CreateForWebContents(web_contents()); 54 SearchTabHelper::CreateForWebContents(web_contents());
57 } 55 }
58 56
59 SearchTabHelper* GetSearchTabHelper( 57 SearchTabHelper* GetSearchTabHelper(
60 content::WebContents* web_contents) { 58 content::WebContents* web_contents) {
61 EXPECT_NE(static_cast<content::WebContents*>(NULL), web_contents); 59 EXPECT_NE(static_cast<content::WebContents*>(NULL), web_contents);
62 return SearchTabHelper::FromWebContents(web_contents); 60 return SearchTabHelper::FromWebContents(web_contents);
63 } 61 }
64 62
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 SetupMockDelegateAndPolicy(web_contents()); 213 SetupMockDelegateAndPolicy(web_contents());
216 MockSearchIPCRouterPolicy* policy = 214 MockSearchIPCRouterPolicy* policy =
217 GetSearchIPCRouterPolicy(web_contents()); 215 GetSearchIPCRouterPolicy(web_contents());
218 EXPECT_CALL(*policy, ShouldSendThemeBackgroundInfo()).Times(1) 216 EXPECT_CALL(*policy, ShouldSendThemeBackgroundInfo()).Times(1)
219 .WillOnce(testing::Return(false)); 217 .WillOnce(testing::Return(false));
220 218
221 GetSearchTabHelper(web_contents())->ipc_router().SendThemeBackgroundInfo( 219 GetSearchTabHelper(web_contents())->ipc_router().SendThemeBackgroundInfo(
222 ThemeBackgroundInfo()); 220 ThemeBackgroundInfo());
223 ASSERT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxThemeChanged::ID)); 221 ASSERT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxThemeChanged::ID));
224 } 222 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698