| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 TestBlinkWebUnitTestSupport::~TestBlinkWebUnitTestSupport() { | 151 TestBlinkWebUnitTestSupport::~TestBlinkWebUnitTestSupport() { |
| 152 url_loader_factory_.reset(); | 152 url_loader_factory_.reset(); |
| 153 mock_clipboard_.reset(); | 153 mock_clipboard_.reset(); |
| 154 if (renderer_scheduler_) | 154 if (renderer_scheduler_) |
| 155 renderer_scheduler_->Shutdown(); | 155 renderer_scheduler_->Shutdown(); |
| 156 | 156 |
| 157 // Clear the FeatureList that was registered in the constructor. | 157 // Clear the FeatureList that was registered in the constructor. |
| 158 base::FeatureList::ClearInstanceForTesting(); | 158 base::FeatureList::ClearInstanceForTesting(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 blink::WebBlobRegistry* TestBlinkWebUnitTestSupport::blobRegistry() { | 161 blink::WebBlobRegistry* TestBlinkWebUnitTestSupport::getBlobRegistry() { |
| 162 return &blob_registry_; | 162 return &blob_registry_; |
| 163 } | 163 } |
| 164 | 164 |
| 165 blink::WebClipboard* TestBlinkWebUnitTestSupport::clipboard() { | 165 blink::WebClipboard* TestBlinkWebUnitTestSupport::clipboard() { |
| 166 // Mock out clipboard calls so that tests don't mess | 166 // Mock out clipboard calls so that tests don't mess |
| 167 // with each other's copies/pastes when running in parallel. | 167 // with each other's copies/pastes when running in parallel. |
| 168 return mock_clipboard_.get(); | 168 return mock_clipboard_.get(); |
| 169 } | 169 } |
| 170 | 170 |
| 171 blink::WebFileUtilities* TestBlinkWebUnitTestSupport::fileUtilities() { | 171 blink::WebFileUtilities* TestBlinkWebUnitTestSupport::fileUtilities() { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 287 |
| 288 void TestBlinkWebUnitTestSupport::getPluginList( | 288 void TestBlinkWebUnitTestSupport::getPluginList( |
| 289 bool refresh, | 289 bool refresh, |
| 290 const blink::WebSecurityOrigin& mainFrameOrigin, | 290 const blink::WebSecurityOrigin& mainFrameOrigin, |
| 291 blink::WebPluginListBuilder* builder) { | 291 blink::WebPluginListBuilder* builder) { |
| 292 builder->addPlugin("pdf", "pdf", "pdf-files"); | 292 builder->addPlugin("pdf", "pdf", "pdf-files"); |
| 293 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); | 293 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); |
| 294 } | 294 } |
| 295 | 295 |
| 296 } // namespace content | 296 } // namespace content |
| OLD | NEW |