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

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

Issue 1436583002: Revert of Remove setVoiceSearchSupported part of EmbeddedSearch SearchBox API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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));
57 MOCK_METHOD1(FocusOmnibox, void(OmniboxFocusState state)); 58 MOCK_METHOD1(FocusOmnibox, void(OmniboxFocusState state));
58 MOCK_METHOD3(NavigateToURL, void(const GURL&, WindowOpenDisposition, bool)); 59 MOCK_METHOD3(NavigateToURL, void(const GURL&, WindowOpenDisposition, bool));
59 MOCK_METHOD1(OnDeleteMostVisitedItem, void(const GURL& url)); 60 MOCK_METHOD1(OnDeleteMostVisitedItem, void(const GURL& url));
60 MOCK_METHOD1(OnUndoMostVisitedDeletion, void(const GURL& url)); 61 MOCK_METHOD1(OnUndoMostVisitedDeletion, void(const GURL& url));
61 MOCK_METHOD0(OnUndoAllMostVisitedDeletions, void()); 62 MOCK_METHOD0(OnUndoAllMostVisitedDeletions, void());
62 MOCK_METHOD2(OnLogEvent, void(NTPLoggingEventType event, 63 MOCK_METHOD2(OnLogEvent, void(NTPLoggingEventType event,
63 base::TimeDelta time)); 64 base::TimeDelta time));
64 MOCK_METHOD2(OnLogMostVisitedImpression, 65 MOCK_METHOD2(OnLogMostVisitedImpression,
65 void(int position, const base::string16& provider)); 66 void(int position, const base::string16& provider));
66 MOCK_METHOD2(OnLogMostVisitedNavigation, 67 MOCK_METHOD2(OnLogMostVisitedNavigation,
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 } 409 }
409 410
410 TEST_F(SearchTabHelperPrerenderTest, 411 TEST_F(SearchTabHelperPrerenderTest,
411 OnTabActivatedNoPrerenderIfOmniboxBlurred) { 412 OnTabActivatedNoPrerenderIfOmniboxBlurred) {
412 SearchTabHelperPrerenderTest::omnibox_has_focus_ = false; 413 SearchTabHelperPrerenderTest::omnibox_has_focus_ = false;
413 SearchTabHelper* search_tab_helper = 414 SearchTabHelper* search_tab_helper =
414 SearchTabHelper::FromWebContents(web_contents()); 415 SearchTabHelper::FromWebContents(web_contents());
415 search_tab_helper->OnTabActivated(); 416 search_tab_helper->OnTabActivated();
416 ASSERT_FALSE(IsInstantURLMarkedForPrerendering()); 417 ASSERT_FALSE(IsInstantURLMarkedForPrerendering());
417 } 418 }
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