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

Unified Diff: webkit/tools/test_shell/test_shell_win.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 | « webkit/tools/test_shell/test_shell_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_win.cc
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index 6a8e9b22a56d50e8945d96b0a4d019d39b15aff1..3701c5f7dab85f6248c15d6caeabc2715a07a360 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -703,36 +703,6 @@ bool TestShell::PromptForSaveFile(const wchar_t* prompt_title,
return true;
}
-// TODO(tc): Use methods in base or net/base for this.
-static void WriteTextToFile(const std::wstring& data,
- const std::wstring& file_path) {
- FILE* fp;
- errno_t err = _wfopen_s(&fp, file_path.c_str(), L"wt");
- if (err)
- return;
- std::string data_utf8 = WideToUTF8(data);
- fwrite(data_utf8.c_str(), 1, data_utf8.size(), fp);
- fclose(fp);
-}
-
-void TestShell::DumpDocumentText() {
- std::wstring file_path;
- if (!PromptForSaveFile(L"Dump document text", &file_path))
- return;
-
- WriteTextToFile(webkit_glue::DumpDocumentText(webView()->GetMainFrame()),
- file_path);
-}
-
-void TestShell::DumpRenderTree() {
- std::wstring file_path;
- if (!PromptForSaveFile(L"Dump render tree", &file_path))
- return;
-
- WriteTextToFile(webkit_glue::DumpRenderer(webView()->GetMainFrame()),
- file_path);
-}
-
// static
void TestShell::ShowStartupDebuggingDialog() {
MessageBox(NULL, L"attach to me?", L"test_shell", MB_OK);
« no previous file with comments | « webkit/tools/test_shell/test_shell_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698