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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 // Runs all currently queued immediate tasks and delayed tasks whose delay has | 165 // Runs all currently queued immediate tasks and delayed tasks whose delay has |
166 // expired plus any immediate tasks that are posted as a result of running | 166 // expired plus any immediate tasks that are posted as a result of running |
167 // those tasks. | 167 // those tasks. |
168 // | 168 // |
169 // This function ignores future delayed tasks when deciding if the system is | 169 // This function ignores future delayed tasks when deciding if the system is |
170 // idle. If you need to ensure delayed tasks run, try runForPeriodSeconds() | 170 // idle. If you need to ensure delayed tasks run, try runForPeriodSeconds() |
171 // instead. | 171 // instead. |
172 void runUntilIdle(); | 172 void runUntilIdle(); |
173 | 173 |
174 // Runs for |seconds|. Note we use a testing clock rather than the wall clock | 174 // Runs for |seconds| the testing clock is advanced by |seconds|. Note real |
175 // here. | 175 // time elapsed will typically much less than |seconds| because delays between |
| 176 // timers are fast forwarded. |
176 void runForPeriodSeconds(double seconds); | 177 void runForPeriodSeconds(double seconds); |
177 | 178 |
178 // Advances |m_clock| by |seconds|. | 179 // Advances |m_clock| by |seconds|. |
179 void advanceClockSeconds(double seconds); | 180 void advanceClockSeconds(double seconds); |
180 | 181 |
181 scheduler::RendererScheduler* rendererScheduler() const; | 182 scheduler::RendererScheduler* rendererScheduler() const; |
182 | 183 |
183 // Controls the behavior of |m_mockTaskRunner| if true, then |m_clock| will | 184 // Controls the behavior of |m_mockTaskRunner| if true, then |m_clock| will |
184 // be advanced to the next timer when there's no more immediate work to do. | 185 // be advanced to the next timer when there's no more immediate work to do. |
185 void setAutoAdvanceNowToPendingTasks(bool); | 186 void setAutoAdvanceNowToPendingTasks(bool); |
(...skipping 20 matching lines...) Expand all Loading... |
206 m_discardableMemoryAllocator; | 207 m_discardableMemoryAllocator; |
207 std::unique_ptr<DummyPlatform> m_platform; | 208 std::unique_ptr<DummyPlatform> m_platform; |
208 std::unique_ptr<cc_blink::WebCompositorSupportImpl> m_compositorSupport; | 209 std::unique_ptr<cc_blink::WebCompositorSupportImpl> m_compositorSupport; |
209 TestingPlatformSupport::Config m_testingPlatformConfig; | 210 TestingPlatformSupport::Config m_testingPlatformConfig; |
210 std::unique_ptr<TestingPlatformSupport> m_testingPlatformSupport; | 211 std::unique_ptr<TestingPlatformSupport> m_testingPlatformSupport; |
211 }; | 212 }; |
212 | 213 |
213 } // namespace blink | 214 } // namespace blink |
214 | 215 |
215 #endif // TestingPlatformSupport_h | 216 #endif // TestingPlatformSupport_h |
OLD | NEW |