videocollection/mpxmyvideoscollection/tsrc/mpxmvcolltest/src/VCXMyVideosCollectionPluginTestBlocks.cpp
changeset 41 229f037ce963
parent 36 8aed59de29f9
--- a/videocollection/mpxmyvideoscollection/tsrc/mpxmvcolltest/src/VCXMyVideosCollectionPluginTestBlocks.cpp	Fri Jun 11 09:44:20 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/tsrc/mpxmvcolltest/src/VCXMyVideosCollectionPluginTestBlocks.cpp	Thu Jun 24 09:49:13 2010 +0300
@@ -2970,7 +2970,48 @@
     TInt err( KErrNone );
 
     iLastReceivedMessage = -1;
-
+    
+    if(aDoSync)
+    {
+        // Disable automatic refresh.
+        iTester->SetAutomaticRefresh( EFalse );
+    }
+    
+    RArray<TInt> messages;
+    
+    for(int i =  0; i < aVideoCount; i++)
+    {
+        // Create the video.
+        TRAP( err, iTestUtils->CreateVideoFileL( aType, *path, aSize, ETrue ) );
+        if(err != KErrNone)
+            {
+            VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: CreateVideoFileL returned error: %d:", err);
+            }
+
+        if( aDoSync && iTester->GetCurrentLevel() == 3 )
+            {
+            // Wait for insertion event.
+            messages.Append( KVCXMYVideosTestMessageMpxVideoInserted );
+            WaitForMessagesL( ETrue, messages, 60, ETrue );
+            messages.Reset();
+            }
+    }
+
+    if( aDoSync )
+    {
+        // Refresh.
+        messages.Reset();
+        iTester->RefreshContentsL();
+        messages.Append( KVCXMYVideosTestMessageCollectionOpened );
+        CleanupClosePushL( messages );
+        WaitForMessagesL( ETrue, messages, 30, ETrue );
+        CleanupStack::PopAndDestroy( &messages );
+        iTester->SetAutomaticRefresh( ETrue );
+    }
+
+    CleanupStack::PopAndDestroy( path );
+    
+#if 0
     if( aVideoCount == 1 )
         {
         // Save the path for later use.
@@ -3035,6 +3076,7 @@
                 }
             }
         }
+#endif
     }
 
 // -----------------------------------------------------------------------------