Index: Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp |
=================================================================== |
--- Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp (revision 119176) |
+++ Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp (working copy) |
@@ -73,6 +73,7 @@ |
virtual void updateAnimations(double monotonicTime) { } |
virtual void layout() { } |
virtual void didRecreateContext(bool succeded) { } |
+ virtual void didCommit() { } |
virtual void didCommitAndDrawFrame() { } |
// Implementation of CCLayerAnimationDelegate |
@@ -256,6 +257,7 @@ |
virtual void didCommit() OVERRIDE |
{ |
+ m_testHooks->didCommit(); |
} |
virtual void didCommitAndDrawFrame() OVERRIDE |
@@ -841,7 +843,6 @@ |
} |
// If the layerTreeHost says it can't draw, then we should not try to draw. |
-// FIXME: Make this run in single threaded mode too. http://crbug.com/127481 |
class CCLayerTreeHostTestCanDrawBlocksDrawing : public CCLayerTreeHostTestThreadOnly { |
public: |
CCLayerTreeHostTestCanDrawBlocksDrawing() |
@@ -868,7 +869,7 @@ |
} |
} |
- virtual void didCommitAndDrawFrame() |
+ virtual void didCommit() |
{ |
m_numCommits++; |
if (m_numCommits == 1) { |
@@ -878,10 +879,10 @@ |
OwnArrayPtr<char> pixels(adoptArrayPtr(new char[4])); |
m_layerTreeHost->compositeAndReadback(static_cast<void*>(pixels.get()), IntRect(0, 0, 1, 1)); |
} else if (m_numCommits == 2) { |
+ m_layerTreeHost->setNeedsRedraw(); |
m_layerTreeHost->setNeedsCommit(); |
- m_layerTreeHost->finishAllRendering(); |
+ } else |
endTest(); |
- } |
} |
virtual void afterTest() |
@@ -892,10 +893,7 @@ |
int m_numCommits; |
}; |
-TEST_F(CCLayerTreeHostTestCanDrawBlocksDrawing, runMultiThread) |
-{ |
- runTestThreaded(); |
-} |
+SINGLE_AND_MULTI_THREAD_TEST_F(CCLayerTreeHostTestCanDrawBlocksDrawing) |
// beginLayerWrite should prevent draws from executing until a commit occurs |
class CCLayerTreeHostTestWriteLayersRedraw : public CCLayerTreeHostTestThreadOnly { |