summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/tools')
-rw-r--r--webkit/tools/test_shell/simple_resource_loader_bridge.cc2
-rw-r--r--webkit/tools/test_shell/test_shell_gtk.cc2
-rw-r--r--webkit/tools/test_shell/test_shell_test.cc14
-rw-r--r--webkit/tools/test_shell/test_shell_test.h9
4 files changed, 16 insertions, 11 deletions
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
index 755a6f6..fd409a0 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -456,7 +456,7 @@ class ResourceLoaderBridgeImpl : public ResourceLoaderBridge {
params_->upload->AppendBytes(data, data_len);
}
- virtual void AppendFileRangeToUpload(const std::wstring& file_path,
+ virtual void AppendFileRangeToUpload(const FilePath& file_path,
uint64 offset, uint64 length) {
DCHECK(params_.get());
if (!params_->upload)
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index 7083d7c..1041bdd 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -570,7 +570,7 @@ void TestShell::LoadURLForFrame(const wchar_t* url,
// PathExists will reject any string with no leading '/'
// as well as empty strings.
if (file_util::AbsolutePath(&path))
- gurl = net::FilePathToFileURL(path);
+ gurl = net::FilePathToFileURL(FilePath::FromWStringHack(path));
else
gurl = GURL(WideToUTF8(url));
diff --git a/webkit/tools/test_shell/test_shell_test.cc b/webkit/tools/test_shell/test_shell_test.cc
index 1ce279a..c6e7ac4 100644
--- a/webkit/tools/test_shell/test_shell_test.cc
+++ b/webkit/tools/test_shell/test_shell_test.cc
@@ -4,16 +4,18 @@
#include "webkit/tools/test_shell/test_shell_test.h"
+#include <string>
+
#include "base/basictypes.h"
+#include "base/file_path.h"
#include "base/file_util.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/string_util.h"
-std::wstring TestShellTest::GetTestURL(std::wstring test_case_path,
- const std::wstring& test_case) {
- file_util::AppendToPath(&test_case_path, test_case);
- return test_case_path;
+std::wstring TestShellTest::GetTestURL(const FilePath& test_case_path,
+ const std::string& test_case) {
+ return test_case_path.AppendASCII(test_case).ToWStringHack();
}
void TestShellTest::SetUp() {
@@ -23,8 +25,8 @@ void TestShellTest::SetUp() {
// Point data_dir_ to the root of the test case dir
ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &data_dir_));
- file_util::AppendToPath(&data_dir_, L"webkit");
- file_util::AppendToPath(&data_dir_, L"data");
+ data_dir_ = data_dir_.Append(FILE_PATH_LITERAL("webkit"));
+ data_dir_ = data_dir_.Append(FILE_PATH_LITERAL("data"));
ASSERT_TRUE(file_util::PathExists(data_dir_));
}
diff --git a/webkit/tools/test_shell/test_shell_test.h b/webkit/tools/test_shell/test_shell_test.h
index 2cdd792..4e6372b 100644
--- a/webkit/tools/test_shell/test_shell_test.h
+++ b/webkit/tools/test_shell/test_shell_test.h
@@ -10,6 +10,9 @@
#ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__
#define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_TEST_H__
+#include <string>
+
+#include "base/file_path.h"
#include "webkit/glue/window_open_disposition.h"
#include "webkit/tools/test_shell/test_shell.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -17,8 +20,8 @@
class TestShellTest : public testing::Test {
protected:
// Returns the path "test_case_path/test_case".
- std::wstring GetTestURL(std::wstring test_case_path,
- const std::wstring& test_case);
+ std::wstring GetTestURL(const FilePath& test_case_path,
+ const std::string& test_case);
virtual void SetUp();
virtual void TearDown();
@@ -30,7 +33,7 @@ class TestShellTest : public testing::Test {
protected:
// Location of SOURCE_ROOT/webkit/data/
- std::wstring data_dir_;
+ FilePath data_dir_;
TestShell* test_shell_;
};