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