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

Side by Side Diff: components/test_runner/test_runner.cc

Issue 2278303002: Remove the allow-displaying-mixed-content setting from Blink. (Closed)
Patch Set: Fixed missign deprecated preference registration. Created 4 years, 3 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 // 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 "components/test_runner/test_runner.h" 5 #include "components/test_runner/test_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 bool allow_destination_subdomains); 184 bool allow_destination_subdomains);
185 void RemoveWebPageOverlay(); 185 void RemoveWebPageOverlay();
186 void ResetDeviceLight(); 186 void ResetDeviceLight();
187 void ResetTestHelperControllers(); 187 void ResetTestHelperControllers();
188 void ResolveBeforeInstallPromptPromise(int request_id, 188 void ResolveBeforeInstallPromptPromise(int request_id,
189 const std::string& platform); 189 const std::string& platform);
190 void RunIdleTasks(v8::Local<v8::Function> callback); 190 void RunIdleTasks(v8::Local<v8::Function> callback);
191 void SendBluetoothManualChooserEvent(const std::string& event, 191 void SendBluetoothManualChooserEvent(const std::string& event,
192 const std::string& argument); 192 const std::string& argument);
193 void SetAcceptLanguages(const std::string& accept_languages); 193 void SetAcceptLanguages(const std::string& accept_languages);
194 void SetAllowDisplayOfInsecureContent(bool allowed);
195 void SetAllowFileAccessFromFileURLs(bool allow); 194 void SetAllowFileAccessFromFileURLs(bool allow);
196 void SetAllowRunningOfInsecureContent(bool allowed); 195 void SetAllowRunningOfInsecureContent(bool allowed);
197 void SetAutoplayAllowed(bool allowed); 196 void SetAutoplayAllowed(bool allowed);
198 void SetAllowUniversalAccessFromFileURLs(bool allow); 197 void SetAllowUniversalAccessFromFileURLs(bool allow);
199 void SetBlockThirdPartyCookies(bool block); 198 void SetBlockThirdPartyCookies(bool block);
200 void SetAudioData(const gin::ArrayBufferView& view); 199 void SetAudioData(const gin::ArrayBufferView& view);
201 void SetBackingScaleFactor(double value, v8::Local<v8::Function> callback); 200 void SetBackingScaleFactor(double value, v8::Local<v8::Function> callback);
202 void SetBluetoothFakeAdapter(const std::string& adapter_name, 201 void SetBluetoothFakeAdapter(const std::string& adapter_name,
203 v8::Local<v8::Function> callback); 202 v8::Local<v8::Function> callback);
204 void SetBluetoothManualChooser(bool enable); 203 void SetBluetoothManualChooser(bool enable);
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 .SetMethod("resolveBeforeInstallPromptPromise", 473 .SetMethod("resolveBeforeInstallPromptPromise",
475 &TestRunnerBindings::ResolveBeforeInstallPromptPromise) 474 &TestRunnerBindings::ResolveBeforeInstallPromptPromise)
476 .SetMethod("runIdleTasks", &TestRunnerBindings::RunIdleTasks) 475 .SetMethod("runIdleTasks", &TestRunnerBindings::RunIdleTasks)
477 .SetMethod("selectionAsMarkup", &TestRunnerBindings::SelectionAsMarkup) 476 .SetMethod("selectionAsMarkup", &TestRunnerBindings::SelectionAsMarkup)
478 477
479 // The Bluetooth functions are specified at 478 // The Bluetooth functions are specified at
480 // https://webbluetoothcg.github.io/web-bluetooth/tests/. 479 // https://webbluetoothcg.github.io/web-bluetooth/tests/.
481 .SetMethod("sendBluetoothManualChooserEvent", 480 .SetMethod("sendBluetoothManualChooserEvent",
482 &TestRunnerBindings::SendBluetoothManualChooserEvent) 481 &TestRunnerBindings::SendBluetoothManualChooserEvent)
483 .SetMethod("setAcceptLanguages", &TestRunnerBindings::SetAcceptLanguages) 482 .SetMethod("setAcceptLanguages", &TestRunnerBindings::SetAcceptLanguages)
484 .SetMethod("setAllowDisplayOfInsecureContent",
485 &TestRunnerBindings::SetAllowDisplayOfInsecureContent)
486 .SetMethod("setAllowFileAccessFromFileURLs", 483 .SetMethod("setAllowFileAccessFromFileURLs",
487 &TestRunnerBindings::SetAllowFileAccessFromFileURLs) 484 &TestRunnerBindings::SetAllowFileAccessFromFileURLs)
488 .SetMethod("setAllowRunningOfInsecureContent", 485 .SetMethod("setAllowRunningOfInsecureContent",
489 &TestRunnerBindings::SetAllowRunningOfInsecureContent) 486 &TestRunnerBindings::SetAllowRunningOfInsecureContent)
490 .SetMethod("setAutoplayAllowed", &TestRunnerBindings::SetAutoplayAllowed) 487 .SetMethod("setAutoplayAllowed", &TestRunnerBindings::SetAutoplayAllowed)
491 .SetMethod("setAllowUniversalAccessFromFileURLs", 488 .SetMethod("setAllowUniversalAccessFromFileURLs",
492 &TestRunnerBindings::SetAllowUniversalAccessFromFileURLs) 489 &TestRunnerBindings::SetAllowUniversalAccessFromFileURLs)
493 .SetMethod("setBlockThirdPartyCookies", 490 .SetMethod("setBlockThirdPartyCookies",
494 &TestRunnerBindings::SetBlockThirdPartyCookies) 491 &TestRunnerBindings::SetBlockThirdPartyCookies)
495 .SetMethod("setAudioData", &TestRunnerBindings::SetAudioData) 492 .SetMethod("setAudioData", &TestRunnerBindings::SetAudioData)
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 void TestRunnerBindings::SetStorageAllowed(bool allowed) { 1122 void TestRunnerBindings::SetStorageAllowed(bool allowed) {
1126 if (runner_) 1123 if (runner_)
1127 runner_->SetStorageAllowed(allowed); 1124 runner_->SetStorageAllowed(allowed);
1128 } 1125 }
1129 1126
1130 void TestRunnerBindings::SetPluginsAllowed(bool allowed) { 1127 void TestRunnerBindings::SetPluginsAllowed(bool allowed) {
1131 if (runner_) 1128 if (runner_)
1132 runner_->SetPluginsAllowed(allowed); 1129 runner_->SetPluginsAllowed(allowed);
1133 } 1130 }
1134 1131
1135 void TestRunnerBindings::SetAllowDisplayOfInsecureContent(bool allowed) {
1136 if (runner_)
1137 runner_->SetAllowDisplayOfInsecureContent(allowed);
1138 }
1139
1140 void TestRunnerBindings::SetAllowRunningOfInsecureContent(bool allowed) { 1132 void TestRunnerBindings::SetAllowRunningOfInsecureContent(bool allowed) {
1141 if (runner_) 1133 if (runner_)
1142 runner_->SetAllowRunningOfInsecureContent(allowed); 1134 runner_->SetAllowRunningOfInsecureContent(allowed);
1143 } 1135 }
1144 1136
1145 void TestRunnerBindings::SetAutoplayAllowed(bool allowed) { 1137 void TestRunnerBindings::SetAutoplayAllowed(bool allowed) {
1146 if (runner_) 1138 if (runner_)
1147 runner_->SetAutoplayAllowed(allowed); 1139 runner_->SetAutoplayAllowed(allowed);
1148 } 1140 }
1149 1141
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
2306 } else if (key == "WebKitTabToLinksPreferenceKey") { 2298 } else if (key == "WebKitTabToLinksPreferenceKey") {
2307 prefs->tabs_to_links = value->BooleanValue(); 2299 prefs->tabs_to_links = value->BooleanValue();
2308 } else if (key == "WebKitWebGLEnabled") { 2300 } else if (key == "WebKitWebGLEnabled") {
2309 prefs->experimental_webgl_enabled = value->BooleanValue(); 2301 prefs->experimental_webgl_enabled = value->BooleanValue();
2310 } else if (key == "WebKitCSSGridLayoutEnabled") { 2302 } else if (key == "WebKitCSSGridLayoutEnabled") {
2311 prefs->experimental_css_grid_layout_enabled = value->BooleanValue(); 2303 prefs->experimental_css_grid_layout_enabled = value->BooleanValue();
2312 } else if (key == "WebKitHyperlinkAuditingEnabled") { 2304 } else if (key == "WebKitHyperlinkAuditingEnabled") {
2313 prefs->hyperlink_auditing_enabled = value->BooleanValue(); 2305 prefs->hyperlink_auditing_enabled = value->BooleanValue();
2314 } else if (key == "WebKitEnableCaretBrowsing") { 2306 } else if (key == "WebKitEnableCaretBrowsing") {
2315 prefs->caret_browsing_enabled = value->BooleanValue(); 2307 prefs->caret_browsing_enabled = value->BooleanValue();
2316 } else if (key == "WebKitAllowDisplayingInsecureContent") {
2317 prefs->allow_display_of_insecure_content = value->BooleanValue();
2318 } else if (key == "WebKitAllowRunningInsecureContent") { 2308 } else if (key == "WebKitAllowRunningInsecureContent") {
2319 prefs->allow_running_of_insecure_content = value->BooleanValue(); 2309 prefs->allow_running_of_insecure_content = value->BooleanValue();
2320 } else if (key == "WebKitDisableReadingFromCanvas") { 2310 } else if (key == "WebKitDisableReadingFromCanvas") {
2321 prefs->disable_reading_from_canvas = value->BooleanValue(); 2311 prefs->disable_reading_from_canvas = value->BooleanValue();
2322 } else if (key == "WebKitStrictMixedContentChecking") { 2312 } else if (key == "WebKitStrictMixedContentChecking") {
2323 prefs->strict_mixed_content_checking = value->BooleanValue(); 2313 prefs->strict_mixed_content_checking = value->BooleanValue();
2324 } else if (key == "WebKitStrictPowerfulFeatureRestrictions") { 2314 } else if (key == "WebKitStrictPowerfulFeatureRestrictions") {
2325 prefs->strict_powerful_feature_restrictions = value->BooleanValue(); 2315 prefs->strict_powerful_feature_restrictions = value->BooleanValue();
2326 } else if (key == "WebKitShouldRespectImageOrientation") { 2316 } else if (key == "WebKitShouldRespectImageOrientation") {
2327 prefs->should_respect_image_orientation = value->BooleanValue(); 2317 prefs->should_respect_image_orientation = value->BooleanValue();
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 void TestRunner::SetStorageAllowed(bool allowed) { 2464 void TestRunner::SetStorageAllowed(bool allowed) {
2475 layout_test_runtime_flags_.set_storage_allowed(allowed); 2465 layout_test_runtime_flags_.set_storage_allowed(allowed);
2476 OnLayoutTestRuntimeFlagsChanged(); 2466 OnLayoutTestRuntimeFlagsChanged();
2477 } 2467 }
2478 2468
2479 void TestRunner::SetPluginsAllowed(bool allowed) { 2469 void TestRunner::SetPluginsAllowed(bool allowed) {
2480 layout_test_runtime_flags_.set_plugins_allowed(allowed); 2470 layout_test_runtime_flags_.set_plugins_allowed(allowed);
2481 OnLayoutTestRuntimeFlagsChanged(); 2471 OnLayoutTestRuntimeFlagsChanged();
2482 } 2472 }
2483 2473
2484 void TestRunner::SetAllowDisplayOfInsecureContent(bool allowed) {
2485 layout_test_runtime_flags_.set_displaying_insecure_content_allowed(allowed);
2486 OnLayoutTestRuntimeFlagsChanged();
2487 }
2488
2489 void TestRunner::SetAllowRunningOfInsecureContent(bool allowed) { 2474 void TestRunner::SetAllowRunningOfInsecureContent(bool allowed) {
2490 layout_test_runtime_flags_.set_running_insecure_content_allowed(allowed); 2475 layout_test_runtime_flags_.set_running_insecure_content_allowed(allowed);
2491 OnLayoutTestRuntimeFlagsChanged(); 2476 OnLayoutTestRuntimeFlagsChanged();
2492 } 2477 }
2493 2478
2494 void TestRunner::SetAutoplayAllowed(bool allowed) { 2479 void TestRunner::SetAutoplayAllowed(bool allowed) {
2495 layout_test_runtime_flags_.set_autoplay_allowed(allowed); 2480 layout_test_runtime_flags_.set_autoplay_allowed(allowed);
2496 OnLayoutTestRuntimeFlagsChanged(); 2481 OnLayoutTestRuntimeFlagsChanged();
2497 } 2482 }
2498 2483
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
2741 2726
2742 void TestRunner::NotifyDone() { 2727 void TestRunner::NotifyDone() {
2743 if (layout_test_runtime_flags_.wait_until_done() && !topLoadingFrame() && 2728 if (layout_test_runtime_flags_.wait_until_done() && !topLoadingFrame() &&
2744 !will_navigate_ && work_queue_.is_empty()) 2729 !will_navigate_ && work_queue_.is_empty())
2745 delegate_->TestFinished(); 2730 delegate_->TestFinished();
2746 layout_test_runtime_flags_.set_wait_until_done(false); 2731 layout_test_runtime_flags_.set_wait_until_done(false);
2747 OnLayoutTestRuntimeFlagsChanged(); 2732 OnLayoutTestRuntimeFlagsChanged();
2748 } 2733 }
2749 2734
2750 } // namespace test_runner 2735 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/test_runner.h ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698