Commit f762cacc authored by tfarina@chromium.org's avatar tfarina@chromium.org

Reland "components/webdata: Break the dependency on chrome/test/base"

This was reverted because it broke android, because I forgot to remove
a line from build/android/pylib/gtest/test_runner.py

BUG=181277
TBR=joi@chromium.org

Review URL: https://chromiumcodereview.appspot.com/18201002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209348 0039d316-1c4b-4281-b951-d872f2087c98
parent eb4de0a2
......@@ -103,9 +103,9 @@ def _GetDataFilesForTestSuite(product_dir, test_suite_basename):
'chrome/test/data/simple_open_search.xml',
'chrome/test/data/top_sites/',
'chrome/test/data/web_app_info/',
'chrome/test/data/web_database',
'chrome/test/data/webui/',
'chrome/third_party/mock4js/',
'components/test/data/web_database',
'net/data/ssl/certificates',
'third_party/accessibility-developer-tools/gen/axs_testing.js',
'third_party/zlib/google/test/data',
......
......@@ -36,6 +36,7 @@
],
'isolate_dependency_untracked': [
'../base/test/data/',
'../components/test/data/',
'../extensions/test/data/',
'../net/data/',
'../net/tools/testserver/',
......
include_rules = [
"+components/encryptor",
# WebData is used by iOS, which does not use content.
"-content",
"+sql",
......@@ -18,9 +17,6 @@ specific_include_rules = {
"+chrome/browser/webdata/web_data_service.h",
"+chrome/browser/webdata/web_data_service_factory.h",
"+chrome/browser/webdata/web_intents_table.h",
"+chrome/test/base/ui_test_utils.h",
"+content/public/test",
"+testing/gmock/include/gmock/gmock.h",
"+testing/gtest/include/gtest/gtest.h",
],
}
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment