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

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

Issue 73613002: InstantExtended: remove old flags, add new flag for query extraction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 7 years, 1 month 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_tab_helper.h" 5 #include "chrome/browser/ui/search/search_tab_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/signin/fake_signin_manager.h" 10 #include "chrome/browser/signin/fake_signin_manager.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 MOCK_METHOD1(OnLogEvent, void(NTPLoggingEventType event)); 43 MOCK_METHOD1(OnLogEvent, void(NTPLoggingEventType event));
44 MOCK_METHOD1(PasteIntoOmnibox, void(const string16&)); 44 MOCK_METHOD1(PasteIntoOmnibox, void(const string16&));
45 MOCK_METHOD1(OnChromeIdentityCheck, void(const string16& identity)); 45 MOCK_METHOD1(OnChromeIdentityCheck, void(const string16& identity));
46 }; 46 };
47 47
48 } // namespace 48 } // namespace
49 49
50 class SearchTabHelperTest : public ChromeRenderViewHostTestHarness { 50 class SearchTabHelperTest : 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 // Creates a sign-in manager for tests. If |username| is not empty, the 57 // Creates a sign-in manager for tests. If |username| is not empty, the
60 // testing profile of the WebContents will be connected to the given account. 58 // testing profile of the WebContents will be connected to the given account.
61 void CreateSigninManager(const std::string& username) { 59 void CreateSigninManager(const std::string& username) {
62 SigninManagerBase* signin_manager = static_cast<SigninManagerBase*>( 60 SigninManagerBase* signin_manager = static_cast<SigninManagerBase*>(
63 SigninManagerFactory::GetInstance()->SetTestingFactoryAndUse( 61 SigninManagerFactory::GetInstance()->SetTestingFactoryAndUse(
64 profile(), FakeSigninManagerBase::Build)); 62 profile(), FakeSigninManagerBase::Build));
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 198
201 const IPC::Message* message = process()->sink().GetUniqueMessageMatching( 199 const IPC::Message* message = process()->sink().GetUniqueMessageMatching(
202 ChromeViewMsg_ChromeIdentityCheckResult::ID); 200 ChromeViewMsg_ChromeIdentityCheckResult::ID);
203 ASSERT_TRUE(message != NULL); 201 ASSERT_TRUE(message != NULL);
204 202
205 ChromeViewMsg_ChromeIdentityCheckResult::Param params; 203 ChromeViewMsg_ChromeIdentityCheckResult::Param params;
206 ChromeViewMsg_ChromeIdentityCheckResult::Read(message, &params); 204 ChromeViewMsg_ChromeIdentityCheckResult::Read(message, &params);
207 EXPECT_EQ(test_identity, params.a); 205 EXPECT_EQ(test_identity, params.a);
208 ASSERT_FALSE(params.b); 206 ASSERT_FALSE(params.b);
209 } 207 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_model_unittest.cc ('k') | chrome/browser/ui/toolbar/toolbar_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698