diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-28 06:49:06 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-28 06:49:06 +0000 |
commit | ce0876b4640cd4a38f5de117c317642ebfb227d9 (patch) | |
tree | 4e2bdb411257770a56eb190d4d5c78d87ee1638e /components/webdata/common/web_database_migration_unittest.cc | |
parent | f896f3cf38e6532ab2a106d1ec368e921d2c7f86 (diff) | |
download | chromium_src-ce0876b4640cd4a38f5de117c317642ebfb227d9.zip chromium_src-ce0876b4640cd4a38f5de117c317642ebfb227d9.tar.gz chromium_src-ce0876b4640cd4a38f5de117c317642ebfb227d9.tar.bz2 |
Revert 209112 "Revert 209071 "components/webdata: Break the depe..."
Broke the tree.
> Revert 209071 "components/webdata: Break the dependency on chrom..."
>
> speculative revert to see if it fixes the android bots.
>
> > components/webdata: Break the dependency on chrome/test/base
> >
> > BUG=181277
> > TBR=joi@chromium.org
> >
> > Review URL: https://codereview.chromium.org/17788002
>
> TBR=tfarina@chromium.org
>
> Review URL: https://codereview.chromium.org/18177003
TBR=sail@chromium.org
Review URL: https://codereview.chromium.org/18120006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209115 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/webdata/common/web_database_migration_unittest.cc')
-rw-r--r-- | components/webdata/common/web_database_migration_unittest.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/components/webdata/common/web_database_migration_unittest.cc b/components/webdata/common/web_database_migration_unittest.cc index 739005d..fed5d5a 100644 --- a/components/webdata/common/web_database_migration_unittest.cc +++ b/components/webdata/common/web_database_migration_unittest.cc @@ -8,6 +8,7 @@ #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" @@ -19,7 +20,6 @@ #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,13 +207,18 @@ class WebDatabaseMigrationTest : public testing::Test { } // The textual contents of |file| are read from - // "chrome/test/data/web_database" and returned in the string |contents|. + // "components/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 path = ui_test_utils::GetTestFilePath( - base::FilePath(FILE_PATH_LITERAL("web_database")), file); - return file_util::PathExists(path) && - file_util::ReadFileToString(path, 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); } static int VersionFromConnection(sql::Connection* connection) { |