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

Unified Diff: chrome/browser/ui/search/search_ipc_router_unittest.cc

Issue 2429523002: Cleanup desktop NTP metrics recording (Closed)
Patch Set: . Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/search/search_ipc_router_unittest.cc
diff --git a/chrome/browser/ui/search/search_ipc_router_unittest.cc b/chrome/browser/ui/search/search_ipc_router_unittest.cc
index 53319317d57112d83ccb13ae24ad9311ff392ba2..2b33824bddc9d44cef11f2bc95bb15b6a0cef4e0 100644
--- a/chrome/browser/ui/search/search_ipc_router_unittest.cc
+++ b/chrome/browser/ui/search/search_ipc_router_unittest.cc
@@ -259,14 +259,15 @@ TEST_F(SearchIPCRouterTest, ProcessLogEventMsg) {
NavigateAndCommitActiveTab(GURL(chrome::kChromeSearchLocalNtpUrl));
SetupMockDelegateAndPolicy();
MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy();
- EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_TILE, delta)).Times(1);
+ EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_CLIENT_SIDE_SUGGESTION, delta))
+ .Times(1);
EXPECT_CALL(*policy, ShouldProcessLogEvent()).Times(1)
.WillOnce(testing::Return(true));
content::WebContents* contents = web_contents();
OnMessageReceived(ChromeViewHostMsg_LogEvent(
contents->GetRoutingID(), GetSearchIPCRouterSeqNo(),
- NTP_TILE, delta));
+ NTP_CLIENT_SIDE_SUGGESTION, delta));
}
TEST_F(SearchIPCRouterTest, IgnoreLogEventMsg) {
@@ -274,14 +275,15 @@ TEST_F(SearchIPCRouterTest, IgnoreLogEventMsg) {
NavigateAndCommitActiveTab(GURL("chrome-search://foo/bar"));
SetupMockDelegateAndPolicy();
MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy();
- EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_TILE, delta)).Times(0);
+ EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_CLIENT_SIDE_SUGGESTION, delta))
+ .Times(0);
EXPECT_CALL(*policy, ShouldProcessLogEvent()).Times(1)
.WillOnce(testing::Return(false));
content::WebContents* contents = web_contents();
OnMessageReceived(ChromeViewHostMsg_LogEvent(
contents->GetRoutingID(), GetSearchIPCRouterSeqNo(),
- NTP_TILE, delta));
+ NTP_CLIENT_SIDE_SUGGESTION, delta));
}
TEST_F(SearchIPCRouterTest, ProcessLogMostVisitedImpressionMsg) {
@@ -486,11 +488,12 @@ TEST_F(SearchIPCRouterTest, IgnoreMessageIfThePageIsNotActive) {
contents->GetRoutingID(), page_seq_no, OMNIBOX_FOCUS_VISIBLE));
base::TimeDelta delta = base::TimeDelta::FromMilliseconds(123);
- EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_TILE, delta)).Times(0);
+ EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_CLIENT_SIDE_SUGGESTION, delta))
+ .Times(0);
EXPECT_CALL(*policy, ShouldProcessLogEvent()).Times(0);
- OnMessageReceived(ChromeViewHostMsg_LogEvent(contents->GetRoutingID(),
- page_seq_no,
- NTP_TILE, delta));
+ OnMessageReceived(
+ ChromeViewHostMsg_LogEvent(contents->GetRoutingID(), page_seq_no,
+ NTP_CLIENT_SIDE_SUGGESTION, delta));
base::string16 text;
EXPECT_CALL(*mock_delegate(), PasteIntoOmnibox(text)).Times(0);
« no previous file with comments | « chrome/browser/resources/local_ntp/most_visited_util.js ('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