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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 blink::WebMimeRegistry* TestBlinkWebUnitTestSupport::mimeRegistry() { | 186 blink::WebMimeRegistry* TestBlinkWebUnitTestSupport::mimeRegistry() { |
187 return &mime_registry_; | 187 return &mime_registry_; |
188 } | 188 } |
189 | 189 |
190 blink::WebURLLoader* TestBlinkWebUnitTestSupport::createURLLoader() { | 190 blink::WebURLLoader* TestBlinkWebUnitTestSupport::createURLLoader() { |
191 blink::WebThread* currentThread = Platform::current()->currentThread(); | 191 blink::WebThread* currentThread = Platform::current()->currentThread(); |
192 // This loader should be used only for process-local resources such as | 192 // This loader should be used only for process-local resources such as |
193 // data URLs. | 193 // data URLs. |
194 blink::WebURLLoader* default_loader = new WebURLLoaderImpl( | 194 blink::WebURLLoader* default_loader = new WebURLLoaderImpl( |
195 nullptr, base::WrapUnique(currentThread->getWebTaskRunner()->clone())); | 195 nullptr, base::WrapUnique(currentThread->getWebTaskRunner()->clone()), |
| 196 nullptr); |
196 return url_loader_factory_->createURLLoader(default_loader); | 197 return url_loader_factory_->createURLLoader(default_loader); |
197 } | 198 } |
198 | 199 |
199 blink::WebString TestBlinkWebUnitTestSupport::userAgent() { | 200 blink::WebString TestBlinkWebUnitTestSupport::userAgent() { |
200 return blink::WebString::fromUTF8("test_runner/0.0.0.0"); | 201 return blink::WebString::fromUTF8("test_runner/0.0.0.0"); |
201 } | 202 } |
202 | 203 |
203 blink::WebString TestBlinkWebUnitTestSupport::queryLocalizedString( | 204 blink::WebString TestBlinkWebUnitTestSupport::queryLocalizedString( |
204 blink::WebLocalizedString::Name name) { | 205 blink::WebLocalizedString::Name name) { |
205 // Returns placeholder strings to check if they are correctly localized. | 206 // Returns placeholder strings to check if they are correctly localized. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 return BlinkPlatformImpl::currentThread(); | 293 return BlinkPlatformImpl::currentThread(); |
293 } | 294 } |
294 | 295 |
295 void TestBlinkWebUnitTestSupport::getPluginList( | 296 void TestBlinkWebUnitTestSupport::getPluginList( |
296 bool refresh, blink::WebPluginListBuilder* builder) { | 297 bool refresh, blink::WebPluginListBuilder* builder) { |
297 builder->addPlugin("pdf", "pdf", "pdf-files"); | 298 builder->addPlugin("pdf", "pdf", "pdf-files"); |
298 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); | 299 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); |
299 } | 300 } |
300 | 301 |
301 } // namespace content | 302 } // namespace content |
OLD | NEW |