Index: content/shell/browser/layout_test/layout_test_content_browser_client.cc |
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc |
index 25425570f0e9857587af895059060156d6912554..cc183ce7f418c5a8edf7e04a535a9f32fbcb828c 100644 |
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc |
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc |
@@ -125,4 +125,35 @@ LayoutTestContentBrowserClient::GetPlatformNotificationService() { |
return layout_test_notification_manager_.get(); |
} |
+bool LayoutTestContentBrowserClient::ShouldAllowDisplayingInsecureContent( |
+ bool allowed_per_settings, |
+ const GURL& resource_url, |
+ content::WebContents* web_contents) { |
+ const base::DictionaryValue& test_flags = |
+ BlinkTestController::Get() |
+ ->accumulated_layout_test_runtime_flags_changes(); |
+ bool allow_displaying = false; |
+ test_flags.GetBoolean("displaying_insecure_content_allowed", |
+ &allow_displaying); |
+ // Displaying is also allowed when running is allowed. |
+ bool allow_running = false; |
+ test_flags.GetBoolean("running_insecure_content_allowed", &allow_running); |
+ |
+ return allowed_per_settings || allow_displaying || allow_running; |
+} |
+ |
+bool LayoutTestContentBrowserClient::ShouldAllowRunningInsecureContent( |
+ bool allowed_per_settings, |
+ const url::Origin& origin, |
+ const GURL& resource_url, |
+ content::WebContents* web_contents) { |
+ const base::DictionaryValue& test_flags = |
+ BlinkTestController::Get() |
+ ->accumulated_layout_test_runtime_flags_changes(); |
+ bool allow_running = false; |
+ test_flags.GetBoolean("running_insecure_content_allowed", &allow_running); |
+ |
+ return allowed_per_settings || allow_running; |
+} |
+ |
} // namespace content |