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

Unified Diff: cc/layers/texture_layer_unittest.cc

Issue 2757373002: Fixing flakiness of TextureLayerChangeInvisibleMailboxTest (Closed)
Patch Set: c Created 3 years, 8 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/test/layer_tree_test.cc » ('j') | no next file with comments »
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 dc9c60d3795f3d13050e5329ae5973bcac64884f..0f3ba5c0c10656a12c6bd68c5420fd861863b302 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -1188,16 +1188,6 @@ class TextureLayerChangeInvisibleMailboxTest
void MailboxReleased(const gpu::SyncToken& sync_token, bool lost_resource) {
EXPECT_TRUE(sync_token.HasData());
++mailbox_returned_;
- switch (mailbox_returned_) {
- case 1:
- break;
- case 2:
- EXPECT_EQ(commit_count_, 5);
- EndTest();
- break;
- default:
- NOTREACHED();
- }
}
void SetupTree() override {
@@ -1227,7 +1217,7 @@ class TextureLayerChangeInvisibleMailboxTest
void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- void DidCommitAndDrawFrame() override {
+ void DidReceiveCompositorFrameAck() override {
++commit_count_;
switch (commit_count_) {
case 1:
@@ -1262,6 +1252,8 @@ class TextureLayerChangeInvisibleMailboxTest
texture_layer_->ClearClient();
break;
case 5:
+ EXPECT_EQ(2, mailbox_returned_);
+ EndTest();
break;
default:
NOTREACHED();
@@ -1284,8 +1276,7 @@ class TextureLayerChangeInvisibleMailboxTest
int commit_count_;
};
-// Flaky when multi-threaded. crbug.com/702868
-SINGLE_THREAD_TEST_F(TextureLayerChangeInvisibleMailboxTest);
+SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerChangeInvisibleMailboxTest);
// Test that TextureLayerImpl::ReleaseResources can be called which releases
// the mailbox back to TextureLayerClient.
« no previous file with comments | « no previous file | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698