Commit b45d62cc authored by sigbjornf's avatar sigbjornf Committed by Commit bot

Add test runner support for overriding web_security_enabled preference.

Have TestRunner::OverridePreference() recognize "WebKitWebSecurityEnabled"
as a boolean preference which controls the web_security_enabled web
preference.

R=mkwst,jochen
BUG=254993

Review URL: https://codereview.chromium.org/601513002

Cr-Commit-Position: refs/heads/master@{#296543}
parent 0a368d23
......@@ -49,6 +49,7 @@ void TestPreferences::Reset() {
hyperlink_auditing_enabled = false;
should_respect_image_orientation = false;
asynchronous_spell_checking_enabled = false;
web_security_enabled = true;
}
} // namespace content
......@@ -43,6 +43,7 @@ struct TestPreferences {
bool caret_browsing_enabled;
bool should_respect_image_orientation;
bool asynchronous_spell_checking_enabled;
bool web_security_enabled;
TestPreferences();
void Reset();
......
......@@ -47,6 +47,8 @@ void ExportLayoutTestSpecificPreferences(const TestPreferences& from,
to->allow_file_access_from_file_urls = from.allow_file_access_from_file_urls;
to->javascript_can_open_windows_automatically =
from.java_script_can_open_windows_automatically;
to->web_security_enabled =
from.web_security_enabled;
}
// Applies settings that differ between layout tests and regular mode. Some
......
......@@ -2496,6 +2496,8 @@ void TestRunner::OverridePreference(const std::string key,
prefs->should_respect_image_orientation = value->BooleanValue();
} else if (key == "WebKitWebAudioEnabled") {
DCHECK(value->BooleanValue());
} else if (key == "WebKitWebSecurityEnabled") {
prefs->web_security_enabled = value->BooleanValue();
} else {
std::string message("Invalid name for preference: ");
message.append(key);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment