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

Side by Side Diff: content/shell/renderer/test_runner/test_runner.cc

Issue 312103004: Content Shell test_runner hooks for <audio> and <video> blocking. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « content/shell/renderer/test_runner/test_runner.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/renderer/test_runner/test_runner.h" 5 #include "content/shell/renderer/test_runner/test_runner.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/shell/common/test_runner/test_preferences.h" 10 #include "content/shell/common/test_runner/test_preferences.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 void DumpFrameLoadCallbacks(); 204 void DumpFrameLoadCallbacks();
205 void DumpPingLoaderCallbacks(); 205 void DumpPingLoaderCallbacks();
206 void DumpUserGestureInFrameLoadCallbacks(); 206 void DumpUserGestureInFrameLoadCallbacks();
207 void DumpTitleChanges(); 207 void DumpTitleChanges();
208 void DumpCreateView(); 208 void DumpCreateView();
209 void SetCanOpenWindows(); 209 void SetCanOpenWindows();
210 void DumpResourceLoadCallbacks(); 210 void DumpResourceLoadCallbacks();
211 void DumpResourceRequestCallbacks(); 211 void DumpResourceRequestCallbacks();
212 void DumpResourceResponseMIMETypes(); 212 void DumpResourceResponseMIMETypes();
213 void SetImagesAllowed(bool allowed); 213 void SetImagesAllowed(bool allowed);
214 void SetMediaAllowed(bool allowed);
214 void SetScriptsAllowed(bool allowed); 215 void SetScriptsAllowed(bool allowed);
215 void SetStorageAllowed(bool allowed); 216 void SetStorageAllowed(bool allowed);
216 void SetPluginsAllowed(bool allowed); 217 void SetPluginsAllowed(bool allowed);
217 void SetAllowDisplayOfInsecureContent(bool allowed); 218 void SetAllowDisplayOfInsecureContent(bool allowed);
218 void SetAllowRunningOfInsecureContent(bool allowed); 219 void SetAllowRunningOfInsecureContent(bool allowed);
219 void DumpPermissionClientCallbacks(); 220 void DumpPermissionClientCallbacks();
220 void DumpWindowStatusChanges(); 221 void DumpWindowStatusChanges();
221 void DumpProgressFinishedCallback(); 222 void DumpProgressFinishedCallback();
222 void DumpSpellCheckCallbacks(); 223 void DumpSpellCheckCallbacks();
223 void DumpBackForwardList(); 224 void DumpBackForwardList();
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 .SetMethod("dumpTitleChanges", &TestRunnerBindings::DumpTitleChanges) 423 .SetMethod("dumpTitleChanges", &TestRunnerBindings::DumpTitleChanges)
423 .SetMethod("dumpCreateView", &TestRunnerBindings::DumpCreateView) 424 .SetMethod("dumpCreateView", &TestRunnerBindings::DumpCreateView)
424 .SetMethod("setCanOpenWindows", &TestRunnerBindings::SetCanOpenWindows) 425 .SetMethod("setCanOpenWindows", &TestRunnerBindings::SetCanOpenWindows)
425 .SetMethod("dumpResourceLoadCallbacks", 426 .SetMethod("dumpResourceLoadCallbacks",
426 &TestRunnerBindings::DumpResourceLoadCallbacks) 427 &TestRunnerBindings::DumpResourceLoadCallbacks)
427 .SetMethod("dumpResourceRequestCallbacks", 428 .SetMethod("dumpResourceRequestCallbacks",
428 &TestRunnerBindings::DumpResourceRequestCallbacks) 429 &TestRunnerBindings::DumpResourceRequestCallbacks)
429 .SetMethod("dumpResourceResponseMIMETypes", 430 .SetMethod("dumpResourceResponseMIMETypes",
430 &TestRunnerBindings::DumpResourceResponseMIMETypes) 431 &TestRunnerBindings::DumpResourceResponseMIMETypes)
431 .SetMethod("setImagesAllowed", &TestRunnerBindings::SetImagesAllowed) 432 .SetMethod("setImagesAllowed", &TestRunnerBindings::SetImagesAllowed)
433 .SetMethod("setMediaAllowed", &TestRunnerBindings::SetMediaAllowed)
432 .SetMethod("setScriptsAllowed", &TestRunnerBindings::SetScriptsAllowed) 434 .SetMethod("setScriptsAllowed", &TestRunnerBindings::SetScriptsAllowed)
433 .SetMethod("setStorageAllowed", &TestRunnerBindings::SetStorageAllowed) 435 .SetMethod("setStorageAllowed", &TestRunnerBindings::SetStorageAllowed)
434 .SetMethod("setPluginsAllowed", &TestRunnerBindings::SetPluginsAllowed) 436 .SetMethod("setPluginsAllowed", &TestRunnerBindings::SetPluginsAllowed)
435 .SetMethod("setAllowDisplayOfInsecureContent", 437 .SetMethod("setAllowDisplayOfInsecureContent",
436 &TestRunnerBindings::SetAllowDisplayOfInsecureContent) 438 &TestRunnerBindings::SetAllowDisplayOfInsecureContent)
437 .SetMethod("setAllowRunningOfInsecureContent", 439 .SetMethod("setAllowRunningOfInsecureContent",
438 &TestRunnerBindings::SetAllowRunningOfInsecureContent) 440 &TestRunnerBindings::SetAllowRunningOfInsecureContent)
439 .SetMethod("dumpPermissionClientCallbacks", 441 .SetMethod("dumpPermissionClientCallbacks",
440 &TestRunnerBindings::DumpPermissionClientCallbacks) 442 &TestRunnerBindings::DumpPermissionClientCallbacks)
441 .SetMethod("dumpWindowStatusChanges", 443 .SetMethod("dumpWindowStatusChanges",
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 void TestRunnerBindings::DumpResourceResponseMIMETypes() { 1058 void TestRunnerBindings::DumpResourceResponseMIMETypes() {
1057 if (runner_) 1059 if (runner_)
1058 runner_->DumpResourceResponseMIMETypes(); 1060 runner_->DumpResourceResponseMIMETypes();
1059 } 1061 }
1060 1062
1061 void TestRunnerBindings::SetImagesAllowed(bool allowed) { 1063 void TestRunnerBindings::SetImagesAllowed(bool allowed) {
1062 if (runner_) 1064 if (runner_)
1063 runner_->SetImagesAllowed(allowed); 1065 runner_->SetImagesAllowed(allowed);
1064 } 1066 }
1065 1067
1068 void TestRunnerBindings::SetMediaAllowed(bool allowed) {
1069 if (runner_)
1070 runner_->SetMediaAllowed(allowed);
1071 }
1072
1066 void TestRunnerBindings::SetScriptsAllowed(bool allowed) { 1073 void TestRunnerBindings::SetScriptsAllowed(bool allowed) {
1067 if (runner_) 1074 if (runner_)
1068 runner_->SetScriptsAllowed(allowed); 1075 runner_->SetScriptsAllowed(allowed);
1069 } 1076 }
1070 1077
1071 void TestRunnerBindings::SetStorageAllowed(bool allowed) { 1078 void TestRunnerBindings::SetStorageAllowed(bool allowed) {
1072 if (runner_) 1079 if (runner_)
1073 runner_->SetStorageAllowed(allowed); 1080 runner_->SetStorageAllowed(allowed);
1074 } 1081 }
1075 1082
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
2492 } 2499 }
2493 2500
2494 void TestRunner::DumpResourceResponseMIMETypes() { 2501 void TestRunner::DumpResourceResponseMIMETypes() {
2495 dump_resource_reqponse_mime_types_ = true; 2502 dump_resource_reqponse_mime_types_ = true;
2496 } 2503 }
2497 2504
2498 void TestRunner::SetImagesAllowed(bool allowed) { 2505 void TestRunner::SetImagesAllowed(bool allowed) {
2499 web_permissions_->setImagesAllowed(allowed); 2506 web_permissions_->setImagesAllowed(allowed);
2500 } 2507 }
2501 2508
2509 void TestRunner::SetMediaAllowed(bool allowed) {
2510 web_permissions_->setMediaAllowed(allowed);
2511 }
2512
2502 void TestRunner::SetScriptsAllowed(bool allowed) { 2513 void TestRunner::SetScriptsAllowed(bool allowed) {
2503 web_permissions_->setScriptsAllowed(allowed); 2514 web_permissions_->setScriptsAllowed(allowed);
2504 } 2515 }
2505 2516
2506 void TestRunner::SetStorageAllowed(bool allowed) { 2517 void TestRunner::SetStorageAllowed(bool allowed) {
2507 web_permissions_->setStorageAllowed(allowed); 2518 web_permissions_->setStorageAllowed(allowed);
2508 } 2519 }
2509 2520
2510 void TestRunner::SetPluginsAllowed(bool allowed) { 2521 void TestRunner::SetPluginsAllowed(bool allowed) {
2511 web_permissions_->setPluginsAllowed(allowed); 2522 web_permissions_->setPluginsAllowed(allowed);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2732 } 2743 }
2733 2744
2734 void TestRunner::DidLosePointerLockInternal() { 2745 void TestRunner::DidLosePointerLockInternal() {
2735 bool was_locked = pointer_locked_; 2746 bool was_locked = pointer_locked_;
2736 pointer_locked_ = false; 2747 pointer_locked_ = false;
2737 if (was_locked) 2748 if (was_locked)
2738 web_view_->didLosePointerLock(); 2749 web_view_->didLosePointerLock();
2739 } 2750 }
2740 2751
2741 } // namespace content 2752 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/test_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698