90 // TV out cases |
90 // TV out cases |
91 ENTRY( "TvOutConnected", CVideoPlaybackControlsTest::TvOutConnected ), |
91 ENTRY( "TvOutConnected", CVideoPlaybackControlsTest::TvOutConnected ), |
92 ENTRY( "TvOutDisconnected", CVideoPlaybackControlsTest::TvOutDisconnected ), |
92 ENTRY( "TvOutDisconnected", CVideoPlaybackControlsTest::TvOutDisconnected ), |
93 |
93 |
94 ENTRY( "HandleErrors", CVideoPlaybackControlsTest::HandleErrors ), |
94 ENTRY( "HandleErrors", CVideoPlaybackControlsTest::HandleErrors ), |
95 |
95 |
96 // Media Details Viewer |
96 // Media Details Viewer |
97 ENTRY( "ShowMediaDetailsViewer", CVideoPlaybackControlsTest::ShowMediaDetailsViewer ), |
97 ENTRY( "ShowMediaDetailsViewer", CVideoPlaybackControlsTest::ShowMediaDetailsViewer ), |
98 ENTRY( "CloseMediaDetailsViewer", CVideoPlaybackControlsTest::CloseMediaDetailsViewer ) |
98 ENTRY( "CloseMediaDetailsViewer", CVideoPlaybackControlsTest::CloseMediaDetailsViewer ) |
99 |
99 |
100 //ADD NEW ENTRY HERE |
100 //ADD NEW ENTRY HERE |
101 // [test cases entries] - Do not remove |
101 // [test cases entries] - Do not remove |
102 }; |
102 }; |
103 |
103 |
104 const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo ); |
104 const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo ); |
116 |
116 |
117 TInt result = KErrGeneral; |
117 TInt result = KErrGeneral; |
118 |
118 |
119 if ( iAvkonViewAppUi->OrientationCanBeChanged() ) |
119 if ( iAvkonViewAppUi->OrientationCanBeChanged() ) |
120 { |
120 { |
121 TRAPD( err, iAvkonViewAppUi->SetOrientationL( CAknAppUiBase::EAppUiOrientationLandscape ) ); |
121 MPX_TRAPD( err, iAvkonViewAppUi->SetOrientationL( CAknAppUiBase::EAppUiOrientationLandscape ) ); |
122 MPX_DEBUG(_L("CVideoPlaybackControlsTest::CreateController() err = [%d]"), err); |
122 MPX_DEBUG(_L("CVideoPlaybackControlsTest::CreateController() err = [%d]"), err); |
123 } |
123 } |
124 |
124 |
125 TRect rect = iAvkonViewAppUi->ApplicationRect(); |
125 TRect rect = iAvkonViewAppUi->ApplicationRect(); |
126 |
126 |
127 TRAP |
127 MPX_TRAP |
128 ( |
128 ( |
129 result, |
129 result, |
130 { |
130 { |
131 iContainer = CMPXVideoPlaybackContainer::NewL( aFileName ); |
131 iContainer = CMPXVideoPlaybackContainer::NewL( aFileName ); |
132 |
132 |
492 // |
497 // |
493 TInt CVideoPlaybackControlsTest::AddLongFileDetails() |
498 TInt CVideoPlaybackControlsTest::AddLongFileDetails() |
494 { |
499 { |
495 MPX_DEBUG(_L("CVideoPlaybackControlsTest::AddLongFileDetails()")); |
500 MPX_DEBUG(_L("CVideoPlaybackControlsTest::AddLongFileDetails()")); |
496 |
501 |
497 TRAPD( result, iContainer->AddLongFileDetailsL() ); |
502 MPX_TRAPD( result, iContainer->AddLongFileDetailsL() ); |
498 |
503 |
499 return result; |
504 return result; |
500 } |
505 } |
501 |
506 |
502 // ------------------------------------------------------------------------------------------------- |
507 // ------------------------------------------------------------------------------------------------- |
503 // CVideoPlaybackControlsTest::AddSameARFileDetails |
508 // CVideoPlaybackControlsTest::AddSameARFileDetails |
504 // ------------------------------------------------------------------------------------------------- |
509 // ------------------------------------------------------------------------------------------------- |
505 // |
510 // |
506 TInt CVideoPlaybackControlsTest::AddSameARFileDetails() |
511 TInt CVideoPlaybackControlsTest::AddSameARFileDetails() |
507 { |
512 { |
508 MPX_ENTER_EXIT( _L( "CVideoPlaybackControlsTest::AddSameARFileDetails()" ) ); |
513 MPX_ENTER_EXIT( _L( "CVideoPlaybackControlsTest::AddSameARFileDetails()" ) ); |
509 |
514 |
510 MPX_TRAPD( result, iContainer->AddSameARFileDetailsL() ); |
515 MPX_TRAPD( result, iContainer->AddSameARFileDetailsL() ); |
511 |
516 |
512 return result; |
517 return result; |
513 } |
518 } |
516 // CVideoPlaybackControlsTest::AddEmptyTitleFileDetails |
521 // CVideoPlaybackControlsTest::AddEmptyTitleFileDetails |
517 // ------------------------------------------------------------------------------------------------- |
522 // ------------------------------------------------------------------------------------------------- |
518 // |
523 // |
519 TInt CVideoPlaybackControlsTest::AddEmptyTitleFileDetailsL() |
524 TInt CVideoPlaybackControlsTest::AddEmptyTitleFileDetailsL() |
520 { |
525 { |
521 MPX_ENTER_EXIT( _L( "CVideoPlaybackControlsTest::AddEmptyTitleFileDetailsL()" ) ); |
526 MPX_ENTER_EXIT( _L( "CVideoPlaybackControlsTest::AddEmptyTitleFileDetailsL()" ) ); |
522 |
527 |
523 MPX_TRAPD( result, iContainer->AddEmptyTitleFileDetailsL() ); |
528 MPX_TRAPD( result, iContainer->AddEmptyTitleFileDetailsL() ); |
524 |
529 |
525 return result; |
530 return result; |
526 } |
531 } |
583 // ix = ( ScreenWidth - 1 ) - oldPosition.iY - YOffset |
588 // ix = ( ScreenWidth - 1 ) - oldPosition.iY - YOffset |
584 // I am not sure why they subtract 1 from the screen width, but they do |
589 // I am not sure why they subtract 1 from the screen width, but they do |
585 // The YOffset can be read from the wsini.ini file |
590 // The YOffset can be read from the wsini.ini file |
586 // |
591 // |
587 // iy = oldPosition.iX |
592 // iy = oldPosition.iX |
588 // |
593 // |
589 tapPoint.iX = ( 360 - 1 ) - aPosition.iY - 12; |
594 tapPoint.iX = ( 360 - 1 ) - aPosition.iY - 12; |
590 tapPoint.iY = aPosition.iX; |
595 tapPoint.iY = aPosition.iX; |
591 |
596 |
592 #endif |
597 #endif |
593 |
598 |
594 MPX_DEBUG(_L(" tapPosition = (%d,%d)"), tapPoint.iX, tapPoint.iY); |
599 MPX_DEBUG(_L(" tapPosition = (%d,%d)"), tapPoint.iX, tapPoint.iY); |
595 |
600 |
596 TRawEvent pointer; |
601 TRawEvent pointer; |
597 |
602 |
598 if ( aType == TPointerEvent::EButton1Down ) |
603 if ( aType == TPointerEvent::EButton1Down ) |
615 // CVideoPlaybackControlsTest::SetDownLoadSize |
620 // CVideoPlaybackControlsTest::SetDownLoadSize |
616 // ------------------------------------------------------------------------------------------------- |
621 // ------------------------------------------------------------------------------------------------- |
617 // |
622 // |
618 TInt CVideoPlaybackControlsTest::SetDownLoadSize( CStifItemParser& aItem ) |
623 TInt CVideoPlaybackControlsTest::SetDownLoadSize( CStifItemParser& aItem ) |
619 { |
624 { |
620 MPX_DEBUG(_L("CVideoPlaybackControlsTest::SetExpectedResult()")); |
625 MPX_DEBUG(_L("CVideoPlaybackControlsTest::SetExpectedResult()")); |
621 |
626 |
622 TInt size = 0; |
627 TInt size = 0; |
623 TInt result = aItem.GetNextInt( size ); |
628 TInt result = aItem.GetNextInt( size ); |
624 |
629 |
625 if ( result == KErrNone ) |
630 if ( result == KErrNone ) |
626 { |
631 { |
627 TRAP( result, iController->HandleEventL( EMPXControlCmdSetDownloadSize, size ) ); |
632 MPX_TRAP( result, iController->HandleEventL( EMPXControlCmdSetDownloadSize, size ) ); |
628 } |
633 } |
629 |
634 |
630 return result; |
635 return result; |
631 } |
636 } |
632 |
637 |
634 // CVideoPlaybackControlsTest::SetDownLoadPostion |
639 // CVideoPlaybackControlsTest::SetDownLoadPostion |
635 // ------------------------------------------------------------------------------------------------- |
640 // ------------------------------------------------------------------------------------------------- |
636 // |
641 // |
637 TInt CVideoPlaybackControlsTest::SetDownLoadPostion( CStifItemParser& aItem ) |
642 TInt CVideoPlaybackControlsTest::SetDownLoadPostion( CStifItemParser& aItem ) |
638 { |
643 { |
639 MPX_DEBUG(_L("CVideoPlaybackControlsTest::SetExpectedResult()")); |
644 MPX_DEBUG(_L("CVideoPlaybackControlsTest::SetExpectedResult()")); |
640 |
645 |
641 TInt position = 0; |
646 TInt position = 0; |
642 TInt result = aItem.GetNextInt( position ); |
647 TInt result = aItem.GetNextInt( position ); |
643 |
648 |
644 if ( result == KErrNone ) |
649 if ( result == KErrNone ) |
645 { |
650 { |
646 TRAP( result, iController->HandleEventL( EMPXControlCmdSetPosition, position ) ); |
651 MPX_TRAP( result, iController->HandleEventL( EMPXControlCmdSetPosition, position ) ); |
647 } |
652 } |
648 |
653 |
649 return result; |
654 return result; |
650 } |
655 } |
651 |
656 |
672 // CVideoPlaybackControlsTest::SetDownLoadPaused |
677 // CVideoPlaybackControlsTest::SetDownLoadPaused |
673 // ------------------------------------------------------------------------------------------------- |
678 // ------------------------------------------------------------------------------------------------- |
674 // |
679 // |
675 TInt CVideoPlaybackControlsTest::SetDownLoadPaused() |
680 TInt CVideoPlaybackControlsTest::SetDownLoadPaused() |
676 { |
681 { |
677 MPX_DEBUG(_L("CVideoPlaybackControlsTest::SetDownLoadPaused()")); |
682 MPX_DEBUG(_L("CVideoPlaybackControlsTest::SetDownLoadPaused()")); |
678 |
683 |
679 TRAPD( result, iController->HandleEventL( EMPXControlCmdSetDownloadPaused) ); |
684 MPX_TRAPD( result, iController->HandleEventL( EMPXControlCmdSetDownloadPaused) ); |
680 |
685 |
681 return result; |
686 return result; |
682 } |
687 } |
683 |
688 |
684 // ------------------------------------------------------------------------------------------------- |
689 // ------------------------------------------------------------------------------------------------- |
685 // CVideoPlaybackControlsTest::ClearDownLoadPaused |
690 // CVideoPlaybackControlsTest::ClearDownLoadPaused |
686 // ------------------------------------------------------------------------------------------------- |
691 // ------------------------------------------------------------------------------------------------- |
687 // |
692 // |
688 TInt CVideoPlaybackControlsTest::ClearDownLoadPaused() |
693 TInt CVideoPlaybackControlsTest::ClearDownLoadPaused() |
689 { |
694 { |
690 MPX_DEBUG(_L("CVideoPlaybackControlsTest::ClearDownLoadPaused()")); |
695 MPX_DEBUG(_L("CVideoPlaybackControlsTest::ClearDownLoadPaused()")); |
691 |
696 |
692 TRAPD( result, iController->HandleEventL( EMPXControlCmdClearDownloadPaused) ); |
697 MPX_TRAPD( result, iController->HandleEventL( EMPXControlCmdClearDownloadPaused) ); |
693 |
698 |
694 return result; |
699 return result; |
695 } |
700 } |
696 |
701 |
697 // ------------------------------------------------------------------------------------------------- |
702 // ------------------------------------------------------------------------------------------------- |
698 // CVideoPlaybackControlsTest::TvOutConnected |
703 // CVideoPlaybackControlsTest::TvOutConnected |
699 // ------------------------------------------------------------------------------------------------- |
704 // ------------------------------------------------------------------------------------------------- |
700 // |
705 // |
701 TInt CVideoPlaybackControlsTest::TvOutConnected() |
706 TInt CVideoPlaybackControlsTest::TvOutConnected() |
702 { |
707 { |
703 MPX_DEBUG(_L("CVideoPlaybackControlsTest::TvOutConnected()")); |
708 MPX_DEBUG(_L("CVideoPlaybackControlsTest::TvOutConnected()")); |
704 |
709 |
705 TRAPD( result, iController->HandleEventL( EMPXControlCmdTvOutConnected ) ); |
710 MPX_TRAPD( result, iController->HandleEventL( EMPXControlCmdTvOutConnected ) ); |
706 |
711 |
707 return result; |
712 return result; |
708 } |
713 } |
709 |
714 |
710 // ------------------------------------------------------------------------------------------------- |
715 // ------------------------------------------------------------------------------------------------- |
711 // CVideoPlaybackControlsTest::TvOutDisconnected |
716 // CVideoPlaybackControlsTest::TvOutDisconnected |
712 // ------------------------------------------------------------------------------------------------- |
717 // ------------------------------------------------------------------------------------------------- |
713 // |
718 // |
714 TInt CVideoPlaybackControlsTest::TvOutDisconnected() |
719 TInt CVideoPlaybackControlsTest::TvOutDisconnected() |
715 { |
720 { |
716 MPX_DEBUG(_L("CVideoPlaybackControlsTest::TvOutDisconnected()")); |
721 MPX_DEBUG(_L("CVideoPlaybackControlsTest::TvOutDisconnected()")); |
717 |
722 |
718 TRAPD( result, iController->HandleEventL( EMPXControlCmdTvOutDisconnected ) ); |
723 MPX_TRAPD( result, iController->HandleEventL( EMPXControlCmdTvOutDisconnected ) ); |
719 |
724 |
720 return result; |
725 return result; |
721 } |
726 } |
722 |
727 |
723 // ------------------------------------------------------------------------------------------------- |
728 // ------------------------------------------------------------------------------------------------- |