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 return NULL; | 179 return NULL; |
180 } | 180 } |
181 | 181 |
182 blink::WebMimeRegistry* TestBlinkWebUnitTestSupport::mimeRegistry() { | 182 blink::WebMimeRegistry* TestBlinkWebUnitTestSupport::mimeRegistry() { |
183 return &mime_registry_; | 183 return &mime_registry_; |
184 } | 184 } |
185 | 185 |
186 blink::WebURLLoader* TestBlinkWebUnitTestSupport::createURLLoader() { | 186 blink::WebURLLoader* TestBlinkWebUnitTestSupport::createURLLoader() { |
187 // This loader should be used only for process-local resources such as | 187 // This loader should be used only for process-local resources such as |
188 // data URLs. | 188 // data URLs. |
189 blink::WebURLLoader* default_loader = new WebURLLoaderImpl(nullptr); | 189 blink::WebURLLoader* default_loader = new WebURLLoaderImpl(nullptr, nullptr); |
190 return url_loader_factory_->createURLLoader(default_loader); | 190 return url_loader_factory_->createURLLoader(default_loader); |
191 } | 191 } |
192 | 192 |
193 blink::WebString TestBlinkWebUnitTestSupport::userAgent() { | 193 blink::WebString TestBlinkWebUnitTestSupport::userAgent() { |
194 return blink::WebString::fromUTF8("test_runner/0.0.0.0"); | 194 return blink::WebString::fromUTF8("test_runner/0.0.0.0"); |
195 } | 195 } |
196 | 196 |
197 blink::WebString TestBlinkWebUnitTestSupport::queryLocalizedString( | 197 blink::WebString TestBlinkWebUnitTestSupport::queryLocalizedString( |
198 blink::WebLocalizedString::Name name) { | 198 blink::WebLocalizedString::Name name) { |
199 // Returns placeholder strings to check if they are correctly localized. | 199 // Returns placeholder strings to check if they are correctly localized. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 return BlinkPlatformImpl::currentThread(); | 286 return BlinkPlatformImpl::currentThread(); |
287 } | 287 } |
288 | 288 |
289 void TestBlinkWebUnitTestSupport::getPluginList( | 289 void TestBlinkWebUnitTestSupport::getPluginList( |
290 bool refresh, blink::WebPluginListBuilder* builder) { | 290 bool refresh, blink::WebPluginListBuilder* builder) { |
291 builder->addPlugin("pdf", "pdf", "pdf-files"); | 291 builder->addPlugin("pdf", "pdf", "pdf-files"); |
292 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); | 292 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); |
293 } | 293 } |
294 | 294 |
295 } // namespace content | 295 } // namespace content |
OLD | NEW |