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

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

Issue 23929006: remove remaining uses of default isolate in tests (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix serializer tests Created 7 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 | « test/cctest/test-lockers.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 319
320 // Must not crash. 320 // Must not crash.
321 CcTest::i_isolate()->logger()->LogCompiledFunctions(); 321 CcTest::i_isolate()->logger()->LogCompiledFunctions();
322 } 322 }
323 323
324 324
325 static void ObjMethod1(const v8::FunctionCallbackInfo<v8::Value>& args) { 325 static void ObjMethod1(const v8::FunctionCallbackInfo<v8::Value>& args) {
326 } 326 }
327 327
328 328
329 UNINITIALIZED_TEST(LogCallbacks) { 329 TEST(LogCallbacks) {
330 ScopedLoggerInitializer initialize_logger; 330 ScopedLoggerInitializer initialize_logger;
331 Logger* logger = initialize_logger.logger(); 331 Logger* logger = initialize_logger.logger();
332 332
333 v8::Local<v8::FunctionTemplate> obj = 333 v8::Local<v8::FunctionTemplate> obj =
334 v8::Local<v8::FunctionTemplate>::New(CcTest::isolate(), 334 v8::Local<v8::FunctionTemplate>::New(CcTest::isolate(),
335 v8::FunctionTemplate::New()); 335 v8::FunctionTemplate::New());
336 obj->SetClassName(v8_str("Obj")); 336 obj->SetClassName(v8_str("Obj"));
337 v8::Handle<v8::ObjectTemplate> proto = obj->PrototypeTemplate(); 337 v8::Handle<v8::ObjectTemplate> proto = obj->PrototypeTemplate();
338 v8::Local<v8::Signature> signature = v8::Signature::New(obj); 338 v8::Local<v8::Signature> signature = v8::Signature::New(obj);
339 proto->Set(v8_str("method1"), 339 proto->Set(v8_str("method1"),
(...skipping 28 matching lines...) Expand all
368 static void Prop1Setter(v8::Local<v8::String> property, 368 static void Prop1Setter(v8::Local<v8::String> property,
369 v8::Local<v8::Value> value, 369 v8::Local<v8::Value> value,
370 const v8::PropertyCallbackInfo<void>& info) { 370 const v8::PropertyCallbackInfo<void>& info) {
371 } 371 }
372 372
373 static void Prop2Getter(v8::Local<v8::String> property, 373 static void Prop2Getter(v8::Local<v8::String> property,
374 const v8::PropertyCallbackInfo<v8::Value>& info) { 374 const v8::PropertyCallbackInfo<v8::Value>& info) {
375 } 375 }
376 376
377 377
378 UNINITIALIZED_TEST(LogAccessorCallbacks) { 378 TEST(LogAccessorCallbacks) {
379 ScopedLoggerInitializer initialize_logger; 379 ScopedLoggerInitializer initialize_logger;
380 Logger* logger = initialize_logger.logger(); 380 Logger* logger = initialize_logger.logger();
381 381
382 v8::Local<v8::FunctionTemplate> obj = 382 v8::Local<v8::FunctionTemplate> obj =
383 v8::Local<v8::FunctionTemplate>::New(CcTest::isolate(), 383 v8::Local<v8::FunctionTemplate>::New(CcTest::isolate(),
384 v8::FunctionTemplate::New()); 384 v8::FunctionTemplate::New());
385 obj->SetClassName(v8_str("Obj")); 385 obj->SetClassName(v8_str("Obj"));
386 v8::Handle<v8::ObjectTemplate> inst = obj->InstanceTemplate(); 386 v8::Handle<v8::ObjectTemplate> inst = obj->InstanceTemplate();
387 inst->SetAccessor(v8_str("prop1"), Prop1Getter, Prop1Setter); 387 inst->SetAccessor(v8_str("prop1"), Prop1Getter, Prop1Setter);
388 inst->SetAccessor(v8_str("prop2"), Prop2Getter); 388 inst->SetAccessor(v8_str("prop2"), Prop2Getter);
(...skipping 26 matching lines...) Expand all
415 CHECK_NE(NULL, 415 CHECK_NE(NULL,
416 StrNStr(log.start(), prop2_getter_record.start(), log.length())); 416 StrNStr(log.start(), prop2_getter_record.start(), log.length()));
417 } 417 }
418 418
419 419
420 typedef i::NativesCollection<i::TEST> TestSources; 420 typedef i::NativesCollection<i::TEST> TestSources;
421 421
422 422
423 // Test that logging of code create / move events is equivalent to traversal of 423 // Test that logging of code create / move events is equivalent to traversal of
424 // a resulting heap. 424 // a resulting heap.
425 UNINITIALIZED_TEST(EquivalenceOfLoggingAndTraversal) { 425 TEST(EquivalenceOfLoggingAndTraversal) {
426 // This test needs to be run on a "clean" V8 to ensure that snapshot log 426 // This test needs to be run on a "clean" V8 to ensure that snapshot log
427 // is loaded. This is always true when running using tools/test.py because 427 // is loaded. This is always true when running using tools/test.py because
428 // it launches a new cctest instance for every test. To be sure that launching 428 // it launches a new cctest instance for every test. To be sure that launching
429 // cctest manually also works, please be sure that no tests below 429 // cctest manually also works, please be sure that no tests below
430 // are using V8. 430 // are using V8.
431 431
432 // Start with profiling to capture all code events from the beginning. 432 // Start with profiling to capture all code events from the beginning.
433 ScopedLoggerInitializer initialize_logger; 433 ScopedLoggerInitializer initialize_logger;
434 Logger* logger = initialize_logger.logger(); 434 Logger* logger = initialize_logger.logger();
435 435
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 v8::Local<v8::String> s = result->ToString(); 475 v8::Local<v8::String> s = result->ToString();
476 i::ScopedVector<char> data(s->Utf8Length() + 1); 476 i::ScopedVector<char> data(s->Utf8Length() + 1);
477 CHECK_NE(NULL, data.start()); 477 CHECK_NE(NULL, data.start());
478 s->WriteUtf8(data.start()); 478 s->WriteUtf8(data.start());
479 printf("%s\n", data.start()); 479 printf("%s\n", data.start());
480 // Make sure that our output is written prior crash due to CHECK failure. 480 // Make sure that our output is written prior crash due to CHECK failure.
481 fflush(stdout); 481 fflush(stdout);
482 CHECK(false); 482 CHECK(false);
483 } 483 }
484 } 484 }
OLDNEW
« no previous file with comments | « test/cctest/test-lockers.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698