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

Unified Diff: cc/scheduler_state_machine_unittest.cc

Issue 11439026: Revert 171403 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 | « cc/scheduler_state_machine.cc ('k') | cc/scoped_resource_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler_state_machine_unittest.cc
===================================================================
--- cc/scheduler_state_machine_unittest.cc (revision 171405)
+++ cc/scheduler_state_machine_unittest.cc (working copy)
@@ -637,16 +637,16 @@
state.setVisible(true);
state.setCanDraw(true);
- state.didLoseOutputSurface();
+ state.didLoseContext();
- EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_OUTPUT_SURFACE_RECREATION, state.nextAction());
+ EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_CONTEXT_RECREATION, state.nextAction());
state.updateState(state.nextAction());
// Once context recreation begins, nothing should happen.
EXPECT_EQ(SchedulerStateMachine::ACTION_NONE, state.nextAction());
// Recreate the context
- state.didRecreateOutputSurface();
+ state.didRecreateContext();
// When the context is recreated, we should begin a commit
EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
@@ -660,9 +660,9 @@
state.setVisible(true);
state.setCanDraw(true);
- state.didLoseOutputSurface();
+ state.didLoseContext();
- EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_OUTPUT_SURFACE_RECREATION, state.nextAction());
+ EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_CONTEXT_RECREATION, state.nextAction());
state.updateState(state.nextAction());
// Once context recreation begins, nothing should happen.
@@ -673,7 +673,7 @@
EXPECT_EQ(SchedulerStateMachine::ACTION_NONE, state.nextAction());
// Recreate the context
- state.didRecreateOutputSurface();
+ state.didRecreateContext();
// When the context is recreated, we should begin a commit
EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
@@ -710,7 +710,7 @@
state.didLeaveVSync();
// Cause a lost context while the begin frame is in flight.
- state.didLoseOutputSurface();
+ state.didLoseContext();
// Ask for another draw. Expect nothing happens.
state.setNeedsRedraw(true);
@@ -728,9 +728,9 @@
// Expect to be told to begin context recreation, independent of vsync state
state.didEnterVSync();
- EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_OUTPUT_SURFACE_RECREATION, state.nextAction());
+ EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_CONTEXT_RECREATION, state.nextAction());
state.didLeaveVSync();
- EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_OUTPUT_SURFACE_RECREATION, state.nextAction());
+ EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_CONTEXT_RECREATION, state.nextAction());
}
TEST(SchedulerStateMachineTest, TestContextLostWhileCommitInProgressAndAnotherCommitRequested)
@@ -753,7 +753,7 @@
state.didLeaveVSync();
// Cause a lost context while the begin frame is in flight.
- state.didLoseOutputSurface();
+ state.didLoseContext();
// Ask for another draw and also set needs commit. Expect nothing happens.
state.setNeedsRedraw(true);
@@ -772,9 +772,9 @@
// Expect to be told to begin context recreation, independent of vsync state
state.didEnterVSync();
- EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_OUTPUT_SURFACE_RECREATION, state.nextAction());
+ EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_CONTEXT_RECREATION, state.nextAction());
state.didLeaveVSync();
- EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_OUTPUT_SURFACE_RECREATION, state.nextAction());
+ EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_CONTEXT_RECREATION, state.nextAction());
}
@@ -785,7 +785,7 @@
state.setCanDraw(true);
// Cause a lost context lost.
- state.didLoseOutputSurface();
+ state.didLoseContext();
// Ask a forced redraw and verify it ocurrs.
state.setNeedsForcedRedraw(true);
@@ -797,7 +797,7 @@
state.setNeedsForcedRedraw(false);
// Expect to be told to begin context recreation, independent of vsync state
- EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_OUTPUT_SURFACE_RECREATION, state.nextAction());
+ EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_CONTEXT_RECREATION, state.nextAction());
state.updateState(state.nextAction());
// Ask a forced redraw and verify it ocurrs.
@@ -853,7 +853,7 @@
state.setCanDraw(true);
state.setNeedsCommit();
state.setNeedsForcedCommit();
- state.didLoseOutputSurface();
+ state.didLoseContext();
EXPECT_EQ(SchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
}
« no previous file with comments | « cc/scheduler_state_machine.cc ('k') | cc/scoped_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698