Commit 80d42bd7 authored by danakj@chromium.org's avatar danakj@chromium.org

cc: Prevent warnings from mocks in TextureLayer tests.

We were missing some expected calls which caused noise in the
test output about unexpected function calls happening.

R=piman
BUG=263389

Review URL: https://chromiumcodereview.appspot.com/23621015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220621 0039d316-1c4b-4281-b951-d872f2087c98
parent b9f8df0a
...@@ -194,7 +194,7 @@ TEST_F(TextureLayerTest, SyncImplWhenRemovingFromTree) { ...@@ -194,7 +194,7 @@ TEST_F(TextureLayerTest, SyncImplWhenRemovingFromTree) {
TEST_F(TextureLayerTest, CheckPropertyChangeCausesCorrectBehavior) { TEST_F(TextureLayerTest, CheckPropertyChangeCausesCorrectBehavior) {
scoped_refptr<TextureLayer> test_layer = TextureLayer::Create(NULL); scoped_refptr<TextureLayer> test_layer = TextureLayer::Create(NULL);
layer_tree_host_->SetRootLayer(test_layer); EXPECT_SET_NEEDS_COMMIT(1, layer_tree_host_->SetRootLayer(test_layer));
// Test properties that should call SetNeedsCommit. All properties need to // Test properties that should call SetNeedsCommit. All properties need to
// be set to new values in order for SetNeedsCommit to be called. // be set to new values in order for SetNeedsCommit to be called.
...@@ -420,6 +420,8 @@ TEST_F(TextureLayerWithMailboxTest, ReplaceMailboxOnMainThreadBeforeCommit) { ...@@ -420,6 +420,8 @@ TEST_F(TextureLayerWithMailboxTest, ReplaceMailboxOnMainThreadBeforeCommit) {
Mock::VerifyAndClearExpectations(layer_tree_host_.get()); Mock::VerifyAndClearExpectations(layer_tree_host_.get());
Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
EXPECT_CALL(*layer_tree_host_, AcquireLayerTextures()).Times(0);
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AtLeast(1));
test_layer->SetTextureMailbox(test_data_.mailbox3_); test_layer->SetTextureMailbox(test_data_.mailbox3_);
Mock::VerifyAndClearExpectations(layer_tree_host_.get()); Mock::VerifyAndClearExpectations(layer_tree_host_.get());
Mock::VerifyAndClearExpectations(&test_data_.mock_callback_); Mock::VerifyAndClearExpectations(&test_data_.mock_callback_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment