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

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

Issue 1428423002: Remove setVoiceSearchSupported part of EmbeddedSearch SearchBox API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac fix Created 5 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
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper.cc ('k') | chrome/browser/ui/view_ids.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_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/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 using testing::Return; 48 using testing::Return;
49 49
50 namespace { 50 namespace {
51 51
52 class MockSearchIPCRouterDelegate : public SearchIPCRouter::Delegate { 52 class MockSearchIPCRouterDelegate : public SearchIPCRouter::Delegate {
53 public: 53 public:
54 virtual ~MockSearchIPCRouterDelegate() {} 54 virtual ~MockSearchIPCRouterDelegate() {}
55 55
56 MOCK_METHOD1(OnInstantSupportDetermined, void(bool supports_instant)); 56 MOCK_METHOD1(OnInstantSupportDetermined, void(bool supports_instant));
57 MOCK_METHOD1(OnSetVoiceSearchSupport, void(bool supports_voice_search));
58 MOCK_METHOD1(FocusOmnibox, void(OmniboxFocusState state)); 57 MOCK_METHOD1(FocusOmnibox, void(OmniboxFocusState state));
59 MOCK_METHOD3(NavigateToURL, void(const GURL&, WindowOpenDisposition, bool)); 58 MOCK_METHOD3(NavigateToURL, void(const GURL&, WindowOpenDisposition, bool));
60 MOCK_METHOD1(OnDeleteMostVisitedItem, void(const GURL& url)); 59 MOCK_METHOD1(OnDeleteMostVisitedItem, void(const GURL& url));
61 MOCK_METHOD1(OnUndoMostVisitedDeletion, void(const GURL& url)); 60 MOCK_METHOD1(OnUndoMostVisitedDeletion, void(const GURL& url));
62 MOCK_METHOD0(OnUndoAllMostVisitedDeletions, void()); 61 MOCK_METHOD0(OnUndoAllMostVisitedDeletions, void());
63 MOCK_METHOD2(OnLogEvent, void(NTPLoggingEventType event, 62 MOCK_METHOD2(OnLogEvent, void(NTPLoggingEventType event,
64 base::TimeDelta time)); 63 base::TimeDelta time));
65 MOCK_METHOD2(OnLogMostVisitedImpression, 64 MOCK_METHOD2(OnLogMostVisitedImpression,
66 void(int position, const base::string16& provider)); 65 void(int position, const base::string16& provider));
67 MOCK_METHOD2(OnLogMostVisitedNavigation, 66 MOCK_METHOD2(OnLogMostVisitedNavigation,
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 408 }
410 409
411 TEST_F(SearchTabHelperPrerenderTest, 410 TEST_F(SearchTabHelperPrerenderTest,
412 OnTabActivatedNoPrerenderIfOmniboxBlurred) { 411 OnTabActivatedNoPrerenderIfOmniboxBlurred) {
413 SearchTabHelperPrerenderTest::omnibox_has_focus_ = false; 412 SearchTabHelperPrerenderTest::omnibox_has_focus_ = false;
414 SearchTabHelper* search_tab_helper = 413 SearchTabHelper* search_tab_helper =
415 SearchTabHelper::FromWebContents(web_contents()); 414 SearchTabHelper::FromWebContents(web_contents());
416 search_tab_helper->OnTabActivated(); 415 search_tab_helper->OnTabActivated();
417 ASSERT_FALSE(IsInstantURLMarkedForPrerendering()); 416 ASSERT_FALSE(IsInstantURLMarkedForPrerendering());
418 } 417 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper.cc ('k') | chrome/browser/ui/view_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698