• Home
  • Raw
  • Download

Lines Matching full:background

64 // and delete objects on a background thread.
388 BackgroundThread background; in TEST() local
389 background.Start(); in TEST()
399 // Background thread creates WeakPtr(and implicitly owns the object). in TEST()
400 background.CreateArrowFromTarget(&arrow, target); in TEST()
401 EXPECT_EQ(background.DeRef(arrow), target); in TEST()
409 // The new WeakPtr is owned by background thread. in TEST()
410 EXPECT_EQ(target, background.DeRef(&arrow)); in TEST()
413 // Target can only be deleted on background thread. in TEST()
414 background.DeleteTarget(target); in TEST()
415 background.DeleteArrow(arrow); in TEST()
419 BackgroundThread background; in TEST() local
420 background.Start(); in TEST()
425 // Background thread creates WeakPtr. in TEST()
426 background.CreateArrowFromTarget(&arrow, &target); in TEST()
428 // Bind to background thread. in TEST()
429 EXPECT_EQ(&target, background.DeRef(arrow)); in TEST()
447 BackgroundThread background; in TEST() local
448 background.Start(); in TEST()
461 // Re-bind to background thread. in TEST()
462 EXPECT_EQ(target.get(), background.DeRef(&arrow)); in TEST()
464 // And the background thread can now delete the target. in TEST()
465 background.DeleteTarget(target.release()); in TEST()
471 // - Background thread creates a WeakPtr copy from the one in main thread in TEST()
472 // - Destruct the WeakPtr on background thread in TEST()
474 BackgroundThread background; in TEST() local
475 background.Start(); in TEST()
482 background.CreateArrowFromArrow(&arrow_copy, &arrow); in TEST()
484 background.DeleteArrow(arrow_copy); in TEST()
489 // - Main thread creates a WeakPtr and passes copy to background thread in TEST()
491 // - Destruct the pointer on background thread in TEST()
492 BackgroundThread background; in TEST() local
493 background.Start(); in TEST()
500 background.CreateArrowFromArrow(&arrow_copy, &arrow); in TEST()
503 background.DeleteArrow(arrow_copy); in TEST()
508 // - Main thread creates WeakPtr and passes Copy to background thread in TEST()
510 // (invalidates WeakPtr on background thread) in TEST()
512 BackgroundThread background; in TEST() local
513 background.Start(); in TEST()
519 background.CreateArrowFromArrow(&arrow_copy, &arrow); in TEST()
522 background.DeleteArrow(arrow_copy); in TEST()
532 // Background can copy and assign arrow (as well as the WeakPtr inside). in TEST()
533 BackgroundThread background; in TEST() local
534 background.Start(); in TEST()
535 background.CopyAndAssignArrow(arrow); in TEST()
536 background.DeleteArrow(arrow); in TEST()
546 // Background can copy and assign arrow's WeakPtr to a base class WeakPtr. in TEST()
547 BackgroundThread background; in TEST() local
548 background.Start(); in TEST()
549 background.CopyAndAssignArrowBase(arrow); in TEST()
550 background.DeleteArrow(arrow); in TEST()
560 // Background can delete arrow (as well as the WeakPtr inside). in TEST()
561 BackgroundThread background; in TEST() local
562 background.Start(); in TEST()
563 background.DeleteArrow(arrow); in TEST()
573 BackgroundThread background; in TEST() local
574 background.Start(); in TEST()
582 // Background copies the WeakPtr. in TEST()
584 background.CreateArrowFromArrow(&arrow_copy, &arrow); in TEST()
589 // Although background thread created the copy, it can not deref the copied in TEST()
591 ASSERT_DEATH(background.DeRef(arrow_copy), ""); in TEST()
593 background.DeleteArrow(arrow_copy); in TEST()
610 // Background thread tries to deref target, which violates thread ownership. in TEST()
611 BackgroundThread background; in TEST() local
612 background.Start(); in TEST()
613 ASSERT_DEATH(background.DeRef(&arrow), ""); in TEST()
627 // Background thread tries to deref target, binding it to the thread. in TEST()
628 BackgroundThread background; in TEST() local
629 background.Start(); in TEST()
630 background.DeRef(&arrow); in TEST()
636 // must pass it to the background thread to teardown. in TEST()
637 background.DeleteTarget(target.release()); in TEST()
653 // Background thread tries to delete target, volating thread binding. in TEST()
654 BackgroundThread background; in TEST() local
655 background.Start(); in TEST()
656 ASSERT_DEATH(background.DeleteTarget(target.release()), ""); in TEST()
670 // Background thread tries to delete target, binding the object to the thread. in TEST()
671 BackgroundThread background; in TEST() local
672 background.Start(); in TEST()
673 background.DeleteTarget(target.release()); in TEST()