Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1518)

Unified Diff: cc/CCSchedulerTest.cpp

Issue 10909020: Enable webkit_compositor_unittests (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/CCScheduler.cpp ('k') | cc/CCTextureUpdateController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCSchedulerTest.cpp
diff --git a/cc/CCSchedulerTest.cpp b/cc/CCSchedulerTest.cpp
index 12702bd55d6b7b343dd10ec58b4120f57e971be8..ec68c7192f5c5640011965c5ebb04123992e3239 100644
--- a/cc/CCSchedulerTest.cpp
+++ b/cc/CCSchedulerTest.cpp
@@ -23,12 +23,14 @@ public:
void reset()
{
m_actions.clear();
+ m_hasMoreResourceUpdates = false;
m_canDraw = true;
m_drawWillHappen = true;
m_swapWillHappenIfDrawHappens = true;
m_numDraws = 0;
}
+ void setHasMoreResourceUpdates(bool b) { m_hasMoreResourceUpdates = b; }
void setCanDraw(bool b) { m_canDraw = b; }
int numDraws() const { return m_numDraws; }
@@ -44,6 +46,7 @@ public:
}
virtual bool canDraw() OVERRIDE { return m_canDraw; }
+ virtual bool hasMoreResourceUpdates() const OVERRIDE { return m_hasMoreResourceUpdates; }
virtual void scheduledActionBeginFrame() OVERRIDE { m_actions.push_back("scheduledActionBeginFrame"); }
virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossible() OVERRIDE
{
@@ -90,9 +93,9 @@ TEST(CCSchedulerTest, RequestCommit)
EXPECT_FALSE(timeSource->active());
client.reset();
- // Since, hasResourceUpdates is false,
+ // Since, hasMoreResourceUpdates is set to false,
// beginFrameComplete should commit
- scheduler->beginFrameComplete(false);
+ scheduler->beginFrameComplete();
EXPECT_EQ(1, client.numActions());
EXPECT_STREQ("scheduledActionCommit", client.action(0));
EXPECT_TRUE(timeSource->active());
@@ -126,9 +129,9 @@ TEST(CCSchedulerTest, RequestCommitAfterBeginFrame)
// Now setNeedsCommit again. Calling here means we need a second frame.
scheduler->setNeedsCommit();
- // Since, hasResourceUpdates is false, and another commit is
+ // Since, hasMoreResourceUpdates is set to false, and another commit is
// needed, beginFrameComplete should commit, then begin another frame.
- scheduler->beginFrameComplete(false);
+ scheduler->beginFrameComplete();
EXPECT_EQ(1, client.numActions());
EXPECT_STREQ("scheduledActionCommit", client.action(0));
client.reset();
@@ -161,7 +164,7 @@ TEST(CCSchedulerTest, TextureAcquisitionCollision)
EXPECT_FALSE(timeSource->active());
// Trigger the commit
- scheduler->beginFrameComplete(false);
+ scheduler->beginFrameComplete();
EXPECT_TRUE(timeSource->active());
client.reset();
@@ -189,7 +192,7 @@ TEST(CCSchedulerTest, VisibilitySwitchWithTextureAcquisition)
scheduler->setVisible(true);
scheduler->setNeedsCommit();
- scheduler->beginFrameComplete(false);
+ scheduler->beginFrameComplete();
scheduler->setMainThreadNeedsLayerTextures();
client.reset();
// Verify that pending texture acquisition fires when visibility
@@ -358,7 +361,7 @@ TEST(CCSchedulerTest, RequestCommitInsideDraw)
EXPECT_FALSE(timeSource->active());
EXPECT_EQ(1, client.numDraws());
EXPECT_TRUE(scheduler->commitPending());
- scheduler->beginFrameComplete(false);
+ scheduler->beginFrameComplete();
timeSource->tick();
EXPECT_EQ(2, client.numDraws());
« no previous file with comments | « cc/CCScheduler.cpp ('k') | cc/CCTextureUpdateController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698