| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 class TestingPlatformSupport::TestingInterfaceProvider | 64 class TestingPlatformSupport::TestingInterfaceProvider |
| 65 : public blink::InterfaceProvider { | 65 : public blink::InterfaceProvider { |
| 66 public: | 66 public: |
| 67 TestingInterfaceProvider() = default; | 67 TestingInterfaceProvider() = default; |
| 68 virtual ~TestingInterfaceProvider() = default; | 68 virtual ~TestingInterfaceProvider() = default; |
| 69 | 69 |
| 70 void getInterface(const char* name, | 70 void getInterface(const char* name, |
| 71 mojo::ScopedMessagePipeHandle handle) override { | 71 mojo::ScopedMessagePipeHandle handle) override { |
| 72 if (std::string(name) == mojom::blink::MimeRegistry::Name_) { | 72 if (std::string(name) == mojom::blink::MimeRegistry::Name_) { |
| 73 mojo::MakeStrongBinding( | 73 mojo::MakeStrongBinding( |
| 74 wrapUnique(new MockMimeRegistry()), | 74 makeUnique<MockMimeRegistry>(), |
| 75 mojo::MakeRequest<mojom::blink::MimeRegistry>(std::move(handle))); | 75 mojo::MakeRequest<mojom::blink::MimeRegistry>(std::move(handle))); |
| 76 return; | 76 return; |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 namespace { | 81 namespace { |
| 82 | 82 |
| 83 double dummyCurrentTime() { | 83 double dummyCurrentTime() { |
| 84 return 0.0; | 84 return 0.0; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 m_platform = wrapUnique(new DummyPlatform); | 323 m_platform = wrapUnique(new DummyPlatform); |
| 324 Platform::setCurrentPlatformForTesting(m_platform.get()); | 324 Platform::setCurrentPlatformForTesting(m_platform.get()); |
| 325 | 325 |
| 326 WTF::Partitions::initialize(nullptr); | 326 WTF::Partitions::initialize(nullptr); |
| 327 WTF::setTimeFunctionsForTesting(dummyCurrentTime); | 327 WTF::setTimeFunctionsForTesting(dummyCurrentTime); |
| 328 WTF::initialize(nullptr); | 328 WTF::initialize(nullptr); |
| 329 | 329 |
| 330 m_compositorSupport = wrapUnique(new cc_blink::WebCompositorSupportImpl); | 330 m_compositorSupport = wrapUnique(new cc_blink::WebCompositorSupportImpl); |
| 331 m_testingPlatformConfig.compositorSupport = m_compositorSupport.get(); | 331 m_testingPlatformConfig.compositorSupport = m_compositorSupport.get(); |
| 332 m_testingPlatformSupport = | 332 m_testingPlatformSupport = |
| 333 wrapUnique(new TestingPlatformSupport(m_testingPlatformConfig)); | 333 makeUnique<TestingPlatformSupport>(m_testingPlatformConfig); |
| 334 | 334 |
| 335 ProcessHeap::init(); | 335 ProcessHeap::init(); |
| 336 ThreadState::attachMainThread(); | 336 ThreadState::attachMainThread(); |
| 337 ThreadState::current()->registerTraceDOMWrappers(nullptr, nullptr, nullptr, | 337 ThreadState::current()->registerTraceDOMWrappers(nullptr, nullptr, nullptr, |
| 338 nullptr); | 338 nullptr); |
| 339 HTTPNames::init(); | 339 HTTPNames::init(); |
| 340 } | 340 } |
| 341 | 341 |
| 342 ScopedUnittestsEnvironmentSetup::~ScopedUnittestsEnvironmentSetup() {} | 342 ScopedUnittestsEnvironmentSetup::~ScopedUnittestsEnvironmentSetup() {} |
| 343 | 343 |
| 344 } // namespace blink | 344 } // namespace blink |
| OLD | NEW |