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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 TestingPlatformSupportWithMockScheduler(); | 138 TestingPlatformSupportWithMockScheduler(); |
139 explicit TestingPlatformSupportWithMockScheduler(const Config&); | 139 explicit TestingPlatformSupportWithMockScheduler(const Config&); |
140 ~TestingPlatformSupportWithMockScheduler() override; | 140 ~TestingPlatformSupportWithMockScheduler() override; |
141 | 141 |
142 // Platform: | 142 // Platform: |
143 WebThread* currentThread() override; | 143 WebThread* currentThread() override; |
144 | 144 |
145 // Runs a single task. | 145 // Runs a single task. |
146 void runSingleTask(); | 146 void runSingleTask(); |
147 | 147 |
148 // Runs all currently queued immediate tasks and delayed tasks whose delay has
expired | 148 // Runs all currently queued immediate tasks and delayed tasks whose delay has |
149 // plus any immediate tasks that are posted as a result of running those tasks
. | 149 // expired plus any immediate tasks that are posted as a result of running |
| 150 // those tasks. |
150 // | 151 // |
151 // This function ignores future delayed tasks when deciding if the system is i
dle. | 152 // This function ignores future delayed tasks when deciding if the system is |
152 // If you need to ensure delayed tasks run, try runForPeriodSeconds() instead. | 153 // idle. If you need to ensure delayed tasks run, try runForPeriodSeconds() |
| 154 // instead. |
153 void runUntilIdle(); | 155 void runUntilIdle(); |
154 | 156 |
155 // Runs for |seconds|. Note we use a testing clock rather than the wall clock
here. | 157 // Runs for |seconds|. Note we use a testing clock rather than the wall clock |
| 158 // here. |
156 void runForPeriodSeconds(double seconds); | 159 void runForPeriodSeconds(double seconds); |
157 | 160 |
158 // Advances |m_clock| by |seconds|. | 161 // Advances |m_clock| by |seconds|. |
159 void advanceClockSeconds(double seconds); | 162 void advanceClockSeconds(double seconds); |
160 | 163 |
161 scheduler::RendererScheduler* rendererScheduler() const; | 164 scheduler::RendererScheduler* rendererScheduler() const; |
162 | 165 |
163 // Controls the behavior of |m_mockTaskRunner| if true, then |m_clock| will | 166 // Controls the behavior of |m_mockTaskRunner| if true, then |m_clock| will |
164 // be advanced to the next timer when there's no more immediate work to do. | 167 // be advanced to the next timer when there's no more immediate work to do. |
165 void setAutoAdvanceNowToPendingTasks(bool); | 168 void setAutoAdvanceNowToPendingTasks(bool); |
(...skipping 20 matching lines...) Expand all Loading... |
186 m_discardableMemoryAllocator; | 189 m_discardableMemoryAllocator; |
187 std::unique_ptr<DummyPlatform> m_platform; | 190 std::unique_ptr<DummyPlatform> m_platform; |
188 std::unique_ptr<cc_blink::WebCompositorSupportImpl> m_compositorSupport; | 191 std::unique_ptr<cc_blink::WebCompositorSupportImpl> m_compositorSupport; |
189 TestingPlatformSupport::Config m_testingPlatformConfig; | 192 TestingPlatformSupport::Config m_testingPlatformConfig; |
190 std::unique_ptr<TestingPlatformSupport> m_testingPlatformSupport; | 193 std::unique_ptr<TestingPlatformSupport> m_testingPlatformSupport; |
191 }; | 194 }; |
192 | 195 |
193 } // namespace blink | 196 } // namespace blink |
194 | 197 |
195 #endif // TestingPlatformSupport_h | 198 #endif // TestingPlatformSupport_h |
OLD | NEW |