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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org) 3 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org)
4 * Copyright (C) 2012 Apple Inc. All Rights Reserved. 4 * Copyright (C) 2012 Apple Inc. All Rights Reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 bindMethod("dumpPingLoaderCallbacks", &TestRunner::dumpPingLoaderCallbacks); 237 bindMethod("dumpPingLoaderCallbacks", &TestRunner::dumpPingLoaderCallbacks);
238 bindMethod("dumpUserGestureInFrameLoadCallbacks", &TestRunner::dumpUserGestu reInFrameLoadCallbacks); 238 bindMethod("dumpUserGestureInFrameLoadCallbacks", &TestRunner::dumpUserGestu reInFrameLoadCallbacks);
239 bindMethod("dumpTitleChanges", &TestRunner::dumpTitleChanges); 239 bindMethod("dumpTitleChanges", &TestRunner::dumpTitleChanges);
240 bindMethod("dumpCreateView", &TestRunner::dumpCreateView); 240 bindMethod("dumpCreateView", &TestRunner::dumpCreateView);
241 bindMethod("setCanOpenWindows", &TestRunner::setCanOpenWindows); 241 bindMethod("setCanOpenWindows", &TestRunner::setCanOpenWindows);
242 bindMethod("dumpResourceLoadCallbacks", &TestRunner::dumpResourceLoadCallbac ks); 242 bindMethod("dumpResourceLoadCallbacks", &TestRunner::dumpResourceLoadCallbac ks);
243 bindMethod("dumpResourceRequestCallbacks", &TestRunner::dumpResourceRequestC allbacks); 243 bindMethod("dumpResourceRequestCallbacks", &TestRunner::dumpResourceRequestC allbacks);
244 bindMethod("dumpResourceResponseMIMETypes", &TestRunner::dumpResourceRespons eMIMETypes); 244 bindMethod("dumpResourceResponseMIMETypes", &TestRunner::dumpResourceRespons eMIMETypes);
245 bindMethod("dumpPermissionClientCallbacks", &TestRunner::dumpPermissionClien tCallbacks); 245 bindMethod("dumpPermissionClientCallbacks", &TestRunner::dumpPermissionClien tCallbacks);
246 bindMethod("setImagesAllowed", &TestRunner::setImagesAllowed); 246 bindMethod("setImagesAllowed", &TestRunner::setImagesAllowed);
247 bindMethod("setMediaAllowed", &TestRunner::setMediaAllowed);
247 bindMethod("setScriptsAllowed", &TestRunner::setScriptsAllowed); 248 bindMethod("setScriptsAllowed", &TestRunner::setScriptsAllowed);
248 bindMethod("setStorageAllowed", &TestRunner::setStorageAllowed); 249 bindMethod("setStorageAllowed", &TestRunner::setStorageAllowed);
249 bindMethod("setPluginsAllowed", &TestRunner::setPluginsAllowed); 250 bindMethod("setPluginsAllowed", &TestRunner::setPluginsAllowed);
250 bindMethod("setAllowDisplayOfInsecureContent", &TestRunner::setAllowDisplayO fInsecureContent); 251 bindMethod("setAllowDisplayOfInsecureContent", &TestRunner::setAllowDisplayO fInsecureContent);
251 bindMethod("setAllowRunningOfInsecureContent", &TestRunner::setAllowRunningO fInsecureContent); 252 bindMethod("setAllowRunningOfInsecureContent", &TestRunner::setAllowRunningO fInsecureContent);
252 bindMethod("dumpStatusCallbacks", &TestRunner::dumpWindowStatusChanges); 253 bindMethod("dumpStatusCallbacks", &TestRunner::dumpWindowStatusChanges);
253 bindMethod("dumpProgressFinishedCallback", &TestRunner::dumpProgressFinished Callback); 254 bindMethod("dumpProgressFinishedCallback", &TestRunner::dumpProgressFinished Callback);
254 bindMethod("dumpBackForwardList", &TestRunner::dumpBackForwardList); 255 bindMethod("dumpBackForwardList", &TestRunner::dumpBackForwardList);
255 bindMethod("setDeferMainResourceDataLoad", &TestRunner::setDeferMainResource DataLoad); 256 bindMethod("setDeferMainResourceDataLoad", &TestRunner::setDeferMainResource DataLoad);
256 bindMethod("dumpSelectionRect", &TestRunner::dumpSelectionRect); 257 bindMethod("dumpSelectionRect", &TestRunner::dumpSelectionRect);
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 result->setNull(); 1034 result->setNull();
1034 } 1035 }
1035 1036
1036 void TestRunner::setStorageAllowed(const CppArgumentList& arguments, CppVariant* result) 1037 void TestRunner::setStorageAllowed(const CppArgumentList& arguments, CppVariant* result)
1037 { 1038 {
1038 if (arguments.size() > 0 && arguments[0].isBool()) 1039 if (arguments.size() > 0 && arguments[0].isBool())
1039 m_webPermissions->setStorageAllowed(arguments[0].toBoolean()); 1040 m_webPermissions->setStorageAllowed(arguments[0].toBoolean());
1040 result->setNull(); 1041 result->setNull();
1041 } 1042 }
1042 1043
1044 void TestRunner::setMediaAllowed(const CppArgumentList& arguments, CppVariant* r esult)
1045 {
1046 if (arguments.size() > 0 && arguments[0].isBool())
1047 m_webPermissions->setMediaAllowed(arguments[0].toBoolean());
1048 result->setNull();
1049 }
1050
1043 void TestRunner::setPluginsAllowed(const CppArgumentList& arguments, CppVariant* result) 1051 void TestRunner::setPluginsAllowed(const CppArgumentList& arguments, CppVariant* result)
1044 { 1052 {
1045 if (arguments.size() > 0 && arguments[0].isBool()) 1053 if (arguments.size() > 0 && arguments[0].isBool())
1046 m_webPermissions->setPluginsAllowed(arguments[0].toBoolean()); 1054 m_webPermissions->setPluginsAllowed(arguments[0].toBoolean());
1047 result->setNull(); 1055 result->setNull();
1048 } 1056 }
1049 1057
1050 void TestRunner::setAllowDisplayOfInsecureContent(const CppArgumentList& argumen ts, CppVariant* result) 1058 void TestRunner::setAllowDisplayOfInsecureContent(const CppArgumentList& argumen ts, CppVariant* result)
1051 { 1059 {
1052 if (arguments.size() > 0 && arguments[0].isBool()) 1060 if (arguments.size() > 0 && arguments[0].isBool())
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2161 result->setNull(); 2169 result->setNull();
2162 } 2170 }
2163 2171
2164 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp Variant* result) 2172 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp Variant* result)
2165 { 2173 {
2166 m_pointerLockPlannedResult = PointerLockWillFailSync; 2174 m_pointerLockPlannedResult = PointerLockWillFailSync;
2167 result->setNull(); 2175 result->setNull();
2168 } 2176 }
2169 2177
2170 } 2178 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698