Fix test error for IdleNotification() return code check.
authormike@belshe.com <mike@belshe.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 6 Oct 2009 00:35:46 +0000 (00:35 +0000)
committermike@belshe.com <mike@belshe.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 6 Oct 2009 00:35:46 +0000 (00:35 +0000)
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/cctest/test-api.cc

index db89e180f751683eb34a80d7390e63cd8600a5e0..2282c2d9b9563b7d8a2b1c63548d6cc0824c1e80 100644 (file)
@@ -7913,11 +7913,15 @@ THREADED_TEST(StackTrace) {
 }
 
 
-// Test that idle notification can be handled when V8 has not yet been
-// set up.
+// Test that idle notification can be handled and eventually returns true.
 THREADED_TEST(IdleNotification) {
-  for (int i = 0; i < 100; i++)
-    CHECK(v8::V8::IdleNotification());
+  bool rv = false;
+  for (int i = 0; i < 100; i++) {
+    rv = v8::V8::IdleNotification();
+    if (rv)
+      break;
+  }
+  CHECK(rv == true);
 }