Chromium Code Reviews| Index: Source/platform/graphics/gpu/DrawingBufferTest.cpp |
| diff --git a/Source/platform/graphics/gpu/DrawingBufferTest.cpp b/Source/platform/graphics/gpu/DrawingBufferTest.cpp |
| index 767fcfdbff1c091bbb348c01d841da384e902627..c9195fac582fc5b234c889d540b0916711a54394 100644 |
| --- a/Source/platform/graphics/gpu/DrawingBufferTest.cpp |
| +++ b/Source/platform/graphics/gpu/DrawingBufferTest.cpp |
| @@ -620,4 +620,22 @@ TEST(DrawingBufferDepthStencilTest, packedDepthStencilSupported) |
| } |
| } |
| +TEST_F(DrawingBufferTest, verifySetIsHiddenProperlyAffectsMailboxes) |
| +{ |
| + blink::WebExternalTextureMailbox mailbox; |
| + |
| + // Produce mailboxes. |
| + m_drawingBuffer->markContentsChanged(); |
| + EXPECT_TRUE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); |
| + |
| + unsigned waitSyncPoint = webContext()->insertSyncPoint(); |
| + mailbox.syncPoint = waitSyncPoint; |
| + m_drawingBuffer->setIsHidden(true); |
| + m_drawingBuffer->mailboxReleased(mailbox); |
| + // m_drawingBuffer deletes mailbox immediately when hidden. |
| + EXPECT_EQ(waitSyncPoint, webContext()->mostRecentlyWaitedSyncPoint()); |
| + |
|
dshwang
2014/07/09 17:40:54
Remove EXPECT_FALSE(m_drawingBuffer->prepareMailbo
|
| + m_drawingBuffer->beginDestruction(); |
| +} |
| + |
| } // namespace |