diff options
author | Rick Pasetto <rick@lindenlab.com> | 2009-11-12 09:23:57 -0800 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2009-11-12 09:23:57 -0800 |
commit | 3dd79ad226bc8e0aec18dba87223a3f50ecf360b (patch) | |
tree | 2af4f4e5d50d35065dda3101b60b40a3c1c21aee /indra/newview/tests | |
parent | 72af8dc3f0a249f69869bc6f52dd7a887702a964 (diff) | |
parent | 7a45dec2d540581ef080386e4a967befd22b6adb (diff) |
merge
Diffstat (limited to 'indra/newview/tests')
-rw-r--r-- | indra/newview/tests/llmediadataclient_test.cpp | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/indra/newview/tests/llmediadataclient_test.cpp b/indra/newview/tests/llmediadataclient_test.cpp index 445ec7aa34..3ac631d96e 100644 --- a/indra/newview/tests/llmediadataclient_test.cpp +++ b/indra/newview/tests/llmediadataclient_test.cpp @@ -497,5 +497,38 @@ namespace tut ensure("REF COUNT", o->getNumRefs(), 1); } - + template<> template<> + void mediadataclient_object_t::test<7>() + { + // Test LLMediaDataClient::isInQueue() + LOG_TEST(7); + + LLMediaDataClientObject::ptr_t o1 = new LLMediaDataClientObjectTest( + _DATA(VALID_OBJECT_ID_1,"3.0","1.0")); + LLMediaDataClientObject::ptr_t o2 = new LLMediaDataClientObjectTest( + _DATA(VALID_OBJECT_ID_2,"1.0","1.0")); + int num_refs_start = o1->getNumRefs(); + { + LLPointer<LLObjectMediaDataClient> mdc = new LLObjectMediaDataClient(NO_PERIOD,NO_PERIOD); + + ensure("not in queue yet 1", ! mdc->isInQueue(o1)); + ensure("not in queue yet 2", ! mdc->isInQueue(o2)); + + mdc->fetchMedia(o1); + + ensure("is in queue", mdc->isInQueue(o1)); + ensure("is not in queue", ! mdc->isInQueue(o2)); + + ::pump_timers(); + + ensure("not in queue anymore", ! mdc->isInQueue(o1)); + ensure("still is not in queue", ! mdc->isInQueue(o2)); + + ensure("queue empty", mdc->isEmpty()); + } + + // Make sure everyone's destroyed properly + ensure("REF COUNT", o1->getNumRefs(), num_refs_start); + + } } |