| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 125   // an error that it's not set. Cleared by ClearInstanceForTesting() below. | 125   // an error that it's not set. Cleared by ClearInstanceForTesting() below. | 
| 126   base::FeatureList::SetInstance(base::WrapUnique(new base::FeatureList)); | 126   base::FeatureList::SetInstance(base::WrapUnique(new base::FeatureList)); | 
| 127 | 127 | 
| 128   // Initialize mojo firstly to enable Blink initialization to use it. | 128   // Initialize mojo firstly to enable Blink initialization to use it. | 
| 129   InitializeMojo(); | 129   InitializeMojo(); | 
| 130 | 130 | 
| 131   blink::initialize(this); | 131   blink::initialize(this); | 
| 132   blink::setLayoutTestMode(true); | 132   blink::setLayoutTestMode(true); | 
| 133   blink::WebRuntimeFeatures::enableDatabase(true); | 133   blink::WebRuntimeFeatures::enableDatabase(true); | 
| 134   blink::WebRuntimeFeatures::enableNotifications(true); | 134   blink::WebRuntimeFeatures::enableNotifications(true); | 
| 135   blink::WebRuntimeFeatures::enableTouch(true); | 135   blink::WebRuntimeFeatures::enableTouchEventAPI(true); | 
| 136 | 136 | 
| 137   // Initialize NetworkStateNotifier. | 137   // Initialize NetworkStateNotifier. | 
| 138   blink::WebNetworkStateNotifier::setWebConnection( | 138   blink::WebNetworkStateNotifier::setWebConnection( | 
| 139       blink::WebConnectionType::WebConnectionTypeUnknown, | 139       blink::WebConnectionType::WebConnectionTypeUnknown, | 
| 140       std::numeric_limits<double>::infinity()); | 140       std::numeric_limits<double>::infinity()); | 
| 141 | 141 | 
| 142   // Initialize libraries for media. | 142   // Initialize libraries for media. | 
| 143   media::InitializeMediaLibrary(); | 143   media::InitializeMediaLibrary(); | 
| 144 | 144 | 
| 145   file_utilities_.set_sandbox_enabled(false); | 145   file_utilities_.set_sandbox_enabled(false); | 
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 346 blink::WebRTCCertificateGenerator* | 346 blink::WebRTCCertificateGenerator* | 
| 347 TestBlinkWebUnitTestSupport::createRTCCertificateGenerator() { | 347 TestBlinkWebUnitTestSupport::createRTCCertificateGenerator() { | 
| 348 #if defined(ENABLE_WEBRTC) | 348 #if defined(ENABLE_WEBRTC) | 
| 349   return new TestWebRTCCertificateGenerator(); | 349   return new TestWebRTCCertificateGenerator(); | 
| 350 #else | 350 #else | 
| 351   return nullptr; | 351   return nullptr; | 
| 352 #endif | 352 #endif | 
| 353 } | 353 } | 
| 354 | 354 | 
| 355 }  // namespace content | 355 }  // namespace content | 
| OLD | NEW | 
|---|