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

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

Issue 625009: Chromium plumbing for new file:// security flag, including test_shell support... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 10 years, 10 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/layout_test_controller.h ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/layout_test_controller.cc
===================================================================
--- webkit/tools/test_shell/layout_test_controller.cc (revision 39304)
+++ webkit/tools/test_shell/layout_test_controller.cc (working copy)
@@ -152,6 +152,7 @@
BindMethod("evaluateScriptInIsolatedWorld", &LayoutTestController::evaluateScriptInIsolatedWorld);
BindMethod("overridePreference", &LayoutTestController::overridePreference);
BindMethod("setAllowUniversalAccessFromFileURLs", &LayoutTestController::setAllowUniversalAccessFromFileURLs);
+ BindMethod("setAllowFileAccessFromFileURLs", &LayoutTestController::setAllowFileAccessFromFileURLs);
BindMethod("setTimelineProfilingEnabled", &LayoutTestController::setTimelineProfilingEnabled);
BindMethod("evaluateInWebInspector", &LayoutTestController::evaluateInWebInspector);
BindMethod("forceRedSelectionColors", &LayoutTestController::forceRedSelectionColors);
@@ -899,6 +900,16 @@
result->SetNull();
}
+void LayoutTestController::setAllowFileAccessFromFileURLs(
+ const CppArgumentList& args, CppVariant* result) {
+ if (args.size() > 0 && args[0].isBool()) {
+ WebPreferences* prefs = shell_->GetWebPreferences();
+ prefs->allow_file_access_from_file_urls = args[0].value.boolValue;
+ prefs->Apply(shell_->webView());
+ }
+ result->SetNull();
+}
+
// Need these conversions because the format of the value for booleans
// may vary - for example, on mac "1" and "0" are used for boolean.
bool LayoutTestController::CppVariantToBool(const CppVariant& value) {
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.h ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698