| <UnitTester |
| testDir="spark/components/VideoPlayer/method/" |
| xmlns:mx="http://www.adobe.com/2006/mxml" |
| xmlns="*" |
| testSWF="../SWFs/VideoPlayer_default.mxml"> |
| |
| <!--Default Script--> |
| <mx:Script> |
| <![CDATA[ |
| import spark.components.VideoPlayer; |
| public static function init(o:DisplayObject):void{} |
| ]]> |
| </mx:Script> |
| |
| <!--Default Metadata--> |
| <mx:Metadata><![CDATA[[Mixin]]]></mx:Metadata> |
| |
| <!--Test Cases--> |
| <testCases> |
| |
| <TestCase |
| testID="VideoPlayer_pause_nullSource" |
| description="Seek when source is null." keywords="[VideoPlayer, Pause]"> |
| <setup> |
| |
| <ResetComponent target="testPlayer" className="Components.TrixSparkVideoPlayer" waitTarget="testPlayer" waitEvent="updateComplete" /> |
| </setup> |
| <body> |
| <RunCode code="application.testPlayer.pause()" /> |
| </body> |
| </TestCase> |
| |
| <!-- ********* --> |
| <!-- STREAMING --> |
| <!-- ********* --> |
| |
| <TestCase |
| testID="VideoPlayer_pause_playing_streaming" |
| description="Test the pause() method while playing." |
| keywords="[VideoPlayer, Pause]"> |
| <setup> |
| |
| <ResetComponent target="testPlayer" className="Components.TrixSparkVideoPlayer" waitTarget="testPlayer" waitEvent="updateComplete" /> |
| <RunCode code="application.testPlayer.source = application.GreenBoxVidStream" waitTarget="testPlayer" waitEvent="mediaPlayerStateChange" timeout="5000"/> |
| <Pause timeout="5000"/> |
| </setup> |
| <body> |
| <RunCode code="application.testPlayer.pause()"/> |
| <Pause timeout="1000"/> |
| <AssertPropertyValue target="testPlayer" propertyName="playing" value="false"/> |
| <AssertMethodValue method="value=(application.testPlayer.currentTime > 2)" value="true"/> |
| <AssertMethodValue method="value=(application.testPlayer.currentTime > 6)" value="false"/> |
| </body> |
| </TestCase> |
| |
| <TestCase |
| testID="VideoPlayer_pause_stopped_streaming" |
| description="Test the pause() method while stopped." |
| keywords="[VideoPlayer, Pause]"> |
| <setup> |
| |
| <ResetComponent target="testPlayer" className="Components.TrixSparkVideoPlayer" waitTarget="testPlayer" waitEvent="updateComplete" /> |
| <RunCode code="application.testPlayer.source = application.GreenBoxVidStream" waitTarget="testPlayer" waitEvent="mediaPlayerStateChange" timeout="5000"/> |
| <Pause timeout="3000"/> |
| <RunCode code="application.testPlayer.stop()"/> |
| <Pause timeout="1000"/> |
| </setup> |
| <body> |
| <RunCode code="application.testPlayer.pause()"/> |
| <Pause timeout="2000"/> |
| <AssertPropertyValue target="testPlayer" propertyName="playing" value="false"/> |
| <AssertPropertyValue target="testPlayer" propertyName="currentTime" value="0"/> |
| </body> |
| </TestCase> |
| |
| <TestCase |
| testID="VideoPlayer_pause_paused_streaming" |
| description="Test the pause() method while paused." |
| keywords="[VideoPlayer, Pause]"> |
| <setup> |
| |
| <ResetComponent target="testPlayer" className="Components.TrixSparkVideoPlayer" waitTarget="testPlayer" waitEvent="updateComplete" /> |
| <RunCode code="application.testPlayer.source = application.GreenBoxVidStream" waitTarget="testPlayer" waitEvent="mediaPlayerStateChange" timeout="5000"/> |
| <Pause timeout="6000"/> |
| <RunCode code="application.testPlayer.pause()"/> |
| <Pause timeout="1000"/> |
| </setup> |
| <body> |
| <RunCode code="application.testPlayer.pause()"/> |
| <Pause timeout="1000"/> |
| <AssertPropertyValue target="testPlayer" propertyName="playing" value="false"/> |
| </body> |
| </TestCase> |
| |
| <TestCase |
| testID="VideoPlayer_pause_play_pause_streaming" |
| description="Play pause play." |
| keywords="[VideoPlayer, Pause]"> |
| <setup> |
| |
| <ResetComponent target="testPlayer" className="Components.TrixSparkVideoPlayer" waitTarget="testPlayer" waitEvent="updateComplete" /> |
| <RunCode code="application.testPlayer.source = application.GreenBoxVidStream" waitTarget="testPlayer" waitEvent="mediaPlayerStateChange" timeout="5000"/> |
| <Pause timeout="1000"/> |
| <RunCode code="application.testPlayer.pause()"/> |
| <Pause timeout="1000"/> |
| </setup> |
| <body> |
| <RunCode code="application.testPlayer.play()" waitTarget="testPlayer" waitEvent="currentTimeChange"/> |
| <Pause timeout="5000"/> |
| <AssertPropertyValue target="testPlayer" propertyName="playing" value="true"/> |
| <AssertMethodValue method="value=(application.testPlayer.currentTime > 5)" value="true"/> |
| </body> |
| </TestCase> |
| |
| |
| |
| |
| <!-- *********** --> |
| <!-- PROGRESSIVE --> |
| <!-- *********** --> |
| |
| |
| <TestCase |
| testID="VideoPlayer_pause_playing_progressive" |
| description="Test the pause() method while playing." |
| keywords="[VideoPlayer, Pause]"> |
| <setup> |
| |
| <ResetComponent target="testPlayer" className="Components.TrixSparkVideoPlayer" waitTarget="testPlayer" waitEvent="updateComplete" /> |
| <RunCode code="application.testPlayer.source = application.GreenBoxVid" waitTarget="testPlayer" waitEvent="mediaPlayerStateChange" timeout="5000"/> |
| <Pause timeout="3000"/> |
| </setup> |
| <body> |
| <RunCode code="application.testPlayer.pause()"/> |
| <Pause timeout="3000"/> |
| <AssertPropertyValue target="testPlayer" propertyName="playing" value="false"/> |
| <AssertMethodValue method="value=(application.testPlayer.currentTime > 2)" value="true"/> |
| <AssertMethodValue method="value=(application.testPlayer.currentTime > 5)" value="false"/> |
| </body> |
| </TestCase> |
| |
| <TestCase |
| testID="VideoPlayer_pause_stopped_progressive" |
| description="Test the pause() method while stopped." |
| keywords="[VideoPlayer, Pause]"> |
| <setup> |
| |
| <ResetComponent target="testPlayer" className="Components.TrixSparkVideoPlayer" waitTarget="testPlayer" waitEvent="updateComplete" /> |
| <RunCode code="application.testPlayer.source = application.progressiveVid2" waitTarget="testPlayer" waitEvent="mediaPlayerStateChange" timeout="5000"/> |
| <Pause timeout="3000"/> |
| <RunCode code="application.testPlayer.stop()"/> |
| <Pause timeout="500"/> |
| </setup> |
| <body> |
| <RunCode code="application.testPlayer.pause()"/> |
| <Pause timeout="2000"/> |
| <AssertPropertyValue target="testPlayer" propertyName="playing" value="false"/> |
| <AssertPropertyValue target="testPlayer" propertyName="currentTime" value="0"/> |
| </body> |
| </TestCase> |
| |
| <TestCase |
| testID="VideoPlayer_pause_paused_progressive" |
| description="Test the pause() method while paused." |
| keywords="[VideoPlayer, Pause]"> |
| <setup> |
| |
| <ResetComponent target="testPlayer" className="Components.TrixSparkVideoPlayer" waitTarget="testPlayer" waitEvent="updateComplete" /> |
| <RunCode code="application.testPlayer.source = application.GreenBoxVid" waitTarget="testPlayer" waitEvent="mediaPlayerStateChange" timeout="5000"/> |
| <Pause timeout="3000"/> |
| <RunCode code="application.testPlayer.pause()"/> |
| <Pause timeout="500"/> |
| </setup> |
| <body> |
| <RunCode code="application.testPlayer.pause()"/> |
| <Pause timeout="2000"/> |
| <AssertPropertyValue target="testPlayer" propertyName="playing" value="false"/> |
| <AssertMethodValue method="value=(application.testPlayer.currentTime > 2)" value="true"/> |
| <AssertMethodValue method="value=(application.testPlayer.currentTime > 5)" value="false"/> |
| </body> |
| </TestCase> |
| |
| <TestCase |
| testID="VideoPlayer_pause_play_pause_progressive" |
| description="Play pause play." |
| keywords="[VideoPlayer, Pause]"> |
| <setup> |
| |
| <ResetComponent target="testPlayer" className="Components.TrixSparkVideoPlayer" waitTarget="testPlayer" waitEvent="updateComplete" /> |
| <RunCode code="application.testPlayer.source = application.GreenBoxVid" waitTarget="testPlayer" waitEvent="mediaPlayerStateChange" timeout="5000"/> |
| <Pause timeout="3000"/> |
| <RunCode code="application.testPlayer.pause()"/> |
| <Pause timeout="1000"/> |
| </setup> |
| <body> |
| <RunCode code="application.testPlayer.play()" waitTarget="testPlayer" waitEvent="currentTimeChange"/> |
| <Pause timeout="3000"/> |
| <AssertPropertyValue target="testPlayer" propertyName="playing" value="true"/> |
| </body> |
| </TestCase> |
| |
| </testCases> |
| </UnitTester> |