2968 |
2968 |
2969 // Create file(s) |
2969 // Create file(s) |
2970 TInt err( KErrNone ); |
2970 TInt err( KErrNone ); |
2971 |
2971 |
2972 iLastReceivedMessage = -1; |
2972 iLastReceivedMessage = -1; |
2973 |
2973 |
|
2974 if(aDoSync) |
|
2975 { |
|
2976 // Disable automatic refresh. |
|
2977 iTester->SetAutomaticRefresh( EFalse ); |
|
2978 } |
|
2979 |
|
2980 RArray<TInt> messages; |
|
2981 |
|
2982 for(int i = 0; i < aVideoCount; i++) |
|
2983 { |
|
2984 // Create the video. |
|
2985 TRAP( err, iTestUtils->CreateVideoFileL( aType, *path, aSize, ETrue ) ); |
|
2986 if(err != KErrNone) |
|
2987 { |
|
2988 VCXLOGLO2("CVCXMyVideosCollectionPluginTest:: CreateVideoFileL returned error: %d:", err); |
|
2989 } |
|
2990 |
|
2991 if( aDoSync && iTester->GetCurrentLevel() == 3 ) |
|
2992 { |
|
2993 // Wait for insertion event. |
|
2994 messages.Append( KVCXMYVideosTestMessageMpxVideoInserted ); |
|
2995 WaitForMessagesL( ETrue, messages, 60, ETrue ); |
|
2996 messages.Reset(); |
|
2997 } |
|
2998 } |
|
2999 |
|
3000 if( aDoSync ) |
|
3001 { |
|
3002 // Refresh. |
|
3003 messages.Reset(); |
|
3004 iTester->RefreshContentsL(); |
|
3005 messages.Append( KVCXMYVideosTestMessageCollectionOpened ); |
|
3006 CleanupClosePushL( messages ); |
|
3007 WaitForMessagesL( ETrue, messages, 30, ETrue ); |
|
3008 CleanupStack::PopAndDestroy( &messages ); |
|
3009 iTester->SetAutomaticRefresh( ETrue ); |
|
3010 } |
|
3011 |
|
3012 CleanupStack::PopAndDestroy( path ); |
|
3013 |
|
3014 #if 0 |
2974 if( aVideoCount == 1 ) |
3015 if( aVideoCount == 1 ) |
2975 { |
3016 { |
2976 // Save the path for later use. |
3017 // Save the path for later use. |
2977 CleanupStack::Pop( path ); |
3018 CleanupStack::Pop( path ); |
2978 iSideloadedFiles.Append( path ); |
3019 iSideloadedFiles.Append( path ); |
3033 CleanupStack::PopAndDestroy( &messages ); |
3074 CleanupStack::PopAndDestroy( &messages ); |
3034 iTester->SetAutomaticRefresh( ETrue ); |
3075 iTester->SetAutomaticRefresh( ETrue ); |
3035 } |
3076 } |
3036 } |
3077 } |
3037 } |
3078 } |
|
3079 #endif |
3038 } |
3080 } |
3039 |
3081 |
3040 // ----------------------------------------------------------------------------- |
3082 // ----------------------------------------------------------------------------- |
3041 // CVCXMyVideosCollectionPluginTest::EnsureDriveForVideosL |
3083 // CVCXMyVideosCollectionPluginTest::EnsureDriveForVideosL |
3042 // Delete everything from sideloading folders. |
3084 // Delete everything from sideloading folders. |