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

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

Issue 549213: Add UI to TestShell to enable/disable images, plugins, and scripts.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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.cc ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | 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
===================================================================
--- webkit/tools/test_shell/test_shell_win.cc (revision 37542)
+++ webkit/tools/test_shell/test_shell_win.cc (working copy)
@@ -584,6 +584,27 @@
case IDM_DUMP_RENDER_TREE:
shell->DumpRenderTree();
break;
+ case IDM_ENABLE_IMAGES:
+ case IDM_ENABLE_PLUGINS:
+ case IDM_ENABLE_SCRIPTS: {
+ HMENU menu = GetSubMenu(GetMenu(hwnd), 1);
+ bool was_checked =
+ (GetMenuState(menu, wmId, MF_BYCOMMAND) & MF_CHECKED) != 0;
+ CheckMenuItem(menu, wmId,
+ MF_BYCOMMAND | (was_checked ? MF_UNCHECKED : MF_CHECKED));
+ switch (wmId) {
+ case IDM_ENABLE_IMAGES:
+ shell->set_allow_images(!was_checked);
+ break;
+ case IDM_ENABLE_PLUGINS:
+ shell->set_allow_plugins(!was_checked);
+ break;
+ case IDM_ENABLE_SCRIPTS:
+ shell->set_allow_scripts(!was_checked);
+ break;
+ }
+ break;
+ }
case IDM_SHOW_DEV_TOOLS:
shell->ShowDevTools();
break;
« no previous file with comments | « webkit/tools/test_shell/test_shell.cc ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698