Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: webkit/tools/test_shell/test_shell.cc

Issue 16578: Add debug menu to Linux test_shell: (Closed)
Patch Set: curlies & 80 chars Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/tools/test_shell/test_shell_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « no previous file | webkit/tools/test_shell/test_shell_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698