You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cf...@apache.org on 2012/09/18 21:20:16 UTC

svn commit: r1387329 - in /incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles: ./ baselines/

Author: cframpton
Date: Tue Sep 18 19:20:16 2012
New Revision: 1387329

URL: http://svn.apache.org/viewvc?rev=1387329&view=rev
Log:
Fix up timing errors with loading swfs at runtime.

Modified:
    incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/TabBar_Styles_SkinStates.mxml
    incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/TabBar_Styles_SkinStates_Spark.mxml
    incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_Disabled_SWF.png
    incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseDown_NonselectedTab.png
    incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseDown_selectedTab.png
    incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseOver_NonselectedTab.png
    incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseOver_selectedTab.png

Modified: incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/TabBar_Styles_SkinStates.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/TabBar_Styles_SkinStates.mxml?rev=1387329&r1=1387328&r2=1387329&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/TabBar_Styles_SkinStates.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/TabBar_Styles_SkinStates.mxml Tue Sep 18 19:20:16 2012
@@ -435,7 +435,9 @@
                 <RunCode code="addData(0);" />
                 <SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" waitEvent="updateComplete" waitTarget="tb" /> 
                 <DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" /> 
+                <WaitForEvent eventName="complete" target="tb.getChildAt(0).getChildAt(0).overImage" timeout="10000"/> 
                 <WaitForEffectsToEnd />
+                <WaitForLayoutManager />
             </setup>
             <body>
                 <CompareBitmap target="tb" url="../Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseOver_selectedTab.png" timeout="5000" />
@@ -446,34 +448,44 @@
                 <ResetComponent target="tb" className="mx.controls.TabBar"  waitEvent="updateComplete" waitTarget="tb"/>
                 <RunCode code="addData(0);" />
                 <SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" waitEvent="updateComplete" waitTarget="tb" /> 
-                <DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" /> 
+                <DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver"/> 
+                <WaitForEvent eventName="complete" target="tb.getChildAt(1).getChildAt(0).overImage"/> 
                 <WaitForEffectsToEnd />
+                <WaitForLayoutManager />
             </setup>
             <body>
                 <CompareBitmap target="tb" url="../Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseOver_NonselectedTab.png" timeout="5000" />
             </body>
         </TestCase>     
+        <!-- TabBars select the tab on mouse down instead of click. -->
         <TestCase testID="TabBar_Styles_SkinStates_runtime_SWF_mouseDown_selectedTab" keywords="[enabled, SkinStates,runtimeSWF, TabBar]" >
             <setup>
                 <ResetComponent target="tb" className="mx.controls.TabBar"  waitEvent="updateComplete" waitTarget="tb"/>
                 <RunCode code="addData(0);" />
                 <SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" waitEvent="updateComplete" waitTarget="tb" /> 
                 <DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" /> 
-                <DispatchMouseEvent type="mouseDown" localX="10" localY="10" target="tb" waitEvent="mouseDown" waitTarget="tb" /> 
+                <!-- don't wait for mouse up event so we don't miss the complete event -->
+                <DispatchMouseEvent type="mouseDown" localX="10" localY="10" target="tb"/> 
+                <WaitForEvent eventName="complete" target="tb.getChildAt(0).getChildAt(0).selectedUpImage" /> 
                 <WaitForEffectsToEnd />
+                <WaitForLayoutManager />
             </setup>
             <body>
                 <CompareBitmap target="tb" url="../Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseDown_selectedTab.png" timeout="5000" />
             </body>
         </TestCase>
+        <!-- TabBars select the tab on mouse down instead of click. -->
         <TestCase testID="TabBar_Styles_SkinStates_runtime_SWF_mouseDown_NonselectedTab" keywords="[enabled, SkinStates,runtimeSWF, TabBar]" >
             <setup>
                 <ResetComponent target="tb" className="mx.controls.TabBar"  waitEvent="updateComplete" waitTarget="tb"/>
                 <RunCode code="addData(0);" />
                 <SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" waitEvent="updateComplete" waitTarget="tb" /> 
                 <DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" /> 
