incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cframp...@apache.org
Subject svn commit: r1384430 - in /incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion: SWFs/comps/ Styles/ Styles/baselines/spark/
Date Thu, 13 Sep 2012 17:45:01 GMT
Author: cframpton
Date: Thu Sep 13 17:45:00 2012
New Revision: 1384430

URL: http://svn.apache.org/viewvc?rev=1384430&view=rev
Log:
Update Accordion tests.  Eliminate timing issues.

Modified:
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/SWFs/comps/button_swf_runtime.mxml
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/Accordion_SkinStates_Basic_Spark.mxml
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_Disabled_SWF.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_Disabled_SWF_air.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_air.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseDown_NonselectedTab.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseDown_NonselectedTab_air.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseDown_selectedTab.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseDown_selectedTab_air.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseOver_NonselectedTab.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseOver_NonselectedTab_air.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseOver_selectedTab.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseOver_selectedTab_air.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF_mouseDown_NonselectedTab.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF_mouseDown_selectedTab.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF_mouseOver_NonselectedTab.png
    incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF_mouseOver_selectedTab.png

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/SWFs/comps/button_swf_runtime.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/SWFs/comps/button_swf_runtime.mxml?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/SWFs/comps/button_swf_runtime.mxml
(original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/SWFs/comps/button_swf_runtime.mxml
Thu Sep 13 17:45:00 2012
@@ -17,7 +17,59 @@
   limitations under the License.
 
 -->
-<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml">	
+<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" currentStateChange="currentStateChangeHandler(event)">

+    <mx:Script>
+        <![CDATA[    	     
+            import flash.events.IEventDispatcher;
+
+            private function currentStateChangeHandler(event:Event):void
+            {
+                 checkIfImageLoaded();
+            }
+ 
+            private function completeHandler(event:Event):void
+            {
+                checkIfImageLoaded();
+            }
+            
+            // For the runtime SWF tests we want also want to know the image is loaded even
+            // if it has already been loaded so we can wait on an event for every test.
+            private function checkIfImageLoaded():void
+            {
+                if (!parentApplication || !parentApplication.accordion_1 is IEventDispatcher)
+                    return;
+                
+                var loaded:Boolean = false;
+                
+                switch (currentState)
+                {
+                    case "over":
+                        if (overImage.bytesLoaded == overImage.bytesTotal)
+                            loaded = true;   
+                        break;
+                    case "selectedOver":
+                        if (selectedOverImage.bytesLoaded == selectedOverImage.bytesTotal)
+                            loaded = true;   
+                        break;
+                    case "down":
+                        if (downImage.bytesLoaded == downImage.bytesTotal)
+                            loaded = true;   
+                       break;
+                    case "selectedDown":
+                        if (selectedDownImage.bytesLoaded == selectedDownImage.bytesTotal)
+                            loaded = true;   
+                        break;
+                        
+                }
+                
+                if (loaded)
+                {
+                    var accordion_1:IEventDispatcher = IEventDispatcher(parentApplication.accordion_1);
+                    accordion_1.dispatchEvent(new Event(currentState + "ImageLoaded")); 
                                    
+                }
+             }
+        ]]>   
+    </mx:Script>
 	<mx:states>
 		<mx:State name="notBase">
 			<mx:RemoveChild target="{baseButton}"/>
@@ -25,40 +77,48 @@
 		<mx:State name="up" />
 		<mx:State name="over" basedOn="notBase">
 			<mx:AddChild creationPolicy="all">
-				<mx:Image source="../../../../Assets/Images/ButtonImages/buttonOver.swf" maintainAspectRatio="false"
width="100%" height="100%"/> 
+				<mx:Image id="overImage" source="../../../../Assets/Images/ButtonImages/buttonOver.swf"

+                    complete="completeHandler(event)" maintainAspectRatio="false" width="100%"
height="100%"/> 
 			</mx:AddChild>
 		</mx:State>
 		<mx:State name="down" basedOn="notBase">
 			<mx:AddChild creationPolicy="all">
-				<mx:Image source="../../../../Assets/Images/ButtonImages/buttonDown.swf" maintainAspectRatio="false"
width="100%" height="100%"/> 
+				<mx:Image id="downImage" source="../../../../Assets/Images/ButtonImages/buttonDown.swf"

+                          complete="completeHandler(event)" maintainAspectRatio="false" width="100%"
height="100%"/> 
 			</mx:AddChild>
 		</mx:State>
 		<mx:State name="disabled" basedOn="notBase">
 			<mx:AddChild creationPolicy="all">
-				<mx:Image source="../../../../Assets/Images/ButtonImages/buttonDisabled.swf" maintainAspectRatio="false"
width="100%" height="100%"/> 
+				<mx:Image id="disabled" source="../../../../Assets/Images/ButtonImages/buttonDisabled.swf"

+                          maintainAspectRatio="false" width="100%" height="100%"/> 
 			</mx:AddChild>
 		</mx:State>
 		<mx:State name="selectedUp" basedOn="notBase">
 			<mx:AddChild creationPolicy="all">
-				<mx:Image source="../../../../Assets/Images/ButtonImages/buttonSelectedUp.swf" maintainAspectRatio="false"
width="100%" height="100%"/> 
+				<mx:Image id="selectedUp" source="../../../../Assets/Images/ButtonImages/buttonSelectedUp.swf"

+                          maintainAspectRatio="false" width="100%" height="100%"/> 
 			</mx:AddChild>
 		</mx:State>
 		<mx:State name="selectedOver" basedOn="notBase">
 			<mx:AddChild creationPolicy="all">
-				<mx:Image source="../../../../Assets/Images/ButtonImages/buttonSelectedOver.swf" maintainAspectRatio="false"
width="100%" height="100%"/> 
+				<mx:Image id="selectedOverImage" source="../../../../Assets/Images/ButtonImages/buttonSelectedOver.swf"

+                          complete="completeHandler(event)" maintainAspectRatio="false" width="100%"
height="100%"/> 
 			</mx:AddChild>
 		</mx:State>
 		<mx:State name="selectedDown" basedOn="notBase">
 			<mx:AddChild creationPolicy="all">
-				<mx:Image source="../../../../Assets/Images/ButtonImages/buttonSelectedDown.swf" maintainAspectRatio="false"
width="100%" height="100%"/> 
+				<mx:Image id="selectedDownImage" source="../../../../Assets/Images/ButtonImages/buttonSelectedDown.swf"

+                          complete="completeHandler(event)" maintainAspectRatio="false" width="100%"
height="100%"/> 
 			</mx:AddChild>
 		</mx:State>
 		<mx:State name="selectedDisabled" basedOn="notBase">
 			<mx:AddChild creationPolicy="all">
-				<mx:Image source="../../../../Assets/Images/ButtonImages/buttonSelectedDown.swf" maintainAspectRatio="false"
width="100%" height="100%"/> 
+				<mx:Image id="selectedDisabled" source="../../../../Assets/Images/ButtonImages/buttonSelectedDown.swf"

+                          maintainAspectRatio="false" width="100%" height="100%"/> 
 			</mx:AddChild>
 		</mx:State>
 	</mx:states>
 		
-	<mx:Image id="baseButton" source="../../../../Assets/Images/ButtonImages/buttonUp.swf"
maintainAspectRatio="false"  width="100%" height="100%"/>
+	<mx:Image id="baseButton" source="../../../../Assets/Images/ButtonImages/buttonUp.swf"

+              maintainAspectRatio="false"  width="100%" height="100%"/>
 </mx:Canvas>
\ No newline at end of file

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/Accordion_SkinStates_Basic_Spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/Accordion_SkinStates_Basic_Spark.mxml?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/Accordion_SkinStates_Basic_Spark.mxml
(original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/Accordion_SkinStates_Basic_Spark.mxml
Thu Sep 13 17:45:00 2012
@@ -452,9 +452,10 @@
         <TestCase testID="Accordion_Styles_SkinStates_runtime_SWF_mouseOver_selectedTab"
keywords="[enabled, SkinStates,runtimeSWF, Accordion]" >
             <setup>
                 <ResetComponent target="accordion_1" className="AccordionComp2"  waitEvent="updateComplete"
waitTarget="accordion_1"/>
-
+                 
                 <SetStyle target="accordion_1" styleName="headerStyleName" value="myAccordionSWFRunTime"
waitEvent="updateComplete" waitTarget="accordion_1" />
-                <DispatchMouseEvent type="rollOver" localX="10" localY="10" target="accordion_1"
waitEvent="rollOver" waitTarget="accordion_1" />
+                <DispatchMouseEvent type="rollOver" localX="10" localY="10" target="accordion_1"
waitEvent="selectedOverImageLoaded" waitTarget="accordion_1" />
+                <!--WaitForEvent eventName="selectedOverImageLoaded" target="accordion_1"
numExpectedEvents="1"/-->
                 <WaitForEffectsToEnd />
             </setup>
             <body>
@@ -467,7 +468,8 @@
                 <ResetComponent target="accordion_1" className="AccordionComp2"  waitEvent="updateComplete"
waitTarget="accordion_1"/>
 
                 <SetStyle target="accordion_1" styleName="headerStyleName" value="myAccordionSWFRunTime"
waitEvent="updateComplete" waitTarget="accordion_1" />
-                <DispatchMouseEvent type="rollOver" localX="10" localY="82" target="accordion_1"
waitEvent="rollOver" waitTarget="accordion_1" />
+                <DispatchMouseEvent type="rollOver" localX="10" localY="82" target="accordion_1"
waitEvent="overImageLoaded" waitTarget="accordion_1" />
+                <!--WaitForEvent eventName="overImageLoaded" target="accordion_1"/-->
                 <WaitForEffectsToEnd />
             </setup>
             <body>
@@ -481,7 +483,8 @@
 
                 <SetStyle target="accordion_1" styleName="headerStyleName" value="myAccordionSWFRunTime"
waitEvent="updateComplete" waitTarget="accordion_1" />
                 <DispatchMouseEvent type="rollOver" localX="10" localY="10" target="accordion_1"
waitEvent="rollOver" waitTarget="accordion_1" />
-                <DispatchMouseEvent type="mouseDown" localX="10" localY="10" target="accordion_1"
waitEvent="mouseDown" waitTarget="accordion_1" />
+                <DispatchMouseEvent type="mouseDown" localX="10" localY="10" target="accordion_1"
waitEvent="selectedDownImageLoaded" waitTarget="accordion_1" />
+                <!--WaitForEvent eventName="selectedDownImageLoaded" target="accordion_1"/-->
                 <WaitForEffectsToEnd />
             </setup>
             <body>
@@ -495,7 +498,8 @@
 
                 <SetStyle target="accordion_1" styleName="headerStyleName" value="myAccordionSWFRunTime"
waitEvent="updateComplete" waitTarget="accordion_1" />
                 <DispatchMouseEvent type="rollOver" localX="10" localY="82" target="accordion_1"
waitEvent="rollOver" waitTarget="accordion_1" />
-                <DispatchMouseEvent type="mouseDown" localX="10" localY="82" target="accordion_1"
waitEvent="mouseDown" waitTarget="accordion_1" />
+                <DispatchMouseEvent type="mouseDown" localX="10" localY="82" target="accordion_1"
waitEvent="downImageLoaded" waitTarget="accordion_1" />
+                <!--WaitForEvent eventName="downImageLoaded" target="accordion_1"/-->
                 <WaitForEffectsToEnd />
             </setup>
             <body>

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_Disabled_SWF.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_Disabled_SWF.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_Disabled_SWF_air.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_Disabled_SWF_air.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_air.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_air.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseDown_NonselectedTab.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseDown_NonselectedTab.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseDown_NonselectedTab_air.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseDown_NonselectedTab_air.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseDown_selectedTab.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseDown_selectedTab.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseDown_selectedTab_air.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseDown_selectedTab_air.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseOver_NonselectedTab.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseOver_NonselectedTab.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseOver_NonselectedTab_air.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseOver_NonselectedTab_air.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseOver_selectedTab.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseOver_selectedTab.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseOver_selectedTab_air.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_Embeding_SWF_mouseOver_selectedTab_air.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF_mouseDown_NonselectedTab.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF_mouseDown_NonselectedTab.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF_mouseDown_selectedTab.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF_mouseDown_selectedTab.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF_mouseOver_NonselectedTab.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF_mouseOver_NonselectedTab.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF_mouseOver_selectedTab.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/containers/Accordion/Styles/baselines/spark/Accordion_Styles_SkinStates_runtime_SWF_mouseOver_selectedTab.png?rev=1384430&r1=1384429&r2=1384430&view=diff
==============================================================================
Binary files - no diff available.



Mime
View raw message