OLD | NEW |
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/instant_page.h" | 5 #include "chrome/browser/ui/search/instant_page.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 "chrome/browser/ui/search/search_tab_helper.h" | 9 #include "chrome/browser/ui/search/search_tab_helper.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 class FakePageDelegate : public InstantPage::Delegate { | 25 class FakePageDelegate : public InstantPage::Delegate { |
26 public: | 26 public: |
27 virtual ~FakePageDelegate() { | 27 virtual ~FakePageDelegate() { |
28 } | 28 } |
29 | 29 |
30 MOCK_METHOD1(InstantPageRenderViewCreated, | 30 MOCK_METHOD1(InstantPageRenderViewCreated, |
31 void(const content::WebContents* contents)); | 31 void(const content::WebContents* contents)); |
32 MOCK_METHOD2(InstantSupportDetermined, | 32 MOCK_METHOD2(InstantSupportDetermined, |
33 void(const content::WebContents* contents, | 33 void(const content::WebContents* contents, |
34 bool supports_instant)); | 34 bool supports_instant)); |
35 MOCK_METHOD1(InstantPageRenderViewGone, | 35 MOCK_METHOD1(InstantPageRenderProcessGone, |
36 void(const content::WebContents* contents)); | 36 void(const content::WebContents* contents)); |
37 MOCK_METHOD2(InstantPageAboutToNavigateMainFrame, | 37 MOCK_METHOD2(InstantPageAboutToNavigateMainFrame, |
38 void(const content::WebContents* contents, | 38 void(const content::WebContents* contents, |
39 const GURL& url)); | 39 const GURL& url)); |
40 MOCK_METHOD2(FocusOmnibox, | 40 MOCK_METHOD2(FocusOmnibox, |
41 void(const content::WebContents* contents, | 41 void(const content::WebContents* contents, |
42 OmniboxFocusState state)); | 42 OmniboxFocusState state)); |
43 MOCK_METHOD5(NavigateToURL, | 43 MOCK_METHOD5(NavigateToURL, |
44 void(const content::WebContents* contents, | 44 void(const content::WebContents* contents, |
45 const GURL& url, | 45 const GURL& url, |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 page->sender()->SetInputInProgress(false); | 349 page->sender()->SetInputInProgress(false); |
350 EXPECT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxSetInputInProgress::ID)); | 350 EXPECT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxSetInputInProgress::ID)); |
351 | 351 |
352 page->sender()->SendMostVisitedItems(std::vector<InstantMostVisitedItem>()); | 352 page->sender()->SendMostVisitedItems(std::vector<InstantMostVisitedItem>()); |
353 EXPECT_FALSE(MessageWasSent( | 353 EXPECT_FALSE(MessageWasSent( |
354 ChromeViewMsg_SearchBoxMostVisitedItemsChanged::ID)); | 354 ChromeViewMsg_SearchBoxMostVisitedItemsChanged::ID)); |
355 | 355 |
356 page->sender()->ToggleVoiceSearch(); | 356 page->sender()->ToggleVoiceSearch(); |
357 EXPECT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxToggleVoiceSearch::ID)); | 357 EXPECT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxToggleVoiceSearch::ID)); |
358 } | 358 } |
OLD | NEW |