summaryrefslogtreecommitdiffstats
path: root/content/public/test
diff options
context:
space:
mode:
Diffstat (limited to 'content/public/test')
-rw-r--r--content/public/test/browser_test_base.cc2
-rw-r--r--content/public/test/browser_test_utils.cc2
-rw-r--r--content/public/test/browser_test_utils.h3
-rw-r--r--content/public/test/mock_download_item.h12
-rw-r--r--content/public/test/mock_download_manager.cc8
-rw-r--r--content/public/test/mock_download_manager.h12
-rw-r--r--content/public/test/render_widget_test.cc2
-rw-r--r--content/public/test/render_widget_test.h3
-rw-r--r--content/public/test/test_browser_context.cc6
-rw-r--r--content/public/test/test_browser_context.h6
-rw-r--r--content/public/test/test_file_error_injector.cc20
-rw-r--r--content/public/test/test_launcher.cc19
12 files changed, 49 insertions, 46 deletions
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc
index d0b83cd..04d6ff0 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -112,7 +112,7 @@ void BrowserTestBase::ProxyRunTestOnMainThreadLoop() {
RunTestOnMainThreadLoop();
}
-void BrowserTestBase::CreateTestServer(const FilePath& test_server_base) {
+void BrowserTestBase::CreateTestServer(const base::FilePath& test_server_base) {
CHECK(!test_server_.get());
test_server_.reset(new net::TestServer(
net::TestServer::TYPE_HTTP,
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index 69d0b98cd..8b8b6ba 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -192,7 +192,7 @@ void SetCookieOnIOThread(const GURL& url,
} // namespace
-GURL GetFileUrlWithQuery(const FilePath& path,
+GURL GetFileUrlWithQuery(const base::FilePath& path,
const std::string& query_string) {
GURL url = net::FilePathToFileURL(path);
if (!query_string.empty()) {
diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
index 5ae5644..b75782c 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -50,7 +50,8 @@ class RenderViewHost;
class WebContents;
// Generate a URL for a file path including a query string.
-GURL GetFileUrlWithQuery(const FilePath& path, const std::string& query_string);
+GURL GetFileUrlWithQuery(const base::FilePath& path,
+ const std::string& query_string);
// Waits for a load stop for the specified |web_contents|'s controller, if the
// tab is currently web_contents. Otherwise returns immediately.
diff --git a/content/public/test/mock_download_item.h b/content/public/test/mock_download_item.h
index 08f4dc3..fc75efc 100644
--- a/content/public/test/mock_download_item.h
+++ b/content/public/test/mock_download_item.h
@@ -57,11 +57,11 @@ class MockDownloadItem : public DownloadItem {
MOCK_CONST_METHOD0(GetLastModifiedTime, const std::string&());
MOCK_CONST_METHOD0(GetETag, const std::string&());
MOCK_CONST_METHOD0(IsSavePackageDownload, bool());
- MOCK_CONST_METHOD0(GetFullPath, const FilePath&());
- MOCK_CONST_METHOD0(GetTargetFilePath, const FilePath&());
- MOCK_CONST_METHOD0(GetForcedFilePath, const FilePath&());
- MOCK_CONST_METHOD0(GetUserVerifiedFilePath, FilePath());
- MOCK_CONST_METHOD0(GetFileNameToReportUser, FilePath());
+ MOCK_CONST_METHOD0(GetFullPath, const base::FilePath&());
+ MOCK_CONST_METHOD0(GetTargetFilePath, const base::FilePath&());
+ MOCK_CONST_METHOD0(GetForcedFilePath, const base::FilePath&());
+ MOCK_CONST_METHOD0(GetUserVerifiedFilePath, base::FilePath());
+ MOCK_CONST_METHOD0(GetFileNameToReportUser, base::FilePath());
MOCK_CONST_METHOD0(GetTargetDisposition, TargetDisposition());
MOCK_CONST_METHOD0(GetHash, const std::string&());
MOCK_CONST_METHOD0(GetHashState, const std::string&());
@@ -88,7 +88,7 @@ class MockDownloadItem : public DownloadItem {
MOCK_METHOD1(SetOpenWhenComplete, void(bool));
MOCK_METHOD1(SetIsTemporary, void(bool));
MOCK_METHOD1(SetOpened, void(bool));
- MOCK_METHOD1(SetDisplayName, void(const FilePath&));
+ MOCK_METHOD1(SetDisplayName, void(const base::FilePath&));
MOCK_CONST_METHOD1(DebugString, std::string(bool));
};
diff --git a/content/public/test/mock_download_manager.cc b/content/public/test/mock_download_manager.cc
index a3b9615..143ff24 100644
--- a/content/public/test/mock_download_manager.cc
+++ b/content/public/test/mock_download_manager.cc
@@ -10,8 +10,8 @@
namespace content {
MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
- const FilePath& current_path,
- const FilePath& target_path,
+ const base::FilePath& current_path,
+ const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
const base::Time& start_time,
@@ -79,8 +79,8 @@ DownloadItem* MockDownloadManager::StartDownload(
}
DownloadItem* MockDownloadManager::CreateDownloadItem(
- const FilePath& current_path,
- const FilePath& target_path,
+ const base::FilePath& current_path,
+ const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
const base::Time& start_time,
diff --git a/content/public/test/mock_download_manager.h b/content/public/test/mock_download_manager.h
index 04cac3f..1dbbbca 100644
--- a/content/public/test/mock_download_manager.h
+++ b/content/public/test/mock_download_manager.h
@@ -26,8 +26,8 @@ class MockDownloadManager : public DownloadManager {
// Structure to make it possible to match more than 10 arguments on
// CreateDownloadItem.
struct CreateDownloadItemAdapter {
- FilePath current_path;
- FilePath target_path;
+ base::FilePath current_path;
+ base::FilePath target_path;
std::vector<GURL> url_chain;
GURL referrer_url;
base::Time start_time;
@@ -40,8 +40,8 @@ class MockDownloadManager : public DownloadManager {
bool opened;
CreateDownloadItemAdapter(
- const FilePath& current_path,
- const FilePath& target_path,
+ const base::FilePath& current_path,
+ const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
const base::Time& start_time,
@@ -89,8 +89,8 @@ class MockDownloadManager : public DownloadManager {
// Redirects to mock method to get around gmock 10 argument limit.
virtual DownloadItem* CreateDownloadItem(
- const FilePath& current_path,
- const FilePath& target_path,
+ const base::FilePath& current_path,
+ const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
const base::Time& start_time,
diff --git a/content/public/test/render_widget_test.cc b/content/public/test/render_widget_test.cc
index 1b805c3..564768b 100644
--- a/content/public/test/render_widget_test.cc
+++ b/content/public/test/render_widget_test.cc
@@ -131,7 +131,7 @@ bool RenderWidgetTest::ImageContainsColor(const SkBitmap& bitmap,
}
void RenderWidgetTest::OutputBitmapToFile(const SkBitmap& bitmap,
- const FilePath& file_path) {
+ const base::FilePath& file_path) {
scoped_refptr<base::RefCountedBytes> bitmap_data(new base::RefCountedBytes());
SkAutoLockPixels lock(bitmap);
ASSERT_TRUE(gfx::JPEGCodec::Encode(
diff --git a/content/public/test/render_widget_test.h b/content/public/test/render_widget_test.h
index 7b471923..d163ea1 100644
--- a/content/public/test/render_widget_test.h
+++ b/content/public/test/render_widget_test.h
@@ -52,7 +52,8 @@ class RenderWidgetTest : public RenderViewTest {
// file_util::CreateTemporaryFile(&tmp_path);
// OutputBitmapToFile(bitmap, tmp_path);
// LOG(INFO) << "Bitmap image stored at: " << tmp_path.value();
- void OutputBitmapToFile(const SkBitmap& bitmap, const FilePath& file_path);
+ void OutputBitmapToFile(const SkBitmap& bitmap,
+ const base::FilePath& file_path);
};
} // namespace content
diff --git a/content/public/test/test_browser_context.cc b/content/public/test/test_browser_context.cc
index b954c70..7dc1c84 100644
--- a/content/public/test/test_browser_context.cc
+++ b/content/public/test/test_browser_context.cc
@@ -48,7 +48,7 @@ TestBrowserContext::TestBrowserContext() {
TestBrowserContext::~TestBrowserContext() {
}
-FilePath TestBrowserContext::TakePath() {
+base::FilePath TestBrowserContext::TakePath() {
return browser_context_dir_.Take();
}
@@ -57,7 +57,7 @@ void TestBrowserContext::SetSpecialStoragePolicy(
special_storage_policy_ = policy;
}
-FilePath TestBrowserContext::GetPath() {
+base::FilePath TestBrowserContext::GetPath() {
return browser_context_dir_.path();
}
@@ -94,7 +94,7 @@ TestBrowserContext::GetMediaRequestContextForRenderProcess(
net::URLRequestContextGetter*
TestBrowserContext::GetMediaRequestContextForStoragePartition(
- const FilePath& partition_path,
+ const base::FilePath& partition_path,
bool in_memory) {
return NULL;
}
diff --git a/content/public/test/test_browser_context.h b/content/public/test/test_browser_context.h
index 41ddfdd..120fd01 100644
--- a/content/public/test/test_browser_context.h
+++ b/content/public/test/test_browser_context.h
@@ -23,11 +23,11 @@ class TestBrowserContext : public BrowserContext {
// Takes ownership of the temporary directory so that it's not deleted when
// this object is destructed.
- FilePath TakePath();
+ base::FilePath TakePath();
void SetSpecialStoragePolicy(quota::SpecialStoragePolicy* policy);
- virtual FilePath GetPath() OVERRIDE;
+ virtual base::FilePath GetPath() OVERRIDE;
virtual bool IsOffTheRecord() const OVERRIDE;
virtual DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE;
virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
@@ -38,7 +38,7 @@ class TestBrowserContext : public BrowserContext {
int renderer_child_id) OVERRIDE;
virtual net::URLRequestContextGetter*
GetMediaRequestContextForStoragePartition(
- const FilePath& partition_path,
+ const base::FilePath& partition_path,
bool in_memory) OVERRIDE;
virtual ResourceContext* GetResourceContext() OVERRIDE;
virtual GeolocationPermissionContext*
diff --git a/content/public/test/test_file_error_injector.cc b/content/public/test/test_file_error_injector.cc
index 2a0c690..584b41056 100644
--- a/content/public/test/test_file_error_injector.cc
+++ b/content/public/test/test_file_error_injector.cc
@@ -30,7 +30,7 @@ class DownloadFileWithErrors: public DownloadFileImpl {
DownloadFileWithErrors(
scoped_ptr<DownloadSaveInfo> save_info,
- const FilePath& default_download_directory,
+ const base::FilePath& default_download_directory,
const GURL& url,
const GURL& referrer_url,
bool calculate_hash,
@@ -50,10 +50,10 @@ class DownloadFileWithErrors: public DownloadFileImpl {
virtual DownloadInterruptReason AppendDataToFile(
const char* data, size_t data_len) OVERRIDE;
virtual void RenameAndUniquify(
- const FilePath& full_path,
+ const base::FilePath& full_path,
const RenameCompletionCallback& callback) OVERRIDE;
virtual void RenameAndAnnotate(
- const FilePath& full_path,
+ const base::FilePath& full_path,
const RenameCompletionCallback& callback) OVERRIDE;
private:
@@ -96,16 +96,16 @@ static void RenameErrorCallback(
const DownloadFile::RenameCompletionCallback original_callback,
DownloadInterruptReason overwrite_error,
DownloadInterruptReason original_error,
- const FilePath& path_result) {
+ const base::FilePath& path_result) {
original_callback.Run(
overwrite_error,
overwrite_error == DOWNLOAD_INTERRUPT_REASON_NONE ?
- path_result : FilePath());
+ path_result : base::FilePath());
}
DownloadFileWithErrors::DownloadFileWithErrors(
scoped_ptr<DownloadSaveInfo> save_info,
- const FilePath& default_download_directory,
+ const base::FilePath& default_download_directory,
const GURL& url,
const GURL& referrer_url,
bool calculate_hash,
@@ -154,7 +154,7 @@ DownloadInterruptReason DownloadFileWithErrors::AppendDataToFile(
}
void DownloadFileWithErrors::RenameAndUniquify(
- const FilePath& full_path,
+ const base::FilePath& full_path,
const RenameCompletionCallback& callback) {
DownloadInterruptReason error_to_return = DOWNLOAD_INTERRUPT_REASON_NONE;
RenameCompletionCallback callback_to_use = callback;
@@ -171,7 +171,7 @@ void DownloadFileWithErrors::RenameAndUniquify(
}
void DownloadFileWithErrors::RenameAndAnnotate(
- const FilePath& full_path,
+ const base::FilePath& full_path,
const RenameCompletionCallback& callback) {
DownloadInterruptReason error_to_return = DOWNLOAD_INTERRUPT_REASON_NONE;
RenameCompletionCallback callback_to_use = callback;
@@ -223,7 +223,7 @@ class DownloadFileWithErrorsFactory : public DownloadFileFactory {
// DownloadFileFactory interface.
virtual DownloadFile* CreateFile(
scoped_ptr<DownloadSaveInfo> save_info,
- const FilePath& default_download_directory,
+ const base::FilePath& default_download_directory,
const GURL& url,
const GURL& referrer_url,
bool calculate_hash,
@@ -257,7 +257,7 @@ DownloadFileWithErrorsFactory::~DownloadFileWithErrorsFactory() {
DownloadFile* DownloadFileWithErrorsFactory::CreateFile(
scoped_ptr<DownloadSaveInfo> save_info,
- const FilePath& default_download_directory,
+ const base::FilePath& default_download_directory,
const GURL& url,
const GURL& referrer_url,
bool calculate_hash,
diff --git a/content/public/test/test_launcher.cc b/content/public/test/test_launcher.cc
index 178366d9..90e3b38 100644
--- a/content/public/test/test_launcher.cc
+++ b/content/public/test/test_launcher.cc
@@ -68,7 +68,7 @@ const char kTestTotalShards[] = "GTEST_TOTAL_SHARDS";
const char kTestShardIndex[] = "GTEST_SHARD_INDEX";
// The default output file for XML output.
-const FilePath::CharType kDefaultOutputFile[] = FILE_PATH_LITERAL(
+const base::FilePath::CharType kDefaultOutputFile[] = FILE_PATH_LITERAL(
"test_detail.xml");
// Quit test execution after this number of tests has timed out.
@@ -166,23 +166,24 @@ ResultsPrinter::ResultsPrinter(const CommandLine& command_line) : out_(NULL) {
return;
std::string flag = command_line.GetSwitchValueASCII(kGTestOutputFlag);
size_t colon_pos = flag.find(':');
- FilePath path;
+ base::FilePath path;
if (colon_pos != std::string::npos) {
- FilePath flag_path = command_line.GetSwitchValuePath(kGTestOutputFlag);
- FilePath::StringType path_string = flag_path.value();
- path = FilePath(path_string.substr(colon_pos + 1));
+ base::FilePath flag_path =
+ command_line.GetSwitchValuePath(kGTestOutputFlag);
+ base::FilePath::StringType path_string = flag_path.value();
+ path = base::FilePath(path_string.substr(colon_pos + 1));
// If the given path ends with '/', consider it is a directory.
// Note: This does NOT check that a directory (or file) actually exists
// (the behavior is same as what gtest does).
if (file_util::EndsWithSeparator(path)) {
- FilePath executable = command_line.GetProgram().BaseName();
+ base::FilePath executable = command_line.GetProgram().BaseName();
path = path.Append(executable.ReplaceExtension(
- FilePath::StringType(FILE_PATH_LITERAL("xml"))));
+ base::FilePath::StringType(FILE_PATH_LITERAL("xml"))));
}
}
if (path.value().empty())
- path = FilePath(kDefaultOutputFile);
- FilePath dir_name = path.DirName();
+ path = base::FilePath(kDefaultOutputFile);
+ base::FilePath dir_name = path.DirName();
if (!file_util::DirectoryExists(dir_name)) {
LOG(WARNING) << "The output directory does not exist. "
<< "Creating the directory: " << dir_name.value();