| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "platform/testing/TestingPlatformSupport.h" | 31 #include "platform/testing/TestingPlatformSupport.h" |
| 32 | 32 |
| 33 #include "base/command_line.h" | 33 #include "base/command_line.h" |
| 34 #include "base/memory/discardable_memory_allocator.h" | 34 #include "base/memory/discardable_memory_allocator.h" |
| 35 #include "base/memory/ptr_util.h" | 35 #include "base/memory/ptr_util.h" |
| 36 #include "base/metrics/statistics_recorder.h" | 36 #include "base/metrics/statistics_recorder.h" |
| 37 #include "base/run_loop.h" |
| 37 #include "base/test/icu_test_util.h" | 38 #include "base/test/icu_test_util.h" |
| 38 #include "base/test/test_discardable_memory_allocator.h" | 39 #include "base/test/test_discardable_memory_allocator.h" |
| 39 #include "cc/blink/web_compositor_support_impl.h" | 40 #include "cc/blink/web_compositor_support_impl.h" |
| 40 #include "cc/test/ordered_simple_task_runner.h" | 41 #include "cc/test/ordered_simple_task_runner.h" |
| 41 #include "mojo/public/cpp/bindings/strong_binding.h" | 42 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 42 #include "platform/HTTPNames.h" | 43 #include "platform/HTTPNames.h" |
| 43 #include "platform/heap/Heap.h" | 44 #include "platform/heap/Heap.h" |
| 44 #include "platform/network/mime/MockMimeRegistry.h" | 45 #include "platform/network/mime/MockMimeRegistry.h" |
| 45 #include "platform/scheduler/base/real_time_domain.h" | 46 #include "platform/scheduler/base/real_time_domain.h" |
| 46 #include "platform/scheduler/base/task_queue_manager.h" | 47 #include "platform/scheduler/base/task_queue_manager.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } | 190 } |
| 190 | 191 |
| 191 WebURLError TestingPlatformSupport::cancelledError(const WebURL& url) const { | 192 WebURLError TestingPlatformSupport::cancelledError(const WebURL& url) const { |
| 192 return m_oldPlatform ? m_oldPlatform->cancelledError(url) : WebURLError(); | 193 return m_oldPlatform ? m_oldPlatform->cancelledError(url) : WebURLError(); |
| 193 } | 194 } |
| 194 | 195 |
| 195 InterfaceProvider* TestingPlatformSupport::interfaceProvider() { | 196 InterfaceProvider* TestingPlatformSupport::interfaceProvider() { |
| 196 return m_interfaceProvider.get(); | 197 return m_interfaceProvider.get(); |
| 197 } | 198 } |
| 198 | 199 |
| 200 void TestingPlatformSupport::runUntilIdle() { |
| 201 base::RunLoop().RunUntilIdle(); |
| 202 } |
| 203 |
| 199 // TestingPlatformSupportWithMockScheduler definition: | 204 // TestingPlatformSupportWithMockScheduler definition: |
| 200 | 205 |
| 201 TestingPlatformSupportWithMockScheduler:: | 206 TestingPlatformSupportWithMockScheduler:: |
| 202 TestingPlatformSupportWithMockScheduler() | 207 TestingPlatformSupportWithMockScheduler() |
| 203 : TestingPlatformSupportWithMockScheduler( | 208 : TestingPlatformSupportWithMockScheduler( |
| 204 TestingPlatformSupport::Config()) {} | 209 TestingPlatformSupport::Config()) {} |
| 205 | 210 |
| 206 TestingPlatformSupportWithMockScheduler:: | 211 TestingPlatformSupportWithMockScheduler:: |
| 207 TestingPlatformSupportWithMockScheduler(const Config& config) | 212 TestingPlatformSupportWithMockScheduler(const Config& config) |
| 208 : TestingPlatformSupport(config), | 213 : TestingPlatformSupport(config), |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 ProcessHeap::init(); | 340 ProcessHeap::init(); |
| 336 ThreadState::attachMainThread(); | 341 ThreadState::attachMainThread(); |
| 337 ThreadState::current()->registerTraceDOMWrappers(nullptr, nullptr, nullptr, | 342 ThreadState::current()->registerTraceDOMWrappers(nullptr, nullptr, nullptr, |
| 338 nullptr); | 343 nullptr); |
| 339 HTTPNames::init(); | 344 HTTPNames::init(); |
| 340 } | 345 } |
| 341 | 346 |
| 342 ScopedUnittestsEnvironmentSetup::~ScopedUnittestsEnvironmentSetup() {} | 347 ScopedUnittestsEnvironmentSetup::~ScopedUnittestsEnvironmentSetup() {} |
| 343 | 348 |
| 344 } // namespace blink | 349 } // namespace blink |
| OLD | NEW |