public:
explicit MockLayerTreeHost(FakeLayerTreeHostClient* client)
: LayerTreeHost(client, NULL, LayerTreeSettings()) {
- InitializeSingleThreaded(client);
+ InitializeSingleThreaded(client, base::MessageLoopProxy::current());
}
MOCK_METHOD0(SetNeedsCommit, void());
virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
switch (host_impl->active_tree()->source_frame_number()) {
- case 2: {
+ case 0: {
+ // The activate for the 1st mailbox should have happened before now.
+ EXPECT_EQ(1, activate_count_);
+ break;
+ }
+ case 1: {
// The activate for the 2nd mailbox should have happened before now.
EXPECT_EQ(2, activate_count_);
break;
}
- case 3: {
+ case 2: {
// The activate to remove the layer should have happened before now.
EXPECT_EQ(3, activate_count_);
break;
}
+ case 3: {
+ NOTREACHED();
+ break;
+ }
}
}
virtual void DidCommitAndDrawFrame() OVERRIDE {
switch (layer_tree_host()->source_frame_number()) {
case 1:
- EXPECT_FALSE(proxy()->CommitPendingForTesting());
+ EXPECT_FALSE(proxy()->MainFrameWillHappenForTesting());
// Invalidate the texture layer to clear the mailbox before
// ending the test.
texture_layer_->SetNeedsDisplay();