OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/translate/core/browser/translate_manager.h" | 5 #include "components/translate/core/browser/translate_manager.h" |
6 | 6 |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/memory/ptr_util.h" |
8 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
9 #include "base/test/histogram_tester.h" | 10 #include "base/test/histogram_tester.h" |
10 #include "base/test/scoped_feature_list.h" | 11 #include "base/test/scoped_feature_list.h" |
11 #include "build/build_config.h" | 12 #include "build/build_config.h" |
12 #include "components/infobars/core/infobar.h" | 13 #include "components/infobars/core/infobar.h" |
13 #include "components/pref_registry/pref_registry_syncable.h" | 14 #include "components/pref_registry/pref_registry_syncable.h" |
14 #include "components/sync_preferences/testing_pref_service_syncable.h" | 15 #include "components/sync_preferences/testing_pref_service_syncable.h" |
15 #include "components/translate/core/browser/mock_translate_driver.h" | 16 #include "components/translate/core/browser/mock_translate_driver.h" |
16 #include "components/translate/core/browser/translate_browser_metrics.h" | 17 #include "components/translate/core/browser/translate_browser_metrics.h" |
17 #include "components/translate/core/browser/translate_client.h" | 18 #include "components/translate/core/browser/translate_client.h" |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 // 0.79 and lower than 0.8 and the probability threshold is lower than both | 445 // 0.79 and lower than 0.8 and the probability threshold is lower than both |
445 // the one with "fr" (0.6) and "pt-PT" (0.4). | 446 // the one with "fr" (0.6) and "pt-PT" (0.4). |
446 EXPECT_TRUE(CallLanguageInULP("fr")); | 447 EXPECT_TRUE(CallLanguageInULP("fr")); |
447 EXPECT_TRUE(CallLanguageInULP("pt")); | 448 EXPECT_TRUE(CallLanguageInULP("pt")); |
448 EXPECT_FALSE(CallLanguageInULP("zh-TW")); | 449 EXPECT_FALSE(CallLanguageInULP("zh-TW")); |
449 } | 450 } |
450 | 451 |
451 } // namespace testing | 452 } // namespace testing |
452 | 453 |
453 } // namespace translate | 454 } // namespace translate |
OLD | NEW |