| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/test_blink_web_unit_test_support.h" | 5 #include "content/test/test_blink_web_unit_test_support.h" |
| 6 | 6 |
| 7 #include "base/feature_list.h" | 7 #include "base/feature_list.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // an error that it's not set. Cleared by ClearInstanceForTesting() below. | 126 // an error that it's not set. Cleared by ClearInstanceForTesting() below. |
| 127 base::FeatureList::SetInstance(base::WrapUnique(new base::FeatureList)); | 127 base::FeatureList::SetInstance(base::WrapUnique(new base::FeatureList)); |
| 128 | 128 |
| 129 // Initialize mojo firstly to enable Blink initialization to use it. | 129 // Initialize mojo firstly to enable Blink initialization to use it. |
| 130 InitializeMojo(); | 130 InitializeMojo(); |
| 131 | 131 |
| 132 blink::initialize(this); | 132 blink::initialize(this); |
| 133 blink::setLayoutTestMode(true); | 133 blink::setLayoutTestMode(true); |
| 134 blink::WebRuntimeFeatures::enableDatabase(true); | 134 blink::WebRuntimeFeatures::enableDatabase(true); |
| 135 blink::WebRuntimeFeatures::enableNotifications(true); | 135 blink::WebRuntimeFeatures::enableNotifications(true); |
| 136 blink::WebRuntimeFeatures::enableTouchEventAPI(true); | 136 blink::WebRuntimeFeatures::enableTouchEventFeatureDetection(true); |
| 137 | 137 |
| 138 // Initialize NetworkStateNotifier. | 138 // Initialize NetworkStateNotifier. |
| 139 blink::WebNetworkStateNotifier::setWebConnection( | 139 blink::WebNetworkStateNotifier::setWebConnection( |
| 140 blink::WebConnectionType::WebConnectionTypeUnknown, | 140 blink::WebConnectionType::WebConnectionTypeUnknown, |
| 141 std::numeric_limits<double>::infinity()); | 141 std::numeric_limits<double>::infinity()); |
| 142 | 142 |
| 143 // Initialize libraries for media. | 143 // Initialize libraries for media. |
| 144 media::InitializeMediaLibrary(); | 144 media::InitializeMediaLibrary(); |
| 145 | 145 |
| 146 file_utilities_.set_sandbox_enabled(false); | 146 file_utilities_.set_sandbox_enabled(false); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 blink::WebRTCCertificateGenerator* | 347 blink::WebRTCCertificateGenerator* |
| 348 TestBlinkWebUnitTestSupport::createRTCCertificateGenerator() { | 348 TestBlinkWebUnitTestSupport::createRTCCertificateGenerator() { |
| 349 #if BUILDFLAG(ENABLE_WEBRTC) | 349 #if BUILDFLAG(ENABLE_WEBRTC) |
| 350 return new TestWebRTCCertificateGenerator(); | 350 return new TestWebRTCCertificateGenerator(); |
| 351 #else | 351 #else |
| 352 return nullptr; | 352 return nullptr; |
| 353 #endif | 353 #endif |
| 354 } | 354 } |
| 355 | 355 |
| 356 } // namespace content | 356 } // namespace content |
| OLD | NEW |