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

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

Issue 2435683003: Cleanup desktop NTP metrics recording, part 2 (Closed)
Patch Set: review 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 2b33824bddc9d44cef11f2bc95bb15b6a0cef4e0..3461bc7f908f936e78a084ecca81bad3b8f0ed74 100644
--- a/chrome/browser/ui/search/search_ipc_router_unittest.cc
+++ b/chrome/browser/ui/search/search_ipc_router_unittest.cc
@@ -259,7 +259,7 @@ TEST_F(SearchIPCRouterTest, ProcessLogEventMsg) {
NavigateAndCommitActiveTab(GURL(chrome::kChromeSearchLocalNtpUrl));
SetupMockDelegateAndPolicy();
MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy();
- EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_CLIENT_SIDE_SUGGESTION, delta))
+ EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_ALL_TILES_LOADED, delta))
.Times(1);
EXPECT_CALL(*policy, ShouldProcessLogEvent()).Times(1)
.WillOnce(testing::Return(true));
@@ -267,7 +267,7 @@ TEST_F(SearchIPCRouterTest, ProcessLogEventMsg) {
content::WebContents* contents = web_contents();
OnMessageReceived(ChromeViewHostMsg_LogEvent(
contents->GetRoutingID(), GetSearchIPCRouterSeqNo(),
- NTP_CLIENT_SIDE_SUGGESTION, delta));
+ NTP_ALL_TILES_LOADED, delta));
}
TEST_F(SearchIPCRouterTest, IgnoreLogEventMsg) {
@@ -275,7 +275,7 @@ TEST_F(SearchIPCRouterTest, IgnoreLogEventMsg) {
NavigateAndCommitActiveTab(GURL("chrome-search://foo/bar"));
SetupMockDelegateAndPolicy();
MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy();
- EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_CLIENT_SIDE_SUGGESTION, delta))
+ EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_ALL_TILES_LOADED, delta))
.Times(0);
EXPECT_CALL(*policy, ShouldProcessLogEvent()).Times(1)
.WillOnce(testing::Return(false));
@@ -283,7 +283,7 @@ TEST_F(SearchIPCRouterTest, IgnoreLogEventMsg) {
content::WebContents* contents = web_contents();
OnMessageReceived(ChromeViewHostMsg_LogEvent(
contents->GetRoutingID(), GetSearchIPCRouterSeqNo(),
- NTP_CLIENT_SIDE_SUGGESTION, delta));
+ NTP_ALL_TILES_LOADED, delta));
}
TEST_F(SearchIPCRouterTest, ProcessLogMostVisitedImpressionMsg) {
@@ -488,12 +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_CLIENT_SIDE_SUGGESTION, delta))
+ EXPECT_CALL(*mock_delegate(), OnLogEvent(NTP_ALL_TILES_LOADED, delta))
.Times(0);
EXPECT_CALL(*policy, ShouldProcessLogEvent()).Times(0);
OnMessageReceived(
ChromeViewHostMsg_LogEvent(contents->GetRoutingID(), page_seq_no,
- NTP_CLIENT_SIDE_SUGGESTION, delta));
+ NTP_ALL_TILES_LOADED, delta));
base::string16 text;
EXPECT_CALL(*mock_delegate(), PasteIntoOmnibox(text)).Times(0);
« no previous file with comments | « chrome/browser/resources/local_ntp/most_visited_single.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