| 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/search_tab_helper.h" | 5 #include "chrome/browser/ui/search/search_tab_helper.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 MOCK_METHOD1(OnInstantSupportDetermined, void(bool supports_instant)); | 55 MOCK_METHOD1(OnInstantSupportDetermined, void(bool supports_instant)); |
| 56 MOCK_METHOD1(FocusOmnibox, void(OmniboxFocusState state)); | 56 MOCK_METHOD1(FocusOmnibox, void(OmniboxFocusState state)); |
| 57 MOCK_METHOD2(NavigateToURL, void(const GURL&, WindowOpenDisposition)); | 57 MOCK_METHOD2(NavigateToURL, void(const GURL&, WindowOpenDisposition)); |
| 58 MOCK_METHOD1(OnDeleteMostVisitedItem, void(const GURL& url)); | 58 MOCK_METHOD1(OnDeleteMostVisitedItem, void(const GURL& url)); |
| 59 MOCK_METHOD1(OnUndoMostVisitedDeletion, void(const GURL& url)); | 59 MOCK_METHOD1(OnUndoMostVisitedDeletion, void(const GURL& url)); |
| 60 MOCK_METHOD0(OnUndoAllMostVisitedDeletions, void()); | 60 MOCK_METHOD0(OnUndoAllMostVisitedDeletions, void()); |
| 61 MOCK_METHOD2(OnLogEvent, void(NTPLoggingEventType event, | 61 MOCK_METHOD2(OnLogEvent, void(NTPLoggingEventType event, |
| 62 base::TimeDelta time)); | 62 base::TimeDelta time)); |
| 63 MOCK_METHOD2(OnLogMostVisitedImpression, | 63 MOCK_METHOD2(OnLogMostVisitedImpression, |
| 64 void(int position, ntp_tiles::NTPTileSource tile_source)); | 64 void(int position, ntp_tiles::TileSource tile_source)); |
| 65 MOCK_METHOD2(OnLogMostVisitedNavigation, | 65 MOCK_METHOD2(OnLogMostVisitedNavigation, |
| 66 void(int position, ntp_tiles::NTPTileSource tile_source)); | 66 void(int position, ntp_tiles::TileSource tile_source)); |
| 67 MOCK_METHOD1(PasteIntoOmnibox, void(const base::string16&)); | 67 MOCK_METHOD1(PasteIntoOmnibox, void(const base::string16&)); |
| 68 MOCK_METHOD1(OnChromeIdentityCheck, void(const base::string16& identity)); | 68 MOCK_METHOD1(OnChromeIdentityCheck, void(const base::string16& identity)); |
| 69 MOCK_METHOD0(OnHistorySyncCheck, void()); | 69 MOCK_METHOD0(OnHistorySyncCheck, void()); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 class MockSearchBoxClientFactory | 72 class MockSearchBoxClientFactory |
| 73 : public SearchIPCRouter::SearchBoxClientFactory { | 73 : public SearchIPCRouter::SearchBoxClientFactory { |
| 74 public: | 74 public: |
| 75 MOCK_METHOD0(GetSearchBox, chrome::mojom::SearchBox*(void)); | 75 MOCK_METHOD0(GetSearchBox, chrome::mojom::SearchBox*(void)); |
| 76 }; | 76 }; |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 }; | 298 }; |
| 299 | 299 |
| 300 TEST_F(SearchTabHelperTest, TitleIsSetForNTP) { | 300 TEST_F(SearchTabHelperTest, TitleIsSetForNTP) { |
| 301 TabTitleObserver title_observer(web_contents()); | 301 TabTitleObserver title_observer(web_contents()); |
| 302 NavigateAndCommit(GURL(chrome::kChromeUINewTabURL)); | 302 NavigateAndCommit(GURL(chrome::kChromeUINewTabURL)); |
| 303 const base::string16 title = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE); | 303 const base::string16 title = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE); |
| 304 EXPECT_EQ(title, title_observer.title_on_start()); | 304 EXPECT_EQ(title, title_observer.title_on_start()); |
| 305 EXPECT_EQ(title, title_observer.title_on_commit()); | 305 EXPECT_EQ(title, title_observer.title_on_commit()); |
| 306 EXPECT_EQ(title, web_contents()->GetTitle()); | 306 EXPECT_EQ(title, web_contents()->GetTitle()); |
| 307 } | 307 } |
| OLD | NEW |