Index: webkit/tools/test_shell/test_shell.cc |
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc |
index 39c51217614a265926d328ef80477724f77aebdf..c745db390c86ac03cadeb7de2e1a9883ef958b5c 100644 |
--- a/webkit/tools/test_shell/test_shell.cc |
+++ b/webkit/tools/test_shell/test_shell.cc |
@@ -94,8 +94,8 @@ class URLRequestTestShellFileJob : public URLRequestFileJob { |
const std::string& scheme) { |
std::wstring path; |
PathService::Get(base::DIR_EXE, &path); |
- file_util::AppendToPath(&path, L"Resources"); |
- file_util::AppendToPath(&path, L"Inspector"); |
+ file_util::AppendToPath(&path, L"resources"); |
+ file_util::AppendToPath(&path, L"inspector"); |
file_util::AppendToPath(&path, UTF8ToWide(request->url().path())); |
return new URLRequestTestShellFileJob(request, |
FilePath::FromWStringHack(path)); |
@@ -432,6 +432,26 @@ void TestShell::GoBackOrForward(int offset) { |
navigation_controller_->GoToOffset(offset); |
} |
+void TestShell::DumpDocumentText() { |
+ std::wstring file_path; |
+ if (!PromptForSaveFile(L"Dump document text", &file_path)) |
+ return; |
+ |
+ const std::string data = |
+ WideToUTF8(webkit_glue::DumpDocumentText(webView()->GetMainFrame())); |
+ file_util::WriteFile(file_path, data.c_str(), data.length()); |
+} |
+ |
+void TestShell::DumpRenderTree() { |
+ std::wstring file_path; |
+ if (!PromptForSaveFile(L"Dump render tree", &file_path)) |
+ return; |
+ |
+ const std::string data = |
+ WideToUTF8(webkit_glue::DumpRenderer(webView()->GetMainFrame())); |
+ file_util::WriteFile(file_path, data.c_str(), data.length()); |
+} |
+ |
std::wstring TestShell::GetDocumentText() { |
return webkit_glue::DumpDocumentText(webView()->GetMainFrame()); |
} |