Commit 0fd73505 authored by ulan@chromium.org's avatar ulan@chromium.org

Relax test condition to make it less brittle.

BUG=
TEST=cctest/test-api/IdleNotificationWithHint

Review URL: http://codereview.chromium.org/8839007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 410219c8
......@@ -13438,6 +13438,8 @@ TEST(SourceURLInStackTrace) {
// Test that idle notification can be handled and eventually returns true.
// This just checks the contract of the IdleNotification() function,
// and does not verify that it does reasonable work.
THREADED_TEST(IdleNotification) {
v8::HandleScope scope;
LocalContext env;
......@@ -13463,6 +13465,8 @@ THREADED_TEST(IdleNotification) {
}
// Test that idle notification can be handled and eventually returns true.
// This just checks the contract of the IdleNotification() function,
// and does not verify that it does reasonable work.
THREADED_TEST(IdleNotificationWithHint) {
v8::HandleScope scope;
LocalContext env;
......@@ -13488,7 +13492,7 @@ THREADED_TEST(IdleNotificationWithHint) {
}
CHECK(rv == true);
intptr_t new_size = HEAP->SizeOfObjects();
CHECK(no_idle_work || new_size < 3 * old_size / 4);
CHECK(no_idle_work || new_size < old_size);
}
......
......@@ -1290,7 +1290,8 @@ TEST(CollectingAllAvailableGarbageShrinksNewSpace) {
CHECK(old_capacity == new_capacity);
}
// This just checks the contract of the IdleNotification() function,
// and does not verify that it does reasonable work.
TEST(IdleNotificationAdvancesIncrementalMarking) {
if (!FLAG_incremental_marking || !FLAG_incremental_marking_steps) return;
InitializeVM();
......@@ -1315,5 +1316,5 @@ TEST(IdleNotificationAdvancesIncrementalMarking) {
bool no_idle_work = v8::V8::IdleNotification(900);
while (!v8::V8::IdleNotification(900)) ;
intptr_t new_size = HEAP->SizeOfObjects();
CHECK(no_idle_work || new_size < 3 * old_size / 4);
CHECK(no_idle_work || new_size < old_size);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment