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

Unified Diff: trunk/src/components/webdata/common/web_database_migration_unittest.cc

Issue 18177003: Revert 209071 "components/webdata: Break the dependency on chrom..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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 | « trunk/src/components/webdata/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/components/webdata/common/web_database_migration_unittest.cc
===================================================================
--- trunk/src/components/webdata/common/web_database_migration_unittest.cc (revision 209111)
+++ trunk/src/components/webdata/common/web_database_migration_unittest.cc (working copy)
@@ -8,7 +8,6 @@
#include "base/files/scoped_temp_dir.h"
#include "base/guid.h"
#include "base/message_loop.h"
-#include "base/path_service.h"
#include "base/stl_util.h"
#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h"
@@ -20,6 +19,7 @@
#include "chrome/browser/webdata/token_service_table.h"
#include "chrome/browser/webdata/web_apps_table.h"
#include "chrome/browser/webdata/web_intents_table.h"
+#include "chrome/test/base/ui_test_utils.h"
#include "components/autofill/core/browser/autofill_country.h"
#include "components/autofill/core/browser/autofill_profile.h"
#include "components/autofill/core/browser/autofill_type.h"
@@ -207,18 +207,13 @@
}
// The textual contents of |file| are read from
- // "components/test/data/web_database" and returned in the string |contents|.
+ // "chrome/test/data/web_database" and returned in the string |contents|.
// Returns true if the file exists and is read successfully, false otherwise.
bool GetWebDatabaseData(const base::FilePath& file, std::string* contents) {
- base::FilePath source_path;
- PathService::Get(base::DIR_SOURCE_ROOT, &source_path);
- source_path = source_path.AppendASCII("components");
- source_path = source_path.AppendASCII("test");
- source_path = source_path.AppendASCII("data");
- source_path = source_path.AppendASCII("web_database");
- source_path = source_path.Append(file);
- return file_util::PathExists(source_path) &&
- file_util::ReadFileToString(source_path, contents);
+ base::FilePath path = ui_test_utils::GetTestFilePath(
+ base::FilePath(FILE_PATH_LITERAL("web_database")), file);
+ return file_util::PathExists(path) &&
+ file_util::ReadFileToString(path, contents);
}
static int VersionFromConnection(sql::Connection* connection) {
« no previous file with comments | « trunk/src/components/webdata/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698