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 28 matching lines...) Expand all Loading... |
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, |
46 content::PageTransition transition, | 46 content::PageTransition transition, |
47 WindowOpenDisposition disposition, | 47 WindowOpenDisposition disposition, |
48 bool is_search_type)); | 48 bool is_search_type)); |
| 49 MOCK_METHOD1(PasteIntoOmnibox, void(const content::WebContents* contents)); |
49 MOCK_METHOD1(DeleteMostVisitedItem, void(const GURL& url)); | 50 MOCK_METHOD1(DeleteMostVisitedItem, void(const GURL& url)); |
50 MOCK_METHOD1(UndoMostVisitedDeletion, void(const GURL& url)); | 51 MOCK_METHOD1(UndoMostVisitedDeletion, void(const GURL& url)); |
51 MOCK_METHOD0(UndoAllMostVisitedDeletions, void()); | 52 MOCK_METHOD0(UndoAllMostVisitedDeletions, void()); |
52 MOCK_METHOD1(InstantPageLoadFailed, void(content::WebContents* contents)); | 53 MOCK_METHOD1(InstantPageLoadFailed, void(content::WebContents* contents)); |
53 }; | 54 }; |
54 | 55 |
55 class FakePage : public InstantPage { | 56 class FakePage : public InstantPage { |
56 public: | 57 public: |
57 FakePage(Delegate* delegate, const std::string& instant_url, | 58 FakePage(Delegate* delegate, const std::string& instant_url, |
58 Profile* profile, bool is_incognito); | 59 Profile* profile, bool is_incognito); |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 page->sender()->SetInputInProgress(false); | 348 page->sender()->SetInputInProgress(false); |
348 EXPECT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxSetInputInProgress::ID)); | 349 EXPECT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxSetInputInProgress::ID)); |
349 | 350 |
350 page->sender()->SendMostVisitedItems(std::vector<InstantMostVisitedItem>()); | 351 page->sender()->SendMostVisitedItems(std::vector<InstantMostVisitedItem>()); |
351 EXPECT_FALSE(MessageWasSent( | 352 EXPECT_FALSE(MessageWasSent( |
352 ChromeViewMsg_SearchBoxMostVisitedItemsChanged::ID)); | 353 ChromeViewMsg_SearchBoxMostVisitedItemsChanged::ID)); |
353 | 354 |
354 page->sender()->ToggleVoiceSearch(); | 355 page->sender()->ToggleVoiceSearch(); |
355 EXPECT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxToggleVoiceSearch::ID)); | 356 EXPECT_FALSE(MessageWasSent(ChromeViewMsg_SearchBoxToggleVoiceSearch::ID)); |
356 } | 357 } |
OLD | NEW |