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/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 #endif | 105 #endif |
106 | 106 |
107 // Test shell always exposes the GC. | 107 // Test shell always exposes the GC. |
108 std::string flags("--expose-gc"); | 108 std::string flags("--expose-gc"); |
109 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); | 109 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); |
110 } | 110 } |
111 | 111 |
112 TestBlinkWebUnitTestSupport::~TestBlinkWebUnitTestSupport() { | 112 TestBlinkWebUnitTestSupport::~TestBlinkWebUnitTestSupport() { |
113 url_loader_factory_.reset(); | 113 url_loader_factory_.reset(); |
114 mock_clipboard_.reset(); | 114 mock_clipboard_.reset(); |
| 115 if (renderer_scheduler_) |
| 116 renderer_scheduler_->Shutdown(); |
115 blink::shutdown(); | 117 blink::shutdown(); |
116 } | 118 } |
117 | 119 |
118 blink::WebBlobRegistry* TestBlinkWebUnitTestSupport::blobRegistry() { | 120 blink::WebBlobRegistry* TestBlinkWebUnitTestSupport::blobRegistry() { |
119 return &blob_registry_; | 121 return &blob_registry_; |
120 } | 122 } |
121 | 123 |
122 blink::WebClipboard* TestBlinkWebUnitTestSupport::clipboard() { | 124 blink::WebClipboard* TestBlinkWebUnitTestSupport::clipboard() { |
123 // Mock out clipboard calls so that tests don't mess | 125 // Mock out clipboard calls so that tests don't mess |
124 // with each other's copies/pastes when running in parallel. | 126 // with each other's copies/pastes when running in parallel. |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 return web_scheduler_.get(); | 318 return web_scheduler_.get(); |
317 } | 319 } |
318 | 320 |
319 blink::WebThread* TestBlinkWebUnitTestSupport::currentThread() { | 321 blink::WebThread* TestBlinkWebUnitTestSupport::currentThread() { |
320 if (web_thread_ && web_thread_->isCurrentThread()) | 322 if (web_thread_ && web_thread_->isCurrentThread()) |
321 return web_thread_.get(); | 323 return web_thread_.get(); |
322 return BlinkPlatformImpl::currentThread(); | 324 return BlinkPlatformImpl::currentThread(); |
323 } | 325 } |
324 | 326 |
325 } // namespace content | 327 } // namespace content |
OLD | NEW |