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

Unified Diff: components/translate/core/common/language_detection_logging_helper_unittest.cc

Issue 2916873004: Quick fix for logging. (Closed)
Patch Set: updates Created 3 years, 6 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
« no previous file with comments | « components/translate/core/common/language_detection_logging_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/translate/core/common/language_detection_logging_helper_unittest.cc
diff --git a/components/translate/core/common/language_detection_logging_helper_unittest.cc b/components/translate/core/common/language_detection_logging_helper_unittest.cc
index 6dc27c098ce4f28afecad35d2e511150b4145f52..c22a0ee0eabdd042f32940336442bdbc3d0b1346 100644
--- a/components/translate/core/common/language_detection_logging_helper_unittest.cc
+++ b/components/translate/core/common/language_detection_logging_helper_unittest.cc
@@ -24,8 +24,11 @@ TEST(LanguageDetectionLoggingHelperTest, ConstructUserEventSpecifics) {
lang->set_language_code(details.cld_language);
lang->set_is_reliable(details.is_cld_reliable);
lang_detection.set_adopted_language_code(details.adopted_language);
+ const int64_t navigation_id = 1000000000000000LL;
const std::unique_ptr<sync_pb::UserEventSpecifics> user_event =
- ConstructLanguageDetectionEvent(details);
+ ConstructLanguageDetectionEvent(navigation_id, details);
+ // Expect the navigation id is correctly set.
+ EXPECT_EQ(user_event->navigation_id(), navigation_id);
EXPECT_EQ(user_event->language_detection().SerializeAsString(),
lang_detection.SerializeAsString());
}
@@ -43,7 +46,9 @@ TEST(LanguageDetectionLoggingHelperTest, DontSetAdoptedLanguage) {
lang->set_language_code(details.cld_language);
lang->set_is_reliable(details.is_cld_reliable);
const std::unique_ptr<sync_pb::UserEventSpecifics> user_event =
- ConstructLanguageDetectionEvent(details);
+ ConstructLanguageDetectionEvent(100, details);
+ // Expect the navigation id is correctly set.
+ EXPECT_EQ(user_event->navigation_id(), 100);
EXPECT_EQ(user_event->language_detection().SerializeAsString(),
lang_detection.SerializeAsString());
}
« no previous file with comments | « components/translate/core/common/language_detection_logging_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698