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

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

Issue 424053002: Add a new "Configure" mechanism to CLD browser-side data interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sorin@'s comments Created 6 years, 5 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: 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 bf10a9afd5f40fa9e596d22c2784335cc438369b..07f2734e8c4113ee211ab16a5b757ec411414020 100644
--- a/chrome/browser/component_updater/test/cld_component_installer_unittest.cc
+++ b/chrome/browser/component_updater/test/cld_component_installer_unittest.cc
@@ -14,14 +14,17 @@
#include "base/values.h"
#include "base/version.h"
#include "chrome/browser/component_updater/cld_component_installer.h"
-#include "components/translate/content/browser/data_file_browser_cld_data_provider.h"
+#include "components/translate/content/browser/browser_cld_data_provider.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
+using component_updater::CldComponentInstallerTraits;
+
namespace {
// This has to match what's in cld_component_installer.cc.
const base::FilePath::CharType kTestCldDataFileName[] =
FILE_PATH_LITERAL("cld2_data.bin");
+
} // namespace
namespace component_updater {
@@ -41,16 +44,15 @@ class CldComponentInstallerTest : public PlatformTest {
// The "latest CLD data file" is a static piece of information, and thus
// for correctness we empty it before each test.
- component_updater::CldComponentInstallerTraits::SetLatestCldDataFile(
- base::FilePath());
+ CldComponentInstallerTraits::SetLatestCldDataFile(base::FilePath());
base::FilePath path_now =
- translate::DataFileBrowserCldDataProvider::GetCldDataFilePath();
+ CldComponentInstallerTraits::GetLatestCldDataFile();
ASSERT_TRUE(path_now.empty());
}
protected:
base::ScopedTempDir temp_dir_;
- component_updater::CldComponentInstallerTraits traits_;
+ CldComponentInstallerTraits traits_;
private:
DISALLOW_COPY_AND_ASSIGN(CldComponentInstallerTest);
@@ -58,10 +60,9 @@ class CldComponentInstallerTest : public PlatformTest {
TEST_F(CldComponentInstallerTest, SetLatestCldDataFile) {
const base::FilePath expected(FILE_PATH_LITERAL("test/foo.test"));
- component_updater::CldComponentInstallerTraits::SetLatestCldDataFile(
- expected);
+ CldComponentInstallerTraits::SetLatestCldDataFile(expected);
base::FilePath result =
- translate::DataFileBrowserCldDataProvider::GetCldDataFilePath();
+ CldComponentInstallerTraits::GetLatestCldDataFile();
ASSERT_EQ(expected, result);
}
@@ -115,7 +116,7 @@ TEST_F(CldComponentInstallerTest, ComponentReady) {
const base::Version version("1.2.3.4");
traits_.ComponentReady(version, install_dir, manifest.Pass());
base::FilePath result =
- translate::DataFileBrowserCldDataProvider::GetCldDataFilePath();
+ CldComponentInstallerTraits::GetLatestCldDataFile();
ASSERT_TRUE(StartsWith(result.AsUTF16Unsafe(),
install_dir.AsUTF16Unsafe(),
true));
« no previous file with comments | « chrome/browser/component_updater/cld_component_installer.cc ('k') | chrome/browser/translate/chrome_translate_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698