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

Unified Diff: test/unittests/heap/memory-reducer-unittest.cc

Issue 1705183003: Activate memory reducer for small heaps in background tabs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: typo Created 4 years, 10 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 | « src/heap/memory-reducer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1088f0127d2beaf6d372fe26e758ad109038920b..4787bc66d2b22103c6b1d2e4f46d6f7213f37d75 100644
--- a/test/unittests/heap/memory-reducer-unittest.cc
+++ b/test/unittests/heap/memory-reducer-unittest.cc
@@ -74,10 +74,9 @@ MemoryReducer::Event TimerEventPendingGC(double time_ms) {
return TimerEvent(time_ms, true, false);
}
-
-MemoryReducer::Event ContextDisposedEvent(double time_ms) {
+MemoryReducer::Event PossibleGarbageEvent(double time_ms) {
MemoryReducer::Event event;
- event.type = MemoryReducer::kContextDisposed;
+ event.type = MemoryReducer::kPossibleGarbage;
event.time_ms = time_ms;
return event;
}
@@ -114,7 +113,7 @@ TEST(MemoryReducer, FromDoneToWait) {
EXPECT_EQ(0, state1.started_gcs);
EXPECT_EQ(2, state1.last_gc_time_ms);
- state1 = MemoryReducer::Step(state0, ContextDisposedEvent(0));
+ state1 = MemoryReducer::Step(state0, PossibleGarbageEvent(0));
EXPECT_EQ(MemoryReducer::kWait, state1.action);
EXPECT_EQ(MemoryReducer::kLongDelayMs, state1.next_gc_start_ms);
EXPECT_EQ(0, state1.started_gcs);
@@ -127,7 +126,7 @@ TEST(MemoryReducer, FromWaitToWait) {
MemoryReducer::State state0(WaitState(2, 1000.0)), state1(DoneState());
- state1 = MemoryReducer::Step(state0, ContextDisposedEvent(2000));
+ state1 = MemoryReducer::Step(state0, PossibleGarbageEvent(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);
@@ -250,7 +249,7 @@ TEST(MemoryReducer, FromRunToRun) {
EXPECT_EQ(state0.started_gcs, state1.started_gcs);
EXPECT_EQ(state0.last_gc_time_ms, state1.last_gc_time_ms);
- state1 = MemoryReducer::Step(state0, ContextDisposedEvent(2000));
+ state1 = MemoryReducer::Step(state0, PossibleGarbageEvent(2000));
EXPECT_EQ(MemoryReducer::kRun, state1.action);
EXPECT_EQ(state0.next_gc_start_ms, state1.next_gc_start_ms);
EXPECT_EQ(state0.started_gcs, state1.started_gcs);
« no previous file with comments | « src/heap/memory-reducer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698