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

Side by Side Diff: test/cctest/test-api.cc

Issue 580413002: Remove Regress2107 test, which is fundamentally flaky (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 17801 matching lines...) Expand 10 before | Expand all | Expand 10 after
17812 bool finished = false; 17812 bool finished = false;
17813 for (int i = 0; i < 200 && !finished; i++) { 17813 for (int i = 0; i < 200 && !finished; i++) {
17814 finished = env->GetIsolate()->IdleNotification(IdlePauseInMs); 17814 finished = env->GetIsolate()->IdleNotification(IdlePauseInMs);
17815 } 17815 }
17816 intptr_t final_size = CcTest::heap()->SizeOfObjects(); 17816 intptr_t final_size = CcTest::heap()->SizeOfObjects();
17817 CHECK(finished); 17817 CHECK(finished);
17818 CHECK_LT(final_size, initial_size + 1); 17818 CHECK_LT(final_size, initial_size + 1);
17819 } 17819 }
17820 17820
17821 17821
17822 TEST(Regress2107) {
17823 const intptr_t MB = 1024 * 1024;
17824 const int kIdlePauseInMs = 1000;
17825 LocalContext env;
17826 v8::Isolate* isolate = env->GetIsolate();
17827 v8::HandleScope scope(env->GetIsolate());
17828 intptr_t initial_size = CcTest::heap()->SizeOfObjects();
17829 // Send idle notification to start a round of incremental GCs.
17830 env->GetIsolate()->IdleNotification(kIdlePauseInMs);
17831 // Emulate 7 page reloads.
17832 for (int i = 0; i < 7; i++) {
17833 {
17834 v8::HandleScope inner_scope(env->GetIsolate());
17835 v8::Local<v8::Context> ctx = v8::Context::New(isolate);
17836 ctx->Enter();
17837 CreateGarbageInOldSpace();
17838 ctx->Exit();
17839 }
17840 env->GetIsolate()->ContextDisposedNotification();
17841 env->GetIsolate()->IdleNotification(kIdlePauseInMs);
17842 }
17843 // Create garbage and check that idle notification still collects it.
17844 CreateGarbageInOldSpace();
17845 intptr_t size_with_garbage = CcTest::heap()->SizeOfObjects();
17846 CHECK_GT(size_with_garbage, initial_size + MB);
17847 bool finished = false;
17848 for (int i = 0; i < 200 && !finished; i++) {
17849 finished = env->GetIsolate()->IdleNotification(kIdlePauseInMs);
17850 }
17851 intptr_t final_size = CcTest::heap()->SizeOfObjects();
17852 CHECK_LT(final_size, initial_size + 1);
17853 }
17854
17855
17856 TEST(Regress2333) { 17822 TEST(Regress2333) {
17857 LocalContext env; 17823 LocalContext env;
17858 for (int i = 0; i < 3; i++) { 17824 for (int i = 0; i < 3; i++) {
17859 CcTest::heap()->CollectGarbage(i::NEW_SPACE); 17825 CcTest::heap()->CollectGarbage(i::NEW_SPACE);
17860 } 17826 }
17861 } 17827 }
17862 17828
17863 static uint32_t* stack_limit; 17829 static uint32_t* stack_limit;
17864 17830
17865 static void GetStackLimitCallback( 17831 static void GetStackLimitCallback(
(...skipping 5479 matching lines...) Expand 10 before | Expand all | Expand 10 after
23345 // TestSourceStream::GetMoreData won't block, so it's OK to just run the 23311 // TestSourceStream::GetMoreData won't block, so it's OK to just run the
23346 // task here in the main thread. 23312 // task here in the main thread.
23347 task->Run(); 23313 task->Run();
23348 delete task; 23314 delete task;
23349 23315
23350 const v8::ScriptCompiler::CachedData* cached_data = source.GetCachedData(); 23316 const v8::ScriptCompiler::CachedData* cached_data = source.GetCachedData();
23351 CHECK(cached_data != NULL); 23317 CHECK(cached_data != NULL);
23352 CHECK(cached_data->data != NULL); 23318 CHECK(cached_data->data != NULL);
23353 CHECK_GT(cached_data->length, 0); 23319 CHECK_GT(cached_data->length, 0);
23354 } 23320 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698