Index: content/shell/shell_content_browser_client.cc |
diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc |
index 261e876217825886bc859850d7b33d34be33cd5a..c455fa96a6288dd9eb44c49f62c5399582ef5df9 100644 |
--- a/content/shell/shell_content_browser_client.cc |
+++ b/content/shell/shell_content_browser_client.cc |
@@ -17,6 +17,7 @@ |
#include "content/shell/shell_web_contents_view_delegate_creator.h" |
#include "content/shell/webkit_test_runner_host.h" |
#include "googleurl/src/gurl.h" |
+#include "webkit/glue/webpreferences.h" |
#if defined(OS_ANDROID) |
#include "base/android/path_utils.h" |
@@ -53,6 +54,17 @@ void ShellContentBrowserClient::AppendExtraCommandLineSwitches( |
command_line->AppendSwitch(switches::kDumpRenderTree); |
} |
+void ShellContentBrowserClient::OverrideWebkitPrefs( |
+ RenderViewHost* render_view_host, |
+ const GURL& url, |
+ webkit_glue::WebPreferences* prefs) { |
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
+ return; |
+ prefs->dom_paste_enabled = true; |
+ prefs->javascript_can_access_clipboard = true; |
+ prefs->allow_universal_access_from_file_urls = true; |
+} |
+ |
void ShellContentBrowserClient::ResourceDispatcherHostCreated() { |
resource_dispatcher_host_delegate_.reset( |
new ShellResourceDispatcherHostDelegate()); |