incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r1370009 [34/34] - in /incubator/flex/trunk/mustella/tests/apollo: ./ DragManager/ DragManager/SWFs/ DragManager/SWFs/assets/ DragManager/SWFs/comps/ DragManager/Spark/ DragManager/Spark/baselines/ FileComboBox/ FileComboBox/SWFs/ FileCombo...
Date Mon, 06 Aug 2012 20:51:43 GMT
Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mirroring_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mirroring_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mirroring_tests.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mirroring_tests.mxml
Mon Aug  6 20:51:08 2012
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/styles/"  
+    xmlns:mx="http://www.adobe.com/2006/mxml" 
+    xmlns="*" 
+    testSWF="wa_mirroring.mxml">
+	
+<!-- this set of lines form a template that must be in each unit test -->
+	
+    <mx:Script>
+	<![CDATA[
+	public static function init(o:DisplayObject):void
+	{
+	}
+	]]>
+    </mx:Script>
+    <mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+    </mx:Metadata>
+	<!-- end of set of lines that must be in each unit test -->
+
+    <mx:Script>
+	<![CDATA[
+	 import mx.core.FlexGlobals;
+	 import spark.components.Window;
+	 import spark.components.TextArea;
+	
+	]]>
+    </mx:Script>
+
+    <testCases>
+	<!-- 
+	========================================================
+	Test styles set via setStyle().
+	========================================================
+	-->
+
+	<!-- 
+	================================
+	Mac
+	================================
+	-->
+
+	<!-- SDK-25881 -->
+	<TestCase testID="styles_mirroring_mac_test1" keywords="[WindowedApplication,Mirroring]"
description="Check position of all SparkChromeWindowedApplicationSkin components when rtl.">

+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+        </setup>
+        <body>
+            <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+	
+	<TestCase testID="styles_mirroring_mac_test2" keywords="[WindowedApplication,Mirroring]"
description="Change to ltr and check.">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+        </setup>
+        <body>
+			<SetStyle target="" styleName="direction" value="ltr" />
+			<SetStyle target="" styleName="layoutDirection" value="ltr" waitEvent="updateComplete"
/>
+            <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+	
+	<TestCase testID="styles_mirroring_mac_test3" keywords="[WindowedApplication,Mirroring]"
description="Change to rtl and check again.">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+        </setup>
+        <body>
+			<SetStyle target="" styleName="direction" value="ltr" />
+			<SetStyle target="" styleName="layoutDirection" value="ltr" waitEvent="updateComplete"
/>
+			<SetStyle target="" styleName="direction" value="rtl" />
+			<SetStyle target="" styleName="layoutDirection" value="rtl" waitEvent="updateComplete"
/>
+            <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="styles_mirroring_mac_test4" keywords="[WindowedApplication,Mirroring]"
description="Change layoutDirection and direction with states.">	
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+        </setup>
+        <body>
+			<SetProperty target="" propertyName="currentState" value="state2" waitEvent="updateComplete"
/>
+            <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="styles_mirroring_mac_test5" keywords="[WindowedApplication,Mirroring]"
description="Resize smaller">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+        </setup>
+        <body>
+			<SetProperty target="nativeWindow" propertyName="width" value="700" />
+			<SetProperty target="nativeWindow" propertyName="height" value="400" waitTarget=""
waitEvent="resize" />
+            <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="styles_mirroring_mac_test6" keywords="[WindowedApplication,Mirroring]"
description="Resize larger">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+        </setup>
+        <body>
+			<SetProperty target="nativeWindow" propertyName="width" value="900" />
+			<SetProperty target="nativeWindow" propertyName="height" value="700" waitTarget=""
waitEvent="resize" />
+            <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<!-- 
+	================================
+	Win
+	================================
+	-->
+
+	<TestCase testID="styles_mirroring_win_test1" keywords="[WindowedApplication,Mirroring]"
description="Check position of all SparkChromeWindowedApplicationSkin components when rtl.">

