| <UnitTester |
| testDir="spark/components/VideoDisplay/event/" |
| xmlns:mx="http://www.adobe.com/2006/mxml" |
| xmlns="*" |
| testSWF="../SWFs/VideoDisplay_default.mxml"> |
| |
| <!--Default Script--> |
| <mx:Script> |
| <![CDATA[ |
| import spark.components.VideoDisplay; |
| |
| public static function init(o:DisplayObject):void{} |
| |
| ]]> |
| </mx:Script> |
| |
| <!--Default Metadata--> |
| <mx:Metadata><![CDATA[[Mixin]]]></mx:Metadata> |
| |
| |
| <testCases> |
| |
| |
| <!-- ********* --> |
| <!-- STREAMING --> |
| <!-- ********* --> |
| |
| <TestCase testID="VideoDisplay_durationChange_setSource_S" keywords="[VideoDisplay, event, durationChange]" description="Verify durationChange is raised when source is set"> |
| <setup> |
| <ResetComponent target="testDisplay" className="spark.components.VideoDisplay" waitTarget="testDisplay" waitEvent="updateComplete" /> |
| <RunCode code="application.testDisplay.source = application.streamingVid" waitTarget="testDisplay" waitEvent="mediaPlayerStateChange" /> |
| </setup> |
| <body> |
| <AssertEvent target="testDisplay" eventName="durationChange" eventClass="org.osmf.events::TimeEvent" timeout="8000"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="VideoDisplay_durationChange_changeSource_S" keywords="[VideoDisplay, event, durationChange]" description="Verify durationChange is raised when source is changed"> |
| <setup> |
| <ResetComponent target="testDisplay" className="spark.components.VideoDisplay" waitTarget="testDisplay" waitEvent="updateComplete" /> |
| <RunCode code="application.testDisplay.source = application.GreenBoxVid" waitTarget="testDisplay" waitEvent="mediaPlayerStateChange" /> |
| <Pause timeout="1000"/> |
| <RunCode code="application.testDisplay.source = application.streamingVid" waitTarget="testDisplay" waitEvent="mediaPlayerStateChange" /> |
| </setup> |
| <body> |
| <AssertEvent target="testDisplay" eventName="durationChange" eventClass="org.osmf.events::TimeEvent" timeout="8000"/> |
| <AssertNoEvent target="testDisplay" eventName="complete" eventClass="org.osmf.events::TimeEvent"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="VideoDisplay_durationChange_removeSource_S" keywords="[VideoDisplay, event, durationChange]" description="Verify durationChange is raised when source is removed"> |
| <setup> |
| <ResetComponent target="testDisplay" className="spark.components.VideoDisplay" waitTarget="testDisplay" waitEvent="updateComplete" /> |
| <RunCode code="application.testDisplay.source = application.streamingVid" waitTarget="testDisplay" waitEvent="mediaPlayerStateChange" /> |
| <Pause timeout="3000"/> |
| <RunCode code="application.testDisplay.source = null" waitTarget="testDisplay" waitEvent="mediaPlayerStateChange" /> |
| </setup> |
| <body> |
| <AssertEvent target="testDisplay" eventName="durationChange" eventClass="org.osmf.events::TimeEvent" timeout="8000"/> |
| <AssertNoEvent target="testDisplay" eventName="complete" eventClass="org.osmf.events::TimeEvent"/> |
| </body> |
| </TestCase> |
| |
| |
| <!-- *********** --> |
| <!-- PROGRESSIVE --> |
| <!-- *********** --> |
| |
| <TestCase testID="VideoDisplay_durationChange_setSource_P" keywords="[VideoDisplay, event, durationChange]" description="Verify durationChange is raised when source is set"> |
| <setup> |
| <ResetComponent target="testDisplay" className="spark.components.VideoDisplay" waitTarget="testDisplay" waitEvent="updateComplete" /> |
| <RunCode code="application.testDisplay.source = application.GreenBoxVid"/> |
| </setup> |
| <body> |
| <AssertEvent target="testDisplay" eventName="durationChange" eventClass="org.osmf.events::TimeEvent" timeout="8000"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="VideoDisplay_durationChange_changeSource_P" keywords="[VideoDisplay, event, durationChange]" description="Verify durationChange is raised when source is changed"> |
| <setup> |
| <ResetComponent target="testDisplay" className="spark.components.VideoDisplay" waitTarget="testDisplay" waitEvent="updateComplete" /> |
| <RunCode code="application.testDisplay.source = application.progressiveVid3" waitTarget="testDisplay" waitEvent="mediaPlayerStateChange" /> |
| <Pause timeout="5000"/> |
| <RunCode code="application.testDisplay.source = application.GreenBoxVid" waitTarget="testDisplay" waitEvent="mediaPlayerStateChange" /> |
| </setup> |
| <body> |
| <AssertEvent target="testDisplay" eventName="durationChange" eventClass="org.osmf.events::TimeEvent" timeout="3500"/> |
| <AssertNoEvent target="testDisplay" eventName="complete" eventClass="org.osmf.events::TimeEvent"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="VideoDisplay_durationChange_removeSource_P" keywords="[VideoDisplay, event, durationChange]" description="Verify durationChange is raised when source is removed"> |
| <setup> |
| <ResetComponent target="testDisplay" className="spark.components.VideoDisplay" waitTarget="testDisplay" waitEvent="updateComplete" /> |
| <RunCode code="application.testDisplay.source = application.progressiveVid" waitTarget="testDisplay" waitEvent="mediaPlayerStateChange" /> |
| <Pause timeout="3000"/> |
| <RunCode code="application.testDisplay.source = null" waitTarget="testDisplay" waitEvent="mediaPlayerStateChange" /> |
| </setup> |
| <body> |
| <AssertEvent target="testDisplay" eventName="durationChange" eventClass="org.osmf.events::TimeEvent" timeout="8000"/> |
| <AssertNoEvent target="testDisplay" eventName="complete" eventClass="org.osmf.events::TimeEvent"/> |
| </body> |
| </TestCase> |
| |
| </testCases> |
| </UnitTester> |