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

Unified Diff: test/cctest/heap/test-incremental-marking.cc

Issue 2313273002: [heap] Test fixes (Closed)
Patch Set: Created 4 years, 3 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 | « test/cctest/heap/test-heap.cc ('k') | test/cctest/heap/test-mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/heap/test-incremental-marking.cc
diff --git a/test/cctest/heap/test-incremental-marking.cc b/test/cctest/heap/test-incremental-marking.cc
index 59697a94a1fed1b2c695918ab45aaf3af1ec8c34..643f7859b2e85901a00296ed4d94b28e06dc17f6 100644
--- a/test/cctest/heap/test-incremental-marking.cc
+++ b/test/cctest/heap/test-incremental-marking.cc
@@ -140,18 +140,25 @@ TEST(IncrementalMarkingUsingIdleTasks) {
TEST(IncrementalMarkingUsingIdleTasksAfterGC) {
if (!i::FLAG_incremental_marking) return;
+
+ const double kLongIdleTimeInSeconds = 1;
+ const double kShortIdleTimeInSeconds = 0.010;
+
CcTest::InitializeVM();
v8::Platform* old_platform = i::V8::GetCurrentPlatform();
MockPlatform platform(old_platform);
i::V8::SetPlatformForTesting(&platform);
i::heap::SimulateFullSpace(CcTest::heap()->old_space());
CcTest::heap()->CollectAllGarbage();
+ // Perform any pending idle tasks.
+ while (platform.PendingIdleTask()) {
+ platform.PerformIdleTask(kLongIdleTimeInSeconds);
+ }
+ CHECK(!platform.PendingIdleTask());
i::IncrementalMarking* marking = CcTest::heap()->incremental_marking();
marking->Stop();
marking->Start();
CHECK(platform.PendingIdleTask());
- const double kLongIdleTimeInSeconds = 1;
- const double kShortIdleTimeInSeconds = 0.010;
const int kShortStepCount = 10;
for (int i = 0; i < kShortStepCount && platform.PendingIdleTask(); i++) {
platform.PerformIdleTask(kShortIdleTimeInSeconds);
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | test/cctest/heap/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698