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

Unified Diff: cc/layers/texture_layer_unittest.cc

Issue 307653005: Update source frame number even when commits abort (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 6 years, 7 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 | « no previous file | cc/trees/layer_tree_host.cc » ('j') | cc/trees/layer_tree_host.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/texture_layer_unittest.cc
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index be420a5dd2d9a4e2cb0256de713f60069a34c442..c4019c199a5af4002dba827c722a9dce9c046d70 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -1107,6 +1107,7 @@ class TextureLayerNoExtraCommitForMailboxTest
scoped_ptr<SingleReleaseCallback>* release_callback,
bool use_shared_memory) OVERRIDE {
if (layer_tree_host()->source_frame_number() == 1) {
+ // Once this has been committed, the mailbox will be released.
*texture_mailbox = TextureMailbox();
return true;
}
@@ -1119,7 +1120,9 @@ class TextureLayerNoExtraCommitForMailboxTest
}
void MailboxReleased(uint32 sync_point, bool lost_resource) {
- EXPECT_EQ(2, layer_tree_host()->source_frame_number());
+ // Source frame number during callback is the same as the source frame
+ // on which it was released.
+ EXPECT_EQ(1, layer_tree_host()->source_frame_number());
EndTest();
}
« no previous file with comments | « no previous file | cc/trees/layer_tree_host.cc » ('j') | cc/trees/layer_tree_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698