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

Unified Diff: chrome/test/webdriver/webdriver_session.cc

Issue 10828135: Allow popups, mouselock, and https media-stream content by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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 | « chrome/test/webdriver/webdriver_automation.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/webdriver_session.cc
diff --git a/chrome/test/webdriver/webdriver_session.cc b/chrome/test/webdriver/webdriver_session.cc
index a47f90dbc1eb48f4f21965e0c4ae851e8a616faf..35e2bc03009c8d4961f3dba3c8a23de05d1a6614 100644
--- a/chrome/test/webdriver/webdriver_session.cc
+++ b/chrome/test/webdriver/webdriver_session.cc
@@ -111,7 +111,6 @@ Error* Session::Init(const DictionaryValue* capabilities_dict) {
browser_options.user_data_dir = capabilities_.profile;
if (!capabilities_.no_website_testing_defaults) {
browser_options.ignore_certificate_errors = true;
- browser_options.disable_popup_blocking = true;
}
RunSessionTask(base::Bind(
&Session::InitOnSessionThread,
@@ -1900,11 +1899,28 @@ Error* Session::InitForWebsiteTesting() {
if (error)
return error;
- // Allow certain content by default.
+ // Allow content by default.
+ // Media-stream cannot be enabled by default; we must specify
+ // particular host patterns and devices.
+ DictionaryValue* devices = new DictionaryValue();
+ devices->SetString("audio", "Default");
+ devices->SetString("video", "Default");
+ DictionaryValue* content_settings = new DictionaryValue();
+ content_settings->Set("media-stream", devices);
+ DictionaryValue* pattern_pairs = new DictionaryValue();
+ pattern_pairs->Set("https://*,*", content_settings);
+ error = SetPreference(
+ "profile.content_settings.pattern_pairs",
+ true /* is_user_pref */,
+ pattern_pairs);
+ if (error)
+ return error;
const int kAllowContent = 1;
DictionaryValue* default_content_settings = new DictionaryValue();
default_content_settings->SetInteger("geolocation", kAllowContent);
+ default_content_settings->SetInteger("mouselock", kAllowContent);
default_content_settings->SetInteger("notifications", kAllowContent);
+ default_content_settings->SetInteger("popups", kAllowContent);
return SetPreference(
"profile.default_content_settings",
true /* is_user_pref */,
« no previous file with comments | « chrome/test/webdriver/webdriver_automation.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698