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

Unified Diff: cc/scheduler/scheduler_unittest.cc

Issue 1976823002: cc: Remove throttling of main frames for preventing NPAPI deadlock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « cc/scheduler/scheduler_state_machine.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_unittest.cc
diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc
index cb5917ee9632334b515b47e693e7f3833aa03c28..751c9649e497a230e95fa71102d3197b02f0b5ae 100644
--- a/cc/scheduler/scheduler_unittest.cc
+++ b/cc/scheduler/scheduler_unittest.cc
@@ -1979,84 +1979,6 @@ TEST_F(
EXPECT_ACTION("WillBeginImplFrame", client_, 0, 1);
}
-TEST_F(SchedulerTest,
- Deadlock_NoBeginMainFrameWhileSwapTrottledAndPipelineFull) {
- // NPAPI plugins on Windows block the Browser UI thread on the Renderer main
- // thread. This prevents the scheduler from receiving any pending swap acks.
-
- // This particular test makes sure we do not send a BeginMainFrame while
- // swap trottled and we have a pending tree and active tree that
- // still needs to be drawn for the first time.
-
- scheduler_settings_.use_external_begin_frame_source = true;
- scheduler_settings_.main_frame_while_swap_throttled_enabled = true;
- scheduler_settings_.main_frame_before_activation_enabled = true;
- SetUpScheduler(true);
-
- // Disables automatic swap acks so this test can force swap ack throttling
- // to simulate a blocked Browser ui thread.
- client_->SetAutomaticSwapAck(false);
-
- // Start a new commit in main-thread high latency mode and hold off on
- // activation.
- client_->Reset();
- EXPECT_FALSE(scheduler_->CommitPending());
- scheduler_->SetNeedsBeginMainFrame();
- scheduler_->SetNeedsRedraw();
- EXPECT_SCOPED(AdvanceFrame());
- EXPECT_TRUE(scheduler_->CommitPending());
- EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending());
- task_runner().RunTasksWhile(client_->ImplFrameDeadlinePending(true));
- EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending());
- scheduler_->DidSwapBuffersComplete();
- scheduler_->NotifyBeginMainFrameStarted(base::TimeTicks());
- scheduler_->NotifyReadyToCommit();
- EXPECT_FALSE(scheduler_->CommitPending());
- EXPECT_ACTION("AddObserver(this)", client_, 0, 5);
- EXPECT_ACTION("WillBeginImplFrame", client_, 1, 5);
- EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client_, 2, 5);
- EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 3, 5);
- EXPECT_ACTION("ScheduledActionCommit", client_, 4, 5);
-
- // Start another commit while we still have aa pending tree.
- // Enter a swap throttled state.
- client_->Reset();
- EXPECT_FALSE(scheduler_->CommitPending());
- scheduler_->SetNeedsBeginMainFrame();
- scheduler_->SetNeedsRedraw();
- EXPECT_SCOPED(AdvanceFrame());
- EXPECT_TRUE(scheduler_->CommitPending());
- EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending());
- task_runner().RunTasksWhile(client_->ImplFrameDeadlinePending(true));
- EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending());
- scheduler_->NotifyBeginMainFrameStarted(base::TimeTicks());
- EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3);
- EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client_, 1, 3);
- EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 2, 3);
-
- // Can't commit yet because there's still a pending tree.
- client_->Reset();
- scheduler_->NotifyReadyToCommit();
- EXPECT_NO_ACTION(client_);
-
- // Activate the pending tree, which also unblocks the commit immediately.
- client_->Reset();
- scheduler_->NotifyReadyToActivate();
- EXPECT_ACTION("ScheduledActionActivateSyncTree", client_, 0, 2);
- EXPECT_ACTION("ScheduledActionCommit", client_, 1, 2);
-
- // Make sure we do not send a BeginMainFrame while swap throttled and
- // we have both a pending tree and an active tree that still needs
- // it's first draw.
- client_->Reset();
- EXPECT_FALSE(scheduler_->CommitPending());
- scheduler_->SetNeedsBeginMainFrame();
- EXPECT_SCOPED(AdvanceFrame());
- EXPECT_FALSE(scheduler_->CommitPending());
- task_runner().RunPendingTasks(); // Run posted deadline.
- EXPECT_ACTION("WillBeginImplFrame", client_, 0, 1);
-}
-
TEST_F(
SchedulerTest,
CommitMakesProgressWhenIdleAndHasPendingTreeAndActiveTreeNeedsFirstDraw) {
« no previous file with comments | « cc/scheduler/scheduler_state_machine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698