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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 blink::WebClipboard* TestBlinkWebUnitTestSupport::clipboard() { | 166 blink::WebClipboard* TestBlinkWebUnitTestSupport::clipboard() { |
167 // Mock out clipboard calls so that tests don't mess | 167 // Mock out clipboard calls so that tests don't mess |
168 // with each other's copies/pastes when running in parallel. | 168 // with each other's copies/pastes when running in parallel. |
169 return mock_clipboard_.get(); | 169 return mock_clipboard_.get(); |
170 } | 170 } |
171 | 171 |
172 blink::WebFileUtilities* TestBlinkWebUnitTestSupport::fileUtilities() { | 172 blink::WebFileUtilities* TestBlinkWebUnitTestSupport::fileUtilities() { |
173 return &file_utilities_; | 173 return &file_utilities_; |
174 } | 174 } |
175 | 175 |
176 blink::WebIDBFactory* TestBlinkWebUnitTestSupport::idbFactory() { | |
177 NOTREACHED() << | |
178 "IndexedDB cannot be tested with in-process harnesses."; | |
179 return NULL; | |
180 } | |
181 | |
182 blink::WebMimeRegistry* TestBlinkWebUnitTestSupport::mimeRegistry() { | 176 blink::WebMimeRegistry* TestBlinkWebUnitTestSupport::mimeRegistry() { |
183 return &mime_registry_; | 177 return &mime_registry_; |
184 } | 178 } |
185 | 179 |
186 blink::WebURLLoader* TestBlinkWebUnitTestSupport::createURLLoader() { | 180 blink::WebURLLoader* TestBlinkWebUnitTestSupport::createURLLoader() { |
187 // This loader should be used only for process-local resources such as | 181 // This loader should be used only for process-local resources such as |
188 // data URLs. | 182 // data URLs. |
189 blink::WebURLLoader* default_loader = new WebURLLoaderImpl(nullptr, nullptr); | 183 blink::WebURLLoader* default_loader = new WebURLLoaderImpl(nullptr, nullptr); |
190 return url_loader_factory_->createURLLoader(default_loader); | 184 return url_loader_factory_->createURLLoader(default_loader); |
191 } | 185 } |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 return BlinkPlatformImpl::currentThread(); | 280 return BlinkPlatformImpl::currentThread(); |
287 } | 281 } |
288 | 282 |
289 void TestBlinkWebUnitTestSupport::getPluginList( | 283 void TestBlinkWebUnitTestSupport::getPluginList( |
290 bool refresh, blink::WebPluginListBuilder* builder) { | 284 bool refresh, blink::WebPluginListBuilder* builder) { |
291 builder->addPlugin("pdf", "pdf", "pdf-files"); | 285 builder->addPlugin("pdf", "pdf", "pdf-files"); |
292 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); | 286 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); |
293 } | 287 } |
294 | 288 |
295 } // namespace content | 289 } // namespace content |
OLD | NEW |