Index: test/unittests/libplatform/default-platform-unittest.cc |
diff --git a/test/unittests/libplatform/default-platform-unittest.cc b/test/unittests/libplatform/default-platform-unittest.cc |
index ffa3199444eb4457017921bf9e622bf0a1c8ce70..814b27bc518e5a147e0291e605ccae416539c4c5 100644 |
--- a/test/unittests/libplatform/default-platform-unittest.cc |
+++ b/test/unittests/libplatform/default-platform-unittest.cc |
@@ -111,5 +111,21 @@ TEST(DefaultPlatformTest, PumpMessageLoopNoStarvation) { |
EXPECT_TRUE(platform.PumpMessageLoop(isolate)); |
} |
+ |
+TEST(DefaultPlatformTest, PendingDelayedTasksAreDestroyedOnShutdown) { |
+ InSequence s; |
+ |
+ int dummy; |
+ Isolate* isolate = reinterpret_cast<Isolate*>(&dummy); |
+ |
+ { |
+ DefaultPlatformWithMockTime platform; |
+ StrictMock<MockTask>* task = new StrictMock<MockTask>; |
+ platform.CallDelayedOnForegroundThread(isolate, task, 10); |
+ EXPECT_CALL(*task, Die()); |
+ } |
+} |
+ |
+ |
} // namespace platform |
} // namespace v8 |