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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 blink::WebFileUtilities* TestBlinkWebUnitTestSupport::fileUtilities() { | 183 blink::WebFileUtilities* TestBlinkWebUnitTestSupport::fileUtilities() { |
184 return &file_utilities_; | 184 return &file_utilities_; |
185 } | 185 } |
186 | 186 |
187 blink::WebIDBFactory* TestBlinkWebUnitTestSupport::idbFactory() { | 187 blink::WebIDBFactory* TestBlinkWebUnitTestSupport::idbFactory() { |
188 NOTREACHED() << | 188 NOTREACHED() << |
189 "IndexedDB cannot be tested with in-process harnesses."; | 189 "IndexedDB cannot be tested with in-process harnesses."; |
190 return NULL; | 190 return NULL; |
191 } | 191 } |
192 | 192 |
193 blink::WebMimeRegistry* TestBlinkWebUnitTestSupport::mimeRegistry() { | |
194 return &mime_registry_; | |
195 } | |
196 | |
197 blink::WebURLLoader* TestBlinkWebUnitTestSupport::createURLLoader() { | 193 blink::WebURLLoader* TestBlinkWebUnitTestSupport::createURLLoader() { |
198 // This loader should be used only for process-local resources such as | 194 // This loader should be used only for process-local resources such as |
199 // data URLs. | 195 // data URLs. |
200 blink::WebURLLoader* default_loader = new WebURLLoaderImpl(nullptr, nullptr); | 196 blink::WebURLLoader* default_loader = new WebURLLoaderImpl(nullptr, nullptr); |
201 return url_loader_factory_->createURLLoader(default_loader); | 197 return url_loader_factory_->createURLLoader(default_loader); |
202 } | 198 } |
203 | 199 |
204 blink::WebString TestBlinkWebUnitTestSupport::userAgent() { | 200 blink::WebString TestBlinkWebUnitTestSupport::userAgent() { |
205 return blink::WebString::fromUTF8("test_runner/0.0.0.0"); | 201 return blink::WebString::fromUTF8("test_runner/0.0.0.0"); |
206 } | 202 } |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 blink::WebRTCCertificateGenerator* | 345 blink::WebRTCCertificateGenerator* |
350 TestBlinkWebUnitTestSupport::createRTCCertificateGenerator() { | 346 TestBlinkWebUnitTestSupport::createRTCCertificateGenerator() { |
351 #if defined(ENABLE_WEBRTC) | 347 #if defined(ENABLE_WEBRTC) |
352 return new TestWebRTCCertificateGenerator(); | 348 return new TestWebRTCCertificateGenerator(); |
353 #else | 349 #else |
354 return nullptr; | 350 return nullptr; |
355 #endif | 351 #endif |
356 } | 352 } |
357 | 353 |
358 } // namespace content | 354 } // namespace content |
OLD | NEW |