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

Unified Diff: cc/scheduler/scheduler_state_machine_unittest.cc

Issue 1971063004: cc: Fix cc_unittests when main frame before activation is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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_unittest_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_state_machine_unittest.cc
diff --git a/cc/scheduler/scheduler_state_machine_unittest.cc b/cc/scheduler/scheduler_state_machine_unittest.cc
index 54b90cd45a4230f54e83973e52a122ecca6cbeae..8f86c3d213e137729ebe6663b3487293e9466171 100644
--- a/cc/scheduler/scheduler_state_machine_unittest.cc
+++ b/cc/scheduler/scheduler_state_machine_unittest.cc
@@ -609,19 +609,8 @@ TEST(SchedulerStateMachineTest, TestFailedDrawsDoNotRestartForcedDraw) {
EXPECT_TRUE(state.ForcedRedrawState() ==
SchedulerStateMachine::FORCED_REDRAW_STATE_WAITING_FOR_COMMIT);
- state.NotifyBeginMainFrameStarted();
- state.NotifyReadyToCommit();
- EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_COMMIT);
- EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
- EXPECT_TRUE(state.RedrawPending());
- EXPECT_FALSE(state.CommitPending());
-
- // Now force redraw should be in waiting for activation
- EXPECT_TRUE(state.ForcedRedrawState() ==
- SchedulerStateMachine::FORCED_REDRAW_STATE_WAITING_FOR_ACTIVATION);
-
// After failing additional draws, we should still be in a forced
- // redraw, but not back in WAITING_FOR_COMMIT.
+ // redraw, but not back in IDLE.
for (int i = 0; i < draw_limit; ++i) {
state.SetNeedsRedraw(true);
state.OnBeginImplFrame();
@@ -636,7 +625,7 @@ TEST(SchedulerStateMachineTest, TestFailedDrawsDoNotRestartForcedDraw) {
}
EXPECT_TRUE(state.RedrawPending());
EXPECT_TRUE(state.ForcedRedrawState() ==
- SchedulerStateMachine::FORCED_REDRAW_STATE_WAITING_FOR_ACTIVATION);
+ SchedulerStateMachine::FORCED_REDRAW_STATE_WAITING_FOR_COMMIT);
}
TEST(SchedulerStateMachineTest, TestFailedDrawIsRetriedInNextBeginImplFrame) {
@@ -1021,6 +1010,7 @@ TEST(SchedulerStateMachineTest, CommitWithoutDrawWithPendingTree) {
TEST(SchedulerStateMachineTest, DontCommitWithoutDrawWithoutPendingTree) {
SchedulerSettings scheduler_settings;
scheduler_settings.commit_to_active_tree = true;
+ scheduler_settings.main_frame_before_activation_enabled = false;
StateMachine state(scheduler_settings);
SET_UP_STATE(state)
@@ -1102,6 +1092,7 @@ TEST(SchedulerStateMachineTest, AbortedMainFrameDoesNotResetPendingTree) {
TEST(SchedulerStateMachineTest, TestFullCycleWithCommitToActive) {
SchedulerSettings scheduler_settings;
scheduler_settings.commit_to_active_tree = true;
+ scheduler_settings.main_frame_before_activation_enabled = false;
StateMachine state(scheduler_settings);
SET_UP_STATE(state)
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698