| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "CCThreadedTest.h" | 7 #include "CCThreadedTest.h" |
| 8 | 8 |
| 9 #include "CCActiveAnimation.h" | 9 #include "CCActiveAnimation.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 virtual void setNeedsCommit() OVERRIDE | 175 virtual void setNeedsCommit() OVERRIDE |
| 176 { | 176 { |
| 177 if (!m_testStarted) | 177 if (!m_testStarted) |
| 178 return; | 178 return; |
| 179 LayerTreeHost::setNeedsCommit(); | 179 LayerTreeHost::setNeedsCommit(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void setTestStarted(bool started) { m_testStarted = started; } | 182 void setTestStarted(bool started) { m_testStarted = started; } |
| 183 | 183 |
| 184 virtual void didDeferCommit() OVERRIDE |
| 185 { |
| 186 m_testHooks->didDeferCommit(); |
| 187 } |
| 188 |
| 184 private: | 189 private: |
| 185 MockLayerTreeHost(TestHooks* testHooks, cc::LayerTreeHostClient* client, con
st cc::LayerTreeSettings& settings) | 190 MockLayerTreeHost(TestHooks* testHooks, cc::LayerTreeHostClient* client, con
st cc::LayerTreeSettings& settings) |
| 186 : LayerTreeHost(client, settings) | 191 : LayerTreeHost(client, settings) |
| 187 , m_testHooks(testHooks) | 192 , m_testHooks(testHooks) |
| 188 , m_testStarted(false) | 193 , m_testStarted(false) |
| 189 { | 194 { |
| 190 } | 195 } |
| 191 | 196 |
| 192 TestHooks* m_testHooks; | 197 TestHooks* m_testHooks; |
| 193 bool m_testStarted; | 198 bool m_testStarted; |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 if (m_timedOut) { | 580 if (m_timedOut) { |
| 576 FAIL() << "Test timed out"; | 581 FAIL() << "Test timed out"; |
| 577 Platform::current()->compositorSupport()->shutdown(); | 582 Platform::current()->compositorSupport()->shutdown(); |
| 578 return; | 583 return; |
| 579 } | 584 } |
| 580 afterTest(); | 585 afterTest(); |
| 581 Platform::current()->compositorSupport()->shutdown(); | 586 Platform::current()->compositorSupport()->shutdown(); |
| 582 } | 587 } |
| 583 | 588 |
| 584 } // namespace WebKitTests | 589 } // namespace WebKitTests |
| OLD | NEW |