Index: content/shell/renderer/test_runner/test_runner.cc |
diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc |
index c4c81a913c5dc29890b38067e5c2ca03a9c3712f..92ee2dcf3b7b8ad5f945532f2daf7eeaaaeb3676 100644 |
--- a/content/shell/renderer/test_runner/test_runner.cc |
+++ b/content/shell/renderer/test_runner/test_runner.cc |
@@ -211,6 +211,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> { |
void DumpResourceRequestCallbacks(); |
void DumpResourceResponseMIMETypes(); |
void SetImagesAllowed(bool allowed); |
+ void SetMediaAllowed(bool allowed); |
void SetScriptsAllowed(bool allowed); |
void SetStorageAllowed(bool allowed); |
void SetPluginsAllowed(bool allowed); |
@@ -429,6 +430,7 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder( |
.SetMethod("dumpResourceResponseMIMETypes", |
&TestRunnerBindings::DumpResourceResponseMIMETypes) |
.SetMethod("setImagesAllowed", &TestRunnerBindings::SetImagesAllowed) |
+ .SetMethod("setMediaAllowed", &TestRunnerBindings::SetMediaAllowed) |
.SetMethod("setScriptsAllowed", &TestRunnerBindings::SetScriptsAllowed) |
.SetMethod("setStorageAllowed", &TestRunnerBindings::SetStorageAllowed) |
.SetMethod("setPluginsAllowed", &TestRunnerBindings::SetPluginsAllowed) |
@@ -1063,6 +1065,11 @@ void TestRunnerBindings::SetImagesAllowed(bool allowed) { |
runner_->SetImagesAllowed(allowed); |
} |
+void TestRunnerBindings::SetMediaAllowed(bool allowed) { |
+ if (runner_) |
+ runner_->SetMediaAllowed(allowed); |
+} |
+ |
void TestRunnerBindings::SetScriptsAllowed(bool allowed) { |
if (runner_) |
runner_->SetScriptsAllowed(allowed); |
@@ -2499,6 +2506,10 @@ void TestRunner::SetImagesAllowed(bool allowed) { |
web_permissions_->setImagesAllowed(allowed); |
} |
+void TestRunner::SetMediaAllowed(bool allowed) { |
+ web_permissions_->setMediaAllowed(allowed); |
+} |
+ |
void TestRunner::SetScriptsAllowed(bool allowed) { |
web_permissions_->setScriptsAllowed(allowed); |
} |