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

Unified Diff: chrome/browser/component_updater/test/cld_component_installer_unittest.cc

Issue 461633002: Refactor language detection logic to allow non-static CLD data sources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make some of the harness factory methods private Created 6 years, 1 month 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/component_updater/test/cld_component_installer_unittest.cc
diff --git a/chrome/browser/component_updater/test/cld_component_installer_unittest.cc b/chrome/browser/component_updater/test/cld_component_installer_unittest.cc
index 0f10ac8ea6fa8f8ce75008e3f8381b463f56978b..3d39ef72c4945e39611fb0cb19511f5cded1a7a5 100644
--- a/chrome/browser/component_updater/test/cld_component_installer_unittest.cc
+++ b/chrome/browser/component_updater/test/cld_component_installer_unittest.cc
@@ -16,6 +16,7 @@
#include "base/version.h"
#include "chrome/browser/component_updater/cld_component_installer.h"
#include "components/translate/content/browser/browser_cld_data_provider.h"
+#include "components/translate/content/common/cld_data_source.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -35,6 +36,7 @@ class CldComponentInstallerTest : public PlatformTest {
CldComponentInstallerTest() {}
void SetUp() override {
PlatformTest::SetUp();
+ translate::CldDataSource::DisableSanityChecksForTest();
// ScopedTempDir automatically does a recursive delete on the entire
// directory in its destructor, so no cleanup is required in TearDown.
@@ -51,6 +53,10 @@ class CldComponentInstallerTest : public PlatformTest {
ASSERT_TRUE(path_now.empty());
}
+ void TearDown() override {
+ // Restore sanity checks.
+ translate::CldDataSource::EnableSanityChecksForTest();
+ }
protected:
base::ScopedTempDir temp_dir_;
CldComponentInstallerTraits traits_;
« no previous file with comments | « chrome/browser/component_updater/cld_component_installer.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698