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

Unified Diff: cc/trees/layer_tree_host_unittest_delegated.cc

Issue 16871016: cc: Use BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@bfargs2
Patch Set: Add an --enable-deadline-scheduler commandline flag. Created 7 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
Index: cc/trees/layer_tree_host_unittest_delegated.cc
diff --git a/cc/trees/layer_tree_host_unittest_delegated.cc b/cc/trees/layer_tree_host_unittest_delegated.cc
index 721613a767460f18cf2d8beab6e05308aaed5694..6bd7af9caf659c26a1df6b8e76b957d8c8254fb2 100644
--- a/cc/trees/layer_tree_host_unittest_delegated.cc
+++ b/cc/trees/layer_tree_host_unittest_delegated.cc
@@ -293,20 +293,15 @@ class LayerTreeHostDelegatedTestCreateChildId
host_impl->output_surface()->context_provider();
++num_activates_;
- switch (num_activates_) {
- case 2:
- EXPECT_TRUE(delegated_impl->ChildId());
- EXPECT_FALSE(did_reset_child_id_);
-
- context_provider->Context3d()->loseContextCHROMIUM(
- GL_GUILTY_CONTEXT_RESET_ARB,
- GL_INNOCENT_CONTEXT_RESET_ARB);
- break;
- case 3:
- EXPECT_TRUE(delegated_impl->ChildId());
- EXPECT_TRUE(did_reset_child_id_);
- EndTest();
- break;
+ if (num_activates_ == 2) {
+ EXPECT_TRUE(delegated_impl->ChildId());
+ EXPECT_FALSE(did_reset_child_id_);
+ context_provider->Context3d()->loseContextCHROMIUM(
+ GL_GUILTY_CONTEXT_RESET_ARB,
+ GL_INNOCENT_CONTEXT_RESET_ARB);
+ } else if (did_reset_child_id_) {
+ EXPECT_TRUE(delegated_impl->ChildId());
+ EndTest();
}
}
@@ -321,7 +316,7 @@ class LayerTreeHostDelegatedTestCreateChildId
FakeDelegatedRendererLayerImpl* delegated_impl =
static_cast<FakeDelegatedRendererLayerImpl*>(root_impl->children()[0]);
- EXPECT_EQ(2, num_activates_);
+ EXPECT_LE(2, num_activates_);
EXPECT_FALSE(delegated_impl->ChildId());
did_reset_child_id_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698