| OLD | NEW |
| 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/mock_content_settings_client.h" | 5 #include "components/test_runner/mock_content_settings_client.h" |
| 6 | 6 |
| 7 #include "components/test_runner/layout_test_runtime_flags.h" | 7 #include "components/test_runner/layout_test_runtime_flags.h" |
| 8 #include "components/test_runner/test_common.h" | 8 #include "components/test_runner/test_common.h" |
| 9 #include "components/test_runner/web_test_delegate.h" | 9 #include "components/test_runner/web_test_delegate.h" |
| 10 #include "third_party/WebKit/public/platform/WebURL.h" | 10 #include "third_party/WebKit/public/platform/WebURL.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool MockContentSettingsClient::allowRunningInsecureContent( | 57 bool MockContentSettingsClient::allowRunningInsecureContent( |
| 58 bool enabled_per_settings, | 58 bool enabled_per_settings, |
| 59 const blink::WebSecurityOrigin& context, | 59 const blink::WebSecurityOrigin& context, |
| 60 const blink::WebURL& url) { | 60 const blink::WebURL& url) { |
| 61 return enabled_per_settings || flags_->running_insecure_content_allowed(); | 61 return enabled_per_settings || flags_->running_insecure_content_allowed(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool MockContentSettingsClient::allowAutoplay(bool default_value) { | 64 bool MockContentSettingsClient::allowAutoplay(bool default_value) { |
| 65 return default_value || flags_->autoplay_allowed(); | 65 return flags_->autoplay_allowed(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void MockContentSettingsClient::SetDelegate(WebTestDelegate* delegate) { | 68 void MockContentSettingsClient::SetDelegate(WebTestDelegate* delegate) { |
| 69 delegate_ = delegate; | 69 delegate_ = delegate; |
| 70 } | 70 } |
| 71 | 71 |
| 72 } // namespace test_runner | 72 } // namespace test_runner |
| OLD | NEW |