Index: test/unittests/heap/memory-reducer-unittest.cc |
diff --git a/test/unittests/heap/memory-reducer-unittest.cc b/test/unittests/heap/memory-reducer-unittest.cc |
index 3301d13b7efbe07aff6ac940dbf00b02b70e1205..1088f0127d2beaf6d372fe26e758ad109038920b 100644 |
--- a/test/unittests/heap/memory-reducer-unittest.cc |
+++ b/test/unittests/heap/memory-reducer-unittest.cc |
@@ -48,12 +48,13 @@ MemoryReducer::Event MarkCompactEventNoGarbageLeft(double time_ms) { |
} |
-MemoryReducer::Event TimerEvent(double time_ms, bool low_allocation_rate, |
+MemoryReducer::Event TimerEvent(double time_ms, |
+ bool should_start_incremental_gc, |
bool can_start_incremental_gc) { |
MemoryReducer::Event event; |
event.type = MemoryReducer::kTimer; |
event.time_ms = time_ms; |
- event.low_allocation_rate = low_allocation_rate; |
+ event.should_start_incremental_gc = should_start_incremental_gc; |
event.can_start_incremental_gc = can_start_incremental_gc; |
return event; |
} |
@@ -82,16 +83,6 @@ MemoryReducer::Event ContextDisposedEvent(double time_ms) { |
} |
-MemoryReducer::Event BackgroundIdleNotificationEvent( |
- double time_ms, bool can_start_incremental_gc = true) { |
- MemoryReducer::Event event; |
- event.type = MemoryReducer::kBackgroundIdleNotification; |
- event.time_ms = time_ms; |
- event.can_start_incremental_gc = can_start_incremental_gc; |
- return event; |
-} |
- |
- |
TEST(MemoryReducer, FromDoneToDone) { |
MemoryReducer::State state0(DoneState()), state1(DoneState()); |
@@ -103,9 +94,6 @@ TEST(MemoryReducer, FromDoneToDone) { |
state1 = MemoryReducer::Step(state0, TimerEventPendingGC(0)); |
EXPECT_EQ(MemoryReducer::kDone, state1.action); |
- |
- state1 = MemoryReducer::Step(state0, BackgroundIdleNotificationEvent(0)); |
- EXPECT_EQ(MemoryReducer::kDone, state1.action); |
} |
@@ -172,17 +160,6 @@ TEST(MemoryReducer, FromWaitToWait) { |
EXPECT_EQ(state0.started_gcs, state1.started_gcs); |
EXPECT_EQ(2000, state1.last_gc_time_ms); |
- state1 = MemoryReducer::Step(state0, BackgroundIdleNotificationEvent(2000)); |
- EXPECT_EQ(MemoryReducer::kWait, state1.action); |
- EXPECT_EQ(2000 + MemoryReducer::kLongDelayMs, state1.next_gc_start_ms); |
- EXPECT_EQ(state0.started_gcs + 1, state1.started_gcs); |
- |
- state1 = |
- MemoryReducer::Step(state0, BackgroundIdleNotificationEvent(2000, false)); |
- EXPECT_EQ(MemoryReducer::kWait, state1.action); |
- EXPECT_EQ(state0.next_gc_start_ms, state1.next_gc_start_ms); |
- EXPECT_EQ(state0.started_gcs, state1.started_gcs); |
- |
state0.last_gc_time_ms = 0; |
state1 = MemoryReducer::Step( |
state0, |
@@ -199,12 +176,6 @@ TEST(MemoryReducer, FromWaitToWait) { |
EXPECT_EQ(2000 + MemoryReducer::kLongDelayMs, state1.next_gc_start_ms); |
EXPECT_EQ(state0.started_gcs, state1.started_gcs); |
EXPECT_EQ(state0.last_gc_time_ms, state1.last_gc_time_ms); |
- |
- state0.started_gcs = MemoryReducer::kMaxNumberOfGCs; |
- state1 = MemoryReducer::Step(state0, BackgroundIdleNotificationEvent(2000)); |
- EXPECT_EQ(MemoryReducer::kWait, state1.action); |
- EXPECT_EQ(state0.next_gc_start_ms, state1.next_gc_start_ms); |
- EXPECT_EQ(state0.started_gcs, state1.started_gcs); |
} |