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

Side by Side Diff: components/translate/core/browser/translate_manager_unittest.cc

Issue 2819793002: Translate: do not show the context menu entry when the feature is disabled (Closed)
Patch Set: some more include path changes for ios/android Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/run_loop.h" 11 #include "base/run_loop.h"
12 #include "base/test/histogram_tester.h" 12 #include "base/test/histogram_tester.h"
13 #include "base/test/scoped_feature_list.h" 13 #include "base/test/scoped_feature_list.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "components/infobars/core/infobar.h" 15 #include "components/infobars/core/infobar.h"
16 #include "components/pref_registry/pref_registry_syncable.h" 16 #include "components/pref_registry/pref_registry_syncable.h"
17 #include "components/sync_preferences/testing_pref_service_syncable.h" 17 #include "components/sync_preferences/testing_pref_service_syncable.h"
18 #include "components/translate/core/browser/mock_translate_driver.h" 18 #include "components/translate/core/browser/mock_translate_driver.h"
19 #include "components/translate/core/browser/mock_translate_ranker.h" 19 #include "components/translate/core/browser/mock_translate_ranker.h"
20 #include "components/translate/core/browser/translate_browser_metrics.h" 20 #include "components/translate/core/browser/translate_browser_metrics.h"
21 #include "components/translate/core/browser/translate_client.h" 21 #include "components/translate/core/browser/translate_client.h"
22 #include "components/translate/core/browser/translate_download_manager.h" 22 #include "components/translate/core/browser/translate_download_manager.h"
23 #include "components/translate/core/browser/translate_pref_names.h"
23 #include "components/translate/core/browser/translate_prefs.h" 24 #include "components/translate/core/browser/translate_prefs.h"
24 #include "components/translate/core/common/translate_pref_names.h"
25 #include "components/variations/variations_associated_data.h" 25 #include "components/variations/variations_associated_data.h"
26 #include "net/base/network_change_notifier.h" 26 #include "net/base/network_change_notifier.h"
27 #include "testing/gmock/include/gmock/gmock.h" 27 #include "testing/gmock/include/gmock/gmock.h"
28 #include "testing/gtest/include/gtest/gtest.h" 28 #include "testing/gtest/include/gtest/gtest.h"
29 29
30 using testing::_; 30 using testing::_;
31 using testing::Return; 31 using testing::Return;
32 using testing::SetArgPointee; 32 using testing::SetArgPointee;
33 33
34 namespace translate { 34 namespace translate {
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 // 0.79 and lower than 0.8 and the probability threshold is lower than both 467 // 0.79 and lower than 0.8 and the probability threshold is lower than both
468 // the one with "fr" (0.6) and "pt-PT" (0.4). 468 // the one with "fr" (0.6) and "pt-PT" (0.4).
469 EXPECT_TRUE(CallLanguageInULP("fr")); 469 EXPECT_TRUE(CallLanguageInULP("fr"));
470 EXPECT_TRUE(CallLanguageInULP("pt")); 470 EXPECT_TRUE(CallLanguageInULP("pt"));
471 EXPECT_FALSE(CallLanguageInULP("zh-TW")); 471 EXPECT_FALSE(CallLanguageInULP("zh-TW"));
472 } 472 }
473 473
474 } // namespace testing 474 } // namespace testing
475 475
476 } // namespace translate 476 } // namespace translate
OLDNEW
« no previous file with comments | « components/translate/core/browser/translate_manager.cc ('k') | components/translate/core/browser/translate_pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698