[cc/scheduler] Test deadline modes when main is throttled
This adds assertions to test https://chromium-review.googlesource.com/c/chromium/src/+/6309083. Bug: 379678455 Change-Id: Ic46a7eaa611afd91a4d1c7843f71e46c7c278e59 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6316746 Reviewed-by: Jonathan Ross <jonross@chromium.org> Commit-Queue: Benoit Lize <lizeb@chromium.org> Cr-Commit-Position: refs/heads/main@{#1427110}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
f5a089b7b1
commit
47b1d461ae
@@ -1170,7 +1170,13 @@ bool RunOneFrameAndReturnWhetherMainFrameIsIssued(
|
|||||||
// If we send a BeginMainFrame(), simulate the fast path, where main is fast
|
// If we send a BeginMainFrame(), simulate the fast path, where main is fast
|
||||||
// enough to catch the next deadline.
|
// enough to catch the next deadline.
|
||||||
bool send_begin_main_frame = state.ShouldSendBeginMainFrame();
|
bool send_begin_main_frame = state.ShouldSendBeginMainFrame();
|
||||||
if (state.ShouldSendBeginMainFrame()) {
|
// If no BeginMainFrame is going to be sent, don't wait for it.
|
||||||
|
auto expected_state =
|
||||||
|
send_begin_main_frame
|
||||||
|
? SchedulerStateMachine::BeginImplFrameDeadlineMode::LATE
|
||||||
|
: SchedulerStateMachine::BeginImplFrameDeadlineMode::IMMEDIATE;
|
||||||
|
EXPECT_EQ(expected_state, state.CurrentBeginImplFrameDeadlineMode());
|
||||||
|
if (send_begin_main_frame) {
|
||||||
send_begin_main_frame = true;
|
send_begin_main_frame = true;
|
||||||
EXPECT_ACTION_UPDATE_STATE(
|
EXPECT_ACTION_UPDATE_STATE(
|
||||||
SchedulerStateMachine::Action::SEND_BEGIN_MAIN_FRAME);
|
SchedulerStateMachine::Action::SEND_BEGIN_MAIN_FRAME);
|
||||||
|
Reference in New Issue
Block a user