| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 WebBlobRegistry* getBlobRegistry() override; | 107 WebBlobRegistry* getBlobRegistry() override; |
| 108 WebClipboard* clipboard() override; | 108 WebClipboard* clipboard() override; |
| 109 WebFileUtilities* fileUtilities() override; | 109 WebFileUtilities* fileUtilities() override; |
| 110 WebIDBFactory* idbFactory() override; | 110 WebIDBFactory* idbFactory() override; |
| 111 WebURLLoaderMockFactory* getURLLoaderMockFactory() override; | 111 WebURLLoaderMockFactory* getURLLoaderMockFactory() override; |
| 112 blink::WebURLLoader* createURLLoader() override; | 112 blink::WebURLLoader* createURLLoader() override; |
| 113 WebData loadResource(const char* name) override; | 113 WebData loadResource(const char* name) override; |
| 114 WebURLError cancelledError(const WebURL&) const override; | 114 WebURLError cancelledError(const WebURL&) const override; |
| 115 InterfaceProvider* interfaceProvider() override; | 115 InterfaceProvider* interfaceProvider() override; |
| 116 | 116 |
| 117 virtual void runUntilIdle(); |
| 118 |
| 117 protected: | 119 protected: |
| 118 class TestingInterfaceProvider; | 120 class TestingInterfaceProvider; |
| 119 | 121 |
| 120 const Config m_config; | 122 const Config m_config; |
| 121 Platform* const m_oldPlatform; | 123 Platform* const m_oldPlatform; |
| 122 std::unique_ptr<TestingInterfaceProvider> m_interfaceProvider; | 124 std::unique_ptr<TestingInterfaceProvider> m_interfaceProvider; |
| 123 }; | 125 }; |
| 124 | 126 |
| 125 // This class adds mocked scheduler support to TestingPlatformSupport. See also | 127 // This class adds mocked scheduler support to TestingPlatformSupport. See also |
| 126 // ScopedTestingPlatformSupport to use this class correctly. | 128 // ScopedTestingPlatformSupport to use this class correctly. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 138 // Runs a single task. | 140 // Runs a single task. |
| 139 void runSingleTask(); | 141 void runSingleTask(); |
| 140 | 142 |
| 141 // Runs all currently queued immediate tasks and delayed tasks whose delay has | 143 // Runs all currently queued immediate tasks and delayed tasks whose delay has |
| 142 // expired plus any immediate tasks that are posted as a result of running | 144 // expired plus any immediate tasks that are posted as a result of running |
| 143 // those tasks. | 145 // those tasks. |
| 144 // | 146 // |
| 145 // This function ignores future delayed tasks when deciding if the system is | 147 // This function ignores future delayed tasks when deciding if the system is |
| 146 // idle. If you need to ensure delayed tasks run, try runForPeriodSeconds() | 148 // idle. If you need to ensure delayed tasks run, try runForPeriodSeconds() |
| 147 // instead. | 149 // instead. |
| 148 void runUntilIdle(); | 150 void runUntilIdle() override; |
| 149 | 151 |
| 150 // Runs for |seconds| the testing clock is advanced by |seconds|. Note real | 152 // Runs for |seconds| the testing clock is advanced by |seconds|. Note real |
| 151 // time elapsed will typically much less than |seconds| because delays between | 153 // time elapsed will typically much less than |seconds| because delays between |
| 152 // timers are fast forwarded. | 154 // timers are fast forwarded. |
| 153 void runForPeriodSeconds(double seconds); | 155 void runForPeriodSeconds(double seconds); |
| 154 | 156 |
| 155 // Advances |m_clock| by |seconds|. | 157 // Advances |m_clock| by |seconds|. |
| 156 void advanceClockSeconds(double seconds); | 158 void advanceClockSeconds(double seconds); |
| 157 | 159 |
| 158 scheduler::RendererScheduler* rendererScheduler() const; | 160 scheduler::RendererScheduler* rendererScheduler() const; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 m_discardableMemoryAllocator; | 232 m_discardableMemoryAllocator; |
| 231 std::unique_ptr<DummyPlatform> m_dummyPlatform; | 233 std::unique_ptr<DummyPlatform> m_dummyPlatform; |
| 232 std::unique_ptr<cc_blink::WebCompositorSupportImpl> m_compositorSupport; | 234 std::unique_ptr<cc_blink::WebCompositorSupportImpl> m_compositorSupport; |
| 233 TestingPlatformSupport::Config m_testingPlatformConfig; | 235 TestingPlatformSupport::Config m_testingPlatformConfig; |
| 234 std::unique_ptr<TestingPlatformSupport> m_testingPlatformSupport; | 236 std::unique_ptr<TestingPlatformSupport> m_testingPlatformSupport; |
| 235 }; | 237 }; |
| 236 | 238 |
| 237 } // namespace blink | 239 } // namespace blink |
| 238 | 240 |
| 239 #endif // TestingPlatformSupport_h | 241 #endif // TestingPlatformSupport_h |
| OLD | NEW |