-                <DispatchMouseEvent type="mouseDown" localX="100" localY="9" target="tb" waitEvent="mouseDown" waitTarget="tb" /> 
+                <!-- don't wait for mouse up event so we don't miss the complete event -->
+                <DispatchMouseEvent type="mouseDown" localX="100" localY="9" target="tb"/> 
+                <WaitForEvent eventName="complete" target="tb.getChildAt(1).getChildAt(0).selectedUpImage" /> 
                 <WaitForEffectsToEnd />
+                <WaitForLayoutManager />
             </setup>
             <body>
                 <CompareBitmap target="tb" url="../Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseDown_NonselectedTab.png" timeout="5000" />
@@ -484,8 +496,12 @@
                 <ResetComponent target="tb" className="mx.controls.TabBar"  waitEvent="updateComplete" waitTarget="tb"/>
                 <RunCode code="addData(0);" />
                 <SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" waitEvent="updateComplete" waitTarget="tb" /> 
-                <SetProperty target="tb" propertyName="enabled" value="false" waitEvent="updateComplete" waitTarget="tb"/>
+                <!-- don't wait for the updateComplete event so we don't miss the complete event for the load of the first tab -->
+                <SetProperty target="tb" propertyName="enabled" value="false"/>
+                <WaitForEvent eventName="complete" target="tb.getChildAt(0).getChildAt(0).disabledImage" /> 
+                <!-- need to wait for all three tabs to load the disabledImage -->
                 <WaitForEffectsToEnd />
+                <WaitForLayoutManager />
             </setup>
             <body>
                 <CompareBitmap target="tb" url="../Styles/baselines/TabBar_Styles_SkinStates_runtime_Disabled_SWF.png" timeout="5000" />

Modified: incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/TabBar_Styles_SkinStates_Spark.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/TabBar_Styles_SkinStates_Spark.mxml?rev=1387329&r1=1387328&r2=1387329&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/TabBar_Styles_SkinStates_Spark.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/TabBar_Styles_SkinStates_Spark.mxml Tue Sep 18 19:20:16 2012
@@ -453,7 +453,6 @@
                 <ResetComponent target="tb" className="mx.controls.TabBar"  waitEvent="updateComplete" waitTarget="tb"/>
                 <RunCode code="addData(0);" />
                 <SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" waitEvent="updateComplete" waitTarget="tb" /> 
-                <RunCode code="trace('THIS IS THE OTHER TEST!', application.tb.getChildAt(2).getChildAt(0).overImage)"/> 
                 <DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" /> 
                 <WaitForEvent eventName="complete" target="tb.getChildAt(2).getChildAt(0).overImage" /> 
                 <WaitForEffectsToEnd />
@@ -502,7 +501,6 @@
                 <ResetComponent target="tb" className="mx.controls.TabBar"  waitEvent="updateComplete" waitTarget="tb"/>
                 <RunCode code="addData(0);" />
                 <SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" waitEvent="updateComplete" waitTarget="tb" /> 
-                <RunCode code="trace('THIS IS THE TEST!', application.tb.getChildAt(0).getChildAt(0))"/> 
                 <!-- don't wait for the updateComplete event so we don't miss the complete event for the load of the first tab -->
                 <SetProperty target="tb" propertyName="enabled" value="false"/>
                 <WaitForEvent eventName="complete" target="tb.getChildAt(0).getChildAt(0).disabledImage" /> 

Modified: incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_Disabled_SWF.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_Disabled_SWF.png?rev=1387329&r1=1387328&r2=1387329&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseDown_NonselectedTab.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseDown_NonselectedTab.png?rev=1387329&r1=1387328&r2=1387329&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseDown_selectedTab.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseDown_selectedTab.png?rev=1387329&r1=1387328&r2=1387329&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseOver_NonselectedTab.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseOver_NonselectedTab.png?rev=1387329&r1=1387328&r2=1387329&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseOver_selectedTab.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/components/TabBar/Styles/baselines/TabBar_Styles_SkinStates_runtime_SWF_mouseOver_selectedTab.png?rev=1387329&r1=1387328&r2=1387329&view=diff
==============================================================================
Binary files - no diff available.