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/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 blink::WebRuntimeFeatures::enableApplicationCache(true); | 124 blink::WebRuntimeFeatures::enableApplicationCache(true); |
125 blink::WebRuntimeFeatures::enableDatabase(true); | 125 blink::WebRuntimeFeatures::enableDatabase(true); |
126 blink::WebRuntimeFeatures::enableNotifications(true); | 126 blink::WebRuntimeFeatures::enableNotifications(true); |
127 blink::WebRuntimeFeatures::enableTouch(true); | 127 blink::WebRuntimeFeatures::enableTouch(true); |
128 | 128 |
129 // Initialize NetworkStateNotifier. | 129 // Initialize NetworkStateNotifier. |
130 blink::WebNetworkStateNotifier::setWebConnection( | 130 blink::WebNetworkStateNotifier::setWebConnection( |
131 blink::WebConnectionType::WebConnectionTypeUnknown, | 131 blink::WebConnectionType::WebConnectionTypeUnknown, |
132 std::numeric_limits<double>::infinity()); | 132 std::numeric_limits<double>::infinity()); |
133 | 133 |
134 // Initialize libraries for media and enable the media player. | 134 // Initialize libraries for media. |
135 media::InitializeMediaLibrary(); | 135 media::InitializeMediaLibrary(); |
136 blink::WebRuntimeFeatures::enableMediaPlayer(true); | |
137 | 136 |
138 file_utilities_.set_sandbox_enabled(false); | 137 file_utilities_.set_sandbox_enabled(false); |
139 | 138 |
140 if (!file_system_root_.CreateUniqueTempDir()) { | 139 if (!file_system_root_.CreateUniqueTempDir()) { |
141 LOG(WARNING) << "Failed to create a temp dir for the filesystem." | 140 LOG(WARNING) << "Failed to create a temp dir for the filesystem." |
142 "FileSystem feature will be disabled."; | 141 "FileSystem feature will be disabled."; |
143 DCHECK(file_system_root_.path().empty()); | 142 DCHECK(file_system_root_.path().empty()); |
144 } | 143 } |
145 | 144 |
146 #if defined(OS_WIN) | 145 #if defined(OS_WIN) |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 return BlinkPlatformImpl::currentThread(); | 345 return BlinkPlatformImpl::currentThread(); |
347 } | 346 } |
348 | 347 |
349 void TestBlinkWebUnitTestSupport::getPluginList( | 348 void TestBlinkWebUnitTestSupport::getPluginList( |
350 bool refresh, blink::WebPluginListBuilder* builder) { | 349 bool refresh, blink::WebPluginListBuilder* builder) { |
351 builder->addPlugin("pdf", "pdf", "pdf-files"); | 350 builder->addPlugin("pdf", "pdf", "pdf-files"); |
352 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); | 351 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); |
353 } | 352 } |
354 | 353 |
355 } // namespace content | 354 } // namespace content |
OLD | NEW |