+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+        </setup>
+        <body>
+            <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+	
+	<TestCase testID="styles_mirroring_win_test2" keywords="[WindowedApplication,Mirroring]"
description="Change to ltr and check.">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+        </setup>
+        <body>
+			<SetStyle target="" styleName="direction" value="ltr" />
+			<SetStyle target="" styleName="layoutDirection" value="ltr" waitEvent="updateComplete"
/>
+            <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+	
+	<TestCase testID="styles_mirroring_win_test3" keywords="[WindowedApplication,Mirroring]"
description="Change to rtl and check again.">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+        </setup>
+        <body>
+			<SetStyle target="" styleName="direction" value="ltr" />
+			<SetStyle target="" styleName="layoutDirection" value="ltr" waitEvent="updateComplete"
/>
+			<SetStyle target="" styleName="direction" value="rtl" />
+			<SetStyle target="" styleName="layoutDirection" value="rtl" waitEvent="updateComplete"
/>
+            <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="styles_mirroring_win_test4" keywords="[WindowedApplication,Mirroring]"
description="Change layoutDirection and direction with states.">	
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+        </setup>
+        <body>
+			<SetProperty target="" propertyName="currentState" value="state2" waitEvent="updateComplete"
/>
+            <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="styles_mirroring_win_test5" keywords="[WindowedApplication,Mirroring]"
description="Resize smaller">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+        </setup>
+        <body>
+			<SetProperty target="nativeWindow" propertyName="width" value="700" />
+			<SetProperty target="nativeWindow" propertyName="height" value="400" waitTarget=""
waitEvent="resize" />
+            <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="styles_mirroring_win_test6" keywords="[WindowedApplication,Mirroring]"
description="Resize larger">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+        </setup>
+        <body>
+			<SetProperty target="nativeWindow" propertyName="width" value="900" />
+			<SetProperty target="nativeWindow" propertyName="height" value="700" waitTarget=""
waitEvent="resize" />
+            <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+    </testCases>
+
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mxml_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mxml_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mxml_tests.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_mxml_tests.mxml
Mon Aug  6 20:51:08 2012
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/styles/"  
+xmlns:mx="http://www.adobe.com/2006/mxml" 
+xmlns:custom="assets.*"
+xmlns="*" 
+testSWF="wa_styles_mxml.mxml">
+	
+<!-- this set of lines form a template that must be in each unit test -->
+	
+    <mx:Script>
+	<![CDATA[
+	public static function init(o:DisplayObject):void
+	{
+	}
+	]]>
+    </mx:Script>
+    <mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+    </mx:Metadata>
+	<!-- end of set of lines that must be in each unit test -->
+
+    <mx:Script>
+	<![CDATA[
+	 import mx.core.*;
+	 import spark.components.Window;
+	 import spark.components.TextArea;
+	
+	]]>
+    </mx:Script>
+
+    <testCases>
+
+    <!--
+        Normally we do not use ResetComponent with MXML-only tests.
+        However, we are calling ResetComponent on a component in the
+        app, not on the object being tested.
+    -->
+
+	<TestCase testID="style_baseColor_mxml_test1" keywords="[WindowedApplication,style,baseColor]"
description="Set baseColor with setStyle().">
+        <body>
+            <CompareBitmap target="group1.btn1" url="../styles/baselines/$testID.png"
/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="style_contentBackgroundColor_mxml_test1" keywords="[WindowedApplication,style,contentBackgroundColor]"
description="Set contentBackgroundColor with setStyle().">
+        <body>
+            <CompareBitmap target="group1.ta1" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="style_focusColor_mxml_test1" keywords="[WindowedApplication,style,focusColor]"
description="Set focusColor with setStyle().">
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.group1.btn1.focusManager.setFocus(FlexGlobals.topLevelApplication.group1.btn1);
FlexGlobals.topLevelApplication.group1.btn1.focusManager.showFocus()" />
+            <CompareBitmap target="group1" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="style_rollOverColor_mxml_test1" keywords="[WindowedApplication,style,rollOverColor]"
description="Set rollOverColor with setStyle().">
+        <body>
+    		<DispatchMouseEvent type="rollOver" target="group1.dg1.mx_internal:rendererArray.2.0"
localX="2" localY="2" />
+            <DispatchMouseEvent type="mouseMove" target="group1.dg1.mx_internal:rendererArray.2.0"
localX="2" localY="2"  />
+            <WaitForEffectsToEnd />
+            <CompareBitmap target="group1.dg1" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+
+	<TestCase testID="style_symbolColor_mxml_test1" keywords="[WindowedApplication,style,symbolColor]"
description="Set symbolColor with setStyle().">
+        <body>
+            <CompareBitmap target="group1.ck1" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+    </testCases>
+
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_skinClass1_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_skinClass1_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_skinClass1_tests.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_skinClass1_tests.mxml
Mon Aug  6 20:51:08 2012
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/styles/"  xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*" testSWF="wa_app2.mxml">
+
+	<!-- this set of lines form a template that must be in each unit test -->
+	<mx:Script>
+	<![CDATA[
+	public static function init(o:DisplayObject):void
+	{
+	}
+	]]>
+	</mx:Script>
+	<mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+	</mx:Metadata>
+	<!-- end of set of lines that must be in each unit test -->
+
+	<mx:Script>
+	<![CDATA[
+
+        import assets.*;
+        import mx.core.FlexGlobals;
+        import spark.components.*;
+        import spark.skins.spark.*;
+
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+<!--
+========================================================
+skinClass style
+Just set and get Flex's two and a custom one.
+========================================================
+-->
+
+<TestCase testID="skinClass_test1" keywords="[WindowedApplication,skinClass]" description="WindowedApplicationSkin."
>
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+    </setup>
+    <body>
+        <AssertStyleValue target="" styleName="skinClass" valueExpression="value = '[class
WindowedApplicationSkin]'" />
+        <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+    </body>
+</TestCase>
+
+<TestCase testID="skinClass_test2_mac" keywords="[WindowedApplication,skinClass]" description="SparkChromeWindowedApplicationSkin."
>
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+    </setup>
+    <body>
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin"
waitEvent="updateComplete" />
+        <AssertStyleValue target="" styleName="skinClass" valueExpression="value = '[class
SparkChromeWindowedApplicationSkin]'" />
+        <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+    </body>
+</TestCase>
+
+<TestCase testID="skinClass_test2_win" keywords="[WindowedApplication,skinClass]" description="SparkChromeWindowedApplicationSkin."
>
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+    </setup>
+    <body>
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin"
waitEvent="updateComplete" />
+        <AssertStyleValue target="" styleName="skinClass" valueExpression="value = '[class
SparkChromeWindowedApplicationSkin]'" />
+        <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+    </body>
+</TestCase>
+
+<TestCase testID="skinClass_test3_mac" keywords="[WindowedApplication,skinClass]" description="Custom
skin." >
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+    </setup>
+    <body>
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SkinTest1"
waitEvent="updateComplete" />
+        <AssertStyleValue target="" styleName="skinClass" valueExpression="value = '[class
SkinTest1]'" />
+        <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+    </body>
+</TestCase>
+
+<TestCase testID="skinClass_test3_win" keywords="[WindowedApplication,skinClass]" description="Custom
skin." >
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+    </setup>
+    <body>
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SkinTest1"
waitEvent="updateComplete" />
+        <AssertStyleValue target="" styleName="skinClass" valueExpression="value = '[class
SkinTest1]'" />
+        <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+    </body>
+</TestCase>
+
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_skinClass2_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_skinClass2_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_skinClass2_tests.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_skinClass2_tests.mxml
Mon Aug  6 20:51:08 2012
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/styles/"  xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*" testSWF="wa_styles_skinClass2.mxml">
+
+	<!-- this set of lines form a template that must be in each unit test -->
+	<mx:Script>
+	<![CDATA[
+	public static function init(o:DisplayObject):void
+	{
+	}
+	]]>
+	</mx:Script>
+	<mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+	</mx:Metadata>
+	<!-- end of set of lines that must be in each unit test -->
+
+	<mx:Script>
+	<![CDATA[
+
+        import assets.*;
+        import mx.core.FlexGlobals;
+        import spark.components.*;
+        import spark.skins.spark.*;
+
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+<!--
+========================================================
+skinClass style
+We need a separate file for these two due to bug
+SDK-21916: Setting a style via styleName does not work
+if the style has already been explicitly set via 
+setStyle().
+========================================================
+-->
+
+<TestCase testID="skinClass_test4" keywords="[WindowedApplication,skinClass]" description="CSS."
>
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+    </setup>
+    <body>
+        <SetProperty target="" propertyName="styleName" value="testSyle2" waitEvent="updateComplete"
/>
+        <SetProperty target="" propertyName="styleName" value="testSyle1" waitEvent="updateComplete"
/>
+        <AssertStyleValue target="" styleName="skinClass" valueExpression="value = '[class
WindowedApplicationSkin]'" />
+        <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+    </body>
+</TestCase>
+
+<TestCase testID="skinClass_test5_mac" keywords="[WindowedApplication,skinClass]" description="CSS."
>
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+    </setup>
+    <body>    
+        <SetProperty target="" propertyName="styleName" value="testStyle1" />
+        <SetProperty target="" propertyName="styleName" value="testStyle2" waitEvent="updateComplete"
/>
+        <AssertStyleValue target="" styleName="skinClass" valueExpression="value = '[class
SparkChromeWindowedApplicationSkin]'" />
+        <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+    </body>
+</TestCase>
+
+<TestCase testID="skinClass_test5_win" keywords="[WindowedApplication,skinClass]" description="CSS."
>
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+    </setup>
+    <body>
+        <SetProperty target="" propertyName="styleName" value="testStyle1" />
+        <SetProperty target="" propertyName="styleName" value="testStyle2" waitEvent="updateComplete"
/>
+        <AssertStyleValue target="" styleName="skinClass" valueExpression="value = '[class
SparkChromeWindowedApplicationSkin]'" />
+        <CompareBitmap target="" url="../styles/baselines/$testID.png" />
+    </body>
+</TestCase>
+
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_tests.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/styles/wa_styles_tests.mxml
Mon Aug  6 20:51:08 2012
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/styles/"  
+    xmlns:mx="http://www.adobe.com/2006/mxml" 
+    xmlns="*" 
+    testSWF="wa_app2.mxml">
+	
+<!-- this set of lines form a template that must be in each unit test -->
+	
+    <mx:Script>
+	<![CDATA[
+	public static function init(o:DisplayObject):void
+	{
+	}
+	]]>
+    </mx:Script>
+    <mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+    </mx:Metadata>
+	<!-- end of set of lines that must be in each unit test -->
+
+    <mx:Script>
+	<![CDATA[
+	 import mx.core.FlexGlobals;
+	 import spark.components.Window;
+	 import spark.components.TextArea;
+	
+	]]>
+    </mx:Script>
+
+    <testCases>
+	<!-- 
+	========================================================
+	Test styles set via setStyle().
+	========================================================
+	-->
+
+	<TestCase testID="style_symbolColor_test1" keywords="[WindowedApplication,style,symbolColor]"
description="Set symbolColor with setStyle().">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+            <ResetComponent target="group1" className="custom.GroupWithComponents" />
+            <SetProperty target="group1" propertyName="visible" value="true" waitEvent="show"
/>
+        </setup>
+        <body>
+            <SetStyle target="" styleName="symbolColor" value="0xffff00" waitTarget="group1.ck1"
waitEvent="updateComplete" />
+            <CompareBitmap target="group1.ck1" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="style_baseColor_test1" keywords="[WindowedApplication,style,baseColor]"
description="Set baseColor with setStyle().">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+            <ResetComponent target="group1" className="custom.GroupWithComponents" />
+            <SetProperty target="group1" propertyName="visible" value="true" waitEvent="show"
/>
+        </setup>
+        <body>
+            <SetStyle target="" styleName="chromeColor" value="0x008800" waitTarget="group1.btn1"
waitEvent="updateComplete" />
+            <CompareBitmap target="group1.btn1" url="../styles/baselines/$testID.png"
/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="style_contentBackgroundColor_test1" keywords="[WindowedApplication,style,contentBackgroundColor]"
description="Set contentBackgroundColor with setStyle().">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+            <ResetComponent target="group1" className="custom.GroupWithComponents" />
+            <SetProperty target="group1" propertyName="visible" value="true" waitEvent="show"
/>
+        </setup>
+        <body>
+            <SetStyle target="" styleName="contentBackgroundColor" value="0x000088" waitTarget="group1.ta1"
waitEvent="updateComplete" />
+            <CompareBitmap target="group1.ta1" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="style_focusColor_test1" keywords="[WindowedApplication,style,focusColor]"
description="Set focusColor with setStyle().">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+            <ResetComponent target="group1" className="custom.GroupWithComponents" />
+            <SetProperty target="group1" propertyName="visible" value="true" waitEvent="show"
/>
+        </setup>
+        <body>
+            <SetStyle target="" styleName="focusColor" value="0xff0000" />
+            <RunCode code="FlexGlobals.topLevelApplication.group1.btn1.focusManager.setFocus(FlexGlobals.topLevelApplication.group1.btn1);
FlexGlobals.topLevelApplication.group1.btn1.focusManager.showFocus()" waitTarget="" waitEvent="updateComplete"
/>
+            <CompareBitmap target="group1" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="style_rollOverColor_test1" keywords="[WindowedApplication,style,rollOverColor]"
description="Set rollOverColor with setStyle().">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+            <ResetComponent target="group1" className="custom.GroupWithComponents" />
+            <SetProperty target="group1" propertyName="visible" value="true" waitEvent="show"
/>
+        </setup>
+        <body>
+            <SetStyle target="" styleName="rollOverColor" value="0x00ff00" />
+    		<DispatchMouseEvent type="rollOver" target="group1.dg1.mx_internal:rendererArray.2.0"
localX="2" localY="2" waitEvent="updateComplete"/>
+            <DispatchMouseEvent type="mouseMove" target="group1.dg1.mx_internal:rendererArray.2.0"
localX="2" localY="2"  />
+            <WaitForEffectsToEnd />
+            <CompareBitmap target="group1.dg1" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="style_selectionColor_test1" keywords="[WindowedApplication,style,selectionColor]"
description="Set selectionColor with setStyle().">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete"
/>
+            <ResetComponent target="group1" className="custom.GroupWithComponents" />
+            <SetProperty target="group1" propertyName="visible" value="true" waitEvent="show"
/>
+        </setup>
+        <body>
+            <SetStyle target="" styleName="selectionColor" value="0x00ffff" />
+    		<DispatchMouseClickEvent target="group1.dg1.mx_internal:rendererArray.2.0" localX="2"
localY="2" waitTarget="group1.dg1" waitEvent="itemClick"/>
+            <CompareBitmap target="group1.dg1" url="../styles/baselines/$testID.png" />
+	    </body>
+	</TestCase>
+
+    </testCases>
+
+</UnitTester>



Mime
View raw message