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

Side by Side Diff: cc/CCSchedulerStateMachineTest.cpp

Issue 10879109: Update libcc / bindings snapshot to WebKit r126830 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/CCSchedulerStateMachine.cpp ('k') | cc/CCScrollbarGeometryFixedThumb.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "CCSchedulerStateMachine.h" 7 #include "CCSchedulerStateMachine.h"
8 8
9 #include <gtest/gtest.h> 9 #include <gtest/gtest.h>
10 #include <wtf/text/CString.h> 10 #include <wtf/text/CString.h>
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 EXPECT_FALSE(state.needsCommit()); 803 EXPECT_FALSE(state.needsCommit());
804 EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction()); 804 EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
805 805
806 // Become invisible and abort the beginFrame. 806 // Become invisible and abort the beginFrame.
807 state.setVisible(false); 807 state.setVisible(false);
808 state.beginFrameAborted(); 808 state.beginFrameAborted();
809 809
810 // We should now be back in the idle state as if we didn't start a frame at all. 810 // We should now be back in the idle state as if we didn't start a frame at all.
811 EXPECT_EQ(CCSchedulerStateMachine::COMMIT_STATE_IDLE, state.commitState()); 811 EXPECT_EQ(CCSchedulerStateMachine::COMMIT_STATE_IDLE, state.commitState());
812 EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction()); 812 EXPECT_EQ(CCSchedulerStateMachine::ACTION_NONE, state.nextAction());
813
814 // Become visible again
815 state.setVisible(true);
816
817 // We should be beginning a frame now
818 EXPECT_EQ(CCSchedulerStateMachine::COMMIT_STATE_IDLE, state.commitState());
819 EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
820
821 // Begin the frame
822 state.updateState(state.nextAction());
823
824 // We should be starting the commit now
825 EXPECT_EQ(CCSchedulerStateMachine::COMMIT_STATE_FRAME_IN_PROGRESS, state.com mitState());
813 } 826 }
814 827
815 TEST(CCSchedulerStateMachineTest, TestContextLostWhenCompletelyIdle) 828 TEST(CCSchedulerStateMachineTest, TestContextLostWhenCompletelyIdle)
816 { 829 {
817 StateMachine state; 830 StateMachine state;
818 state.setCanBeginFrame(true); 831 state.setCanBeginFrame(true);
819 state.setVisible(true); 832 state.setVisible(true);
820 833
821 state.didLoseContext(); 834 state.didLoseContext();
822 835
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 StateMachine state; 1049 StateMachine state;
1037 state.setCanBeginFrame(true); 1050 state.setCanBeginFrame(true);
1038 state.setVisible(true); 1051 state.setVisible(true);
1039 state.setNeedsCommit(true); 1052 state.setNeedsCommit(true);
1040 state.setNeedsForcedCommit(true); 1053 state.setNeedsForcedCommit(true);
1041 state.didLoseContext(); 1054 state.didLoseContext();
1042 EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction()); 1055 EXPECT_EQ(CCSchedulerStateMachine::ACTION_BEGIN_FRAME, state.nextAction());
1043 } 1056 }
1044 1057
1045 } 1058 }
OLDNEW
« no previous file with comments | « cc/CCSchedulerStateMachine.cpp ('k') | cc/CCScrollbarGeometryFixedThumb.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698