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

Unified Diff: Source/testing/runner/TestRunner.cpp

Issue 27694002: Ability to block <audio> and <video> media. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename "video" to "media". Created 7 years, 2 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
Index: Source/testing/runner/TestRunner.cpp
diff --git a/Source/testing/runner/TestRunner.cpp b/Source/testing/runner/TestRunner.cpp
index f31d6884a78a3942d50f61edcf0cf84ea67eb4ea..44e5ec8b5bcec5452c36790ab96ce126a30ddfb2 100644
--- a/Source/testing/runner/TestRunner.cpp
+++ b/Source/testing/runner/TestRunner.cpp
@@ -244,6 +244,7 @@ TestRunner::TestRunner(TestInterfaces* interfaces)
bindMethod("dumpResourceResponseMIMETypes", &TestRunner::dumpResourceResponseMIMETypes);
bindMethod("dumpPermissionClientCallbacks", &TestRunner::dumpPermissionClientCallbacks);
bindMethod("setImagesAllowed", &TestRunner::setImagesAllowed);
+ bindMethod("setMediaAllowed", &TestRunner::setMediaAllowed);
bindMethod("setScriptsAllowed", &TestRunner::setScriptsAllowed);
bindMethod("setStorageAllowed", &TestRunner::setStorageAllowed);
bindMethod("setPluginsAllowed", &TestRunner::setPluginsAllowed);
@@ -1040,6 +1041,13 @@ void TestRunner::setStorageAllowed(const CppArgumentList& arguments, CppVariant*
result->setNull();
}
+void TestRunner::setMediaAllowed(const CppArgumentList& arguments, CppVariant* result)
+{
+ if (arguments.size() > 0 && arguments[0].isBool())
+ m_webPermissions->setMediaAllowed(arguments[0].toBoolean());
+ result->setNull();
+}
+
void TestRunner::setPluginsAllowed(const CppArgumentList& arguments, CppVariant* result)
{
if (arguments.size() > 0 && arguments[0].isBool())

Powered by Google App Engine
This is Rietveld 408576698