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

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

Issue 2544883006: Cleanup: Replace NTPLoggingTileSource by ntp_tiles::NTPTileSource (Closed)
Patch Set: tests Created 4 years 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
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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 MOCK_METHOD1(OnInstantSupportDetermined, void(bool supports_instant)); 52 MOCK_METHOD1(OnInstantSupportDetermined, void(bool supports_instant));
53 MOCK_METHOD1(FocusOmnibox, void(OmniboxFocusState state)); 53 MOCK_METHOD1(FocusOmnibox, void(OmniboxFocusState state));
54 MOCK_METHOD2(NavigateToURL, void(const GURL&, WindowOpenDisposition)); 54 MOCK_METHOD2(NavigateToURL, void(const GURL&, WindowOpenDisposition));
55 MOCK_METHOD1(OnDeleteMostVisitedItem, void(const GURL& url)); 55 MOCK_METHOD1(OnDeleteMostVisitedItem, void(const GURL& url));
56 MOCK_METHOD1(OnUndoMostVisitedDeletion, void(const GURL& url)); 56 MOCK_METHOD1(OnUndoMostVisitedDeletion, void(const GURL& url));
57 MOCK_METHOD0(OnUndoAllMostVisitedDeletions, void()); 57 MOCK_METHOD0(OnUndoAllMostVisitedDeletions, void());
58 MOCK_METHOD2(OnLogEvent, void(NTPLoggingEventType event, 58 MOCK_METHOD2(OnLogEvent, void(NTPLoggingEventType event,
59 base::TimeDelta time)); 59 base::TimeDelta time));
60 MOCK_METHOD2(OnLogMostVisitedImpression, 60 MOCK_METHOD2(OnLogMostVisitedImpression,
61 void(int position, NTPLoggingTileSource tile_source)); 61 void(int position, ntp_tiles::NTPTileSource tile_source));
62 MOCK_METHOD2(OnLogMostVisitedNavigation, 62 MOCK_METHOD2(OnLogMostVisitedNavigation,
63 void(int position, NTPLoggingTileSource tile_source)); 63 void(int position, ntp_tiles::NTPTileSource tile_source));
64 MOCK_METHOD1(PasteIntoOmnibox, void(const base::string16&)); 64 MOCK_METHOD1(PasteIntoOmnibox, void(const base::string16&));
65 MOCK_METHOD1(OnChromeIdentityCheck, void(const base::string16& identity)); 65 MOCK_METHOD1(OnChromeIdentityCheck, void(const base::string16& identity));
66 MOCK_METHOD0(OnHistorySyncCheck, void()); 66 MOCK_METHOD0(OnHistorySyncCheck, void());
67 }; 67 };
68 68
69 } // namespace 69 } // namespace
70 70
71 class SearchTabHelperTest : public ChromeRenderViewHostTestHarness { 71 class SearchTabHelperTest : public ChromeRenderViewHostTestHarness {
72 public: 72 public:
73 void SetUp() override { 73 void SetUp() override {
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 }; 338 };
339 339
340 TEST_F(SearchTabHelperTest, TitleIsSetForNTP) { 340 TEST_F(SearchTabHelperTest, TitleIsSetForNTP) {
341 TabTitleObserver title_observer(web_contents()); 341 TabTitleObserver title_observer(web_contents());
342 NavigateAndCommit(GURL(chrome::kChromeUINewTabURL)); 342 NavigateAndCommit(GURL(chrome::kChromeUINewTabURL));
343 const base::string16 title = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE); 343 const base::string16 title = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE);
344 EXPECT_EQ(title, title_observer.title_on_start()); 344 EXPECT_EQ(title, title_observer.title_on_start());
345 EXPECT_EQ(title, title_observer.title_on_commit()); 345 EXPECT_EQ(title, title_observer.title_on_commit());
346 EXPECT_EQ(title, web_contents()->GetTitle()); 346 EXPECT_EQ(title, web_contents()->GetTitle());
347 } 347 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper.cc ('k') | chrome/browser/ui/webui/ntp/ntp_user_data_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698