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

Unified Diff: chrome/browser/translate/translate_browser_test_utils.cc

Issue 296943002: Simplify and extend commenting in test::ScopedCLDDynamicDataHarness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: msw@ comments redux Created 6 years, 7 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
« no previous file with comments | « chrome/browser/translate/translate_browser_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_browser_test_utils.cc
diff --git a/chrome/browser/translate/translate_browser_test_utils.cc b/chrome/browser/translate/translate_browser_test_utils.cc
index 92494d2ef331c6f23589dfdefafcdbc5f58c1dba..bedaab0843123c8d4af54aa2f7a1252a62f6e249 100644
--- a/chrome/browser/translate/translate_browser_test_utils.cc
+++ b/chrome/browser/translate/translate_browser_test_utils.cc
@@ -35,7 +35,7 @@ void GetTestDataSourceDirectory(base::FilePath* out_path) {
#if defined(CLD2_DYNAMIC_MODE) && !defined(CLD2_IS_COMPONENT)
void GetStandaloneDataFileSource(base::FilePath* out_path) {
- ASSERT_NO_FATAL_FAILURE(GetTestDataSourceDirectory(out_path));
+ GetTestDataSourceDirectory(out_path);
*out_path = out_path->Append(FILE_PATH_LITERAL("_platform_specific"))
.Append(FILE_PATH_LITERAL("all"))
.Append(chrome::kCLDDataFilename);
@@ -59,11 +59,11 @@ void DeleteStandaloneDataFile() {
void CopyStandaloneDataFile() {
DeleteStandaloneDataFile(); // sanity: blow away any old copies.
base::FilePath target_file;
- ASSERT_NO_FATAL_FAILURE(GetStandaloneDataFileDestination(&target_file));
+ GetStandaloneDataFileDestination(&target_file);
base::FilePath target_dir = target_file.DirName();
ASSERT_TRUE(base::CreateDirectoryAndGetError(target_dir, NULL));
base::FilePath source_file;
- ASSERT_NO_FATAL_FAILURE(GetStandaloneDataFileSource(&source_file));
+ GetStandaloneDataFileSource(&source_file);
DLOG(INFO) << "Copying CLD test data file from " << source_file.value()
<< " to " << target_file.value();
ASSERT_TRUE(base::CopyFile(source_file, target_file));
@@ -80,7 +80,7 @@ void GetExtractedComponentDestination(base::FilePath* out_path) {
}
void GetComponentDataFileDestination(base::FilePath* out_path) {
- ASSERT_NO_FATAL_FAILURE(GetExtractedComponentDestination(out_path));
+ GetExtractedComponentDestination(out_path);
*out_path = out_path->Append(kCrxVersion)
.Append(FILE_PATH_LITERAL("_platform_specific"))
.Append(FILE_PATH_LITERAL("all"))
@@ -97,16 +97,16 @@ void DeleteComponentTree() {
void CopyComponentTree() {
DeleteComponentTree(); // sanity: blow away any old copies.
base::FilePath target_dir;
- ASSERT_NO_FATAL_FAILURE(GetExtractedComponentDestination(&target_dir));
+ GetExtractedComponentDestination(&target_dir);
base::FilePath source_dir;
+ GetTestDataSourceDirectory(&source_dir);
DLOG(INFO) << "Copying CLD component test files from " << source_dir.value()
<< " to " << target_dir.value();
- ASSERT_NO_FATAL_FAILURE(GetTestDataSourceDirectory(&source_dir));
ASSERT_TRUE(base::CreateDirectoryAndGetError(target_dir, NULL));
ASSERT_TRUE(base::CopyDirectory(source_dir, target_dir, true));
ASSERT_TRUE(base::PathExists(target_dir));
base::FilePath check_path;
- ASSERT_NO_FATAL_FAILURE(GetComponentDataFileDestination(&check_path));
+ GetComponentDataFileDestination(&check_path);
ASSERT_TRUE(base::PathExists(check_path));
}
#endif // defined(CLD2_DYNAMIC_MODE) && defined(CLD2_IS_COMPONENT)
@@ -139,7 +139,7 @@ void ScopedCLDDynamicDataHarness::Init() {
// Dynamic data mode is enabled and we are using the component updater.
ASSERT_NO_FATAL_FAILURE(CopyComponentTree());
base::FilePath data_file;
- ASSERT_NO_FATAL_FAILURE(GetComponentDataFileDestination(&data_file));
+ GetComponentDataFileDestination(&data_file);
component_updater::CldComponentInstallerTraits::SetLatestCldDataFile(
data_file);
base::FilePath result = component_updater::GetLatestCldDataFile();
« no previous file with comments | « chrome/browser/translate/translate_browser_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698