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

Unified Diff: components/translate/ios/browser/language_detection_controller_unittest.mm

Issue 2913573002: Updates language model on iOS. (Closed)
Patch Set: 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
Index: components/translate/ios/browser/language_detection_controller_unittest.mm
diff --git a/components/translate/ios/browser/language_detection_controller_unittest.mm b/components/translate/ios/browser/language_detection_controller_unittest.mm
index 0593ba8a8180c0f4762d91bb13728158c28dae9b..c74861b4a254d8fc95792001eb431563264518ca 100644
--- a/components/translate/ios/browser/language_detection_controller_unittest.mm
+++ b/components/translate/ios/browser/language_detection_controller_unittest.mm
@@ -59,6 +59,7 @@ class LanguageDetectionControllerTest : public PlatformTest {
TEST_F(LanguageDetectionControllerTest, OnTextCaptured) {
const std::string kRootLanguage("en");
const std::string kContentLanguage("fr");
+ const std::string kUndefined("und");
__block bool block_was_called = false;
auto subscription =
@@ -67,6 +68,8 @@ TEST_F(LanguageDetectionControllerTest, OnTextCaptured) {
block_was_called = true;
EXPECT_EQ(kRootLanguage, details.html_root_language);
EXPECT_EQ(kContentLanguage, details.content_language);
+ EXPECT_FALSE(details.is_cld_reliable);
+ EXPECT_EQ(kUndefined, details.cld_language);
}));
base::DictionaryValue command;
« no previous file with comments | « components/translate/ios/browser/language_detection_controller.mm ('k') | ios/chrome/browser/browsing_data/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698