Index: test/unittests/heap/gc-idle-time-handler-unittest.cc |
diff --git a/test/unittests/heap/gc-idle-time-handler-unittest.cc b/test/unittests/heap/gc-idle-time-handler-unittest.cc |
index 6bf04cdc400bf8e98e9aa0f9edc93d25d20d0f40..55dd6c6f58253daf207799de9dfe66561c5ef603 100644 |
--- a/test/unittests/heap/gc-idle-time-handler-unittest.cc |
+++ b/test/unittests/heap/gc-idle-time-handler-unittest.cc |
@@ -191,6 +191,17 @@ TEST_F(GCIdleTimeHandlerTest, AfterContextDisposeLargeIdleTime) { |
} |
+TEST_F(GCIdleTimeHandlerTest, AfterContextDisposeZeroIdleTime) { |
+ GCIdleTimeHandler::HeapState heap_state = DefaultHeapState(); |
+ heap_state.contexts_disposed = 1; |
+ heap_state.incremental_marking_stopped = true; |
+ heap_state.size_of_objects = GCIdleTimeHandler::kSmallHeapSize / 2; |
+ int idle_time_ms = 0; |
+ GCIdleTimeAction action = handler()->Compute(idle_time_ms, heap_state); |
+ EXPECT_EQ(DO_FULL_GC, action.type); |
+} |
+ |
+ |
TEST_F(GCIdleTimeHandlerTest, AfterContextDisposeSmallIdleTime1) { |
GCIdleTimeHandler::HeapState heap_state = DefaultHeapState(); |
heap_state.contexts_disposed = 1; |