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

Unified Diff: components/scheduler/child/prioritizing_task_queue_selector_unittest.cc

Issue 1101703003: Adds a SHUTDOWN_TASK_QUEUE and a PreShutdown api to the scheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 5 years, 8 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
Index: components/scheduler/child/prioritizing_task_queue_selector_unittest.cc
diff --git a/components/scheduler/child/prioritizing_task_queue_selector_unittest.cc b/components/scheduler/child/prioritizing_task_queue_selector_unittest.cc
index 81a2a945e6fbbd8b1f474bcebfdad97c29e525bf..3ff62239a6edea4b172eb31f3b9081a69ac1be14 100644
--- a/components/scheduler/child/prioritizing_task_queue_selector_unittest.cc
+++ b/components/scheduler/child/prioritizing_task_queue_selector_unittest.cc
@@ -245,4 +245,25 @@ TEST_F(PrioritizingTaskQueueSelectorTest, TestBestEffortGetsStarved) {
}
}
+TEST_F(PrioritizingTaskQueueSelectorTest, PreShutdownBlocksDisable) {
+ selector_.SetQueuePriority(0, PrioritizingTaskQueueSelector::NORMAL_PRIORITY);
+ selector_.PreShutdown();
+ selector_.DisableQueue(0);
+ EXPECT_TRUE(selector_.IsQueueEnabled(0));
+}
+
+TEST_F(PrioritizingTaskQueueSelectorTest, PreShutdownBlocksSetQueuePriority) {
+ selector_.DisableQueue(0);
+ selector_.PreShutdown();
+ selector_.SetQueuePriority(0, PrioritizingTaskQueueSelector::NORMAL_PRIORITY);
+ EXPECT_FALSE(selector_.IsQueueEnabled(0));
+}
+
+TEST_F(PrioritizingTaskQueueSelectorTest, PreShutdownBlocksEnable) {
+ selector_.DisableQueue(0);
+ selector_.PreShutdown();
+ selector_.EnableQueue(0, PrioritizingTaskQueueSelector::NORMAL_PRIORITY);
+ EXPECT_FALSE(selector_.IsQueueEnabled(0));
+}
+
} // namespace scheduler
« no previous file with comments | « components/scheduler/child/prioritizing_task_queue_selector.cc ('k') | components/scheduler/child/scheduler_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698