incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r1369998 [9/9] - in /incubator/flex/trunk/mustella/tests/States: ./ CurrentSyntax/ CurrentSyntax/Clear/ CurrentSyntax/Dot/ CurrentSyntax/Events/ CurrentSyntax/ExcludeFrom/ CurrentSyntax/IncludeIn/ CurrentSyntax/IncludeIn/baselines/ CurrentS...
Date Mon, 06 Aug 2012 20:42:49 GMT
Added: incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/Properties/SetProperty_Properties.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/Properties/SetProperty_Properties.mxml?rev=1369998&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/Properties/SetProperty_Properties.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/Properties/SetProperty_Properties.mxml
Mon Aug  6 20:42:44 2012
@@ -0,0 +1,75 @@
+<?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="States/Flex3Syntax/SetProperty/Properties/"  xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*" testSWF="SetPropertyApp01.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.Application;
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+        <!-- The setup sets the app. to a ReinitState, then to the default state.  We
need to start each
+             test in a default state, but don't know if the previous test run left us in
that state or some other.
+             If it left us in the default state, then we can't reset to the default state
and then wait for some 
+             event, because the app. will be in that state and no event will occur.
+        -->
+
+        <!-- Name, target, and value are tested together. -->
+        <TestCase testID="SetProperty_01" keywords="[States,SetProperty]" description="SetProperty
changes text when changing from the default state to a new state.">
+            <setup>
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="ReinitState" waitTarget="{Application.application}" waitEvent="currentStateChange"
/>
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="" waitTarget="{Application.application}" waitEvent="currentStateChange" />
+            </setup>
+            <body>
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="SetProperty_01" waitTarget="{Application.application}" waitEvent="currentStateChange"
/>
+                <AssertPropertyValue target="tiSetProperty" propertyName="text" value="Changed"
/>
+            </body>
+        </TestCase>
+
+        <TestCase testID="SetProperty_02" keywords="[States,SetProperty]" description="SetProperty
changes a dataProvider when changing from the default state to a new state.">
+            <setup>
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="ReinitState" waitTarget="{Application.application}" waitEvent="currentStateChange"
/>
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="" waitTarget="{Application.application}" waitEvent="currentStateChange" />
+            </setup>
+            <body>
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="SetProperty_02" waitTarget="{Application.application}" waitEvent="currentStateChange"
/>
+                <AssertPropertyValue target="dgSetProperty.mx_internal:rendererArray.1.0"
propertyName="text" value="2" />
+            </body>
+        </TestCase>
+
+	</testCases>                	     
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/Properties/SetProperty_Properties_02.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/Properties/SetProperty_Properties_02.mxml?rev=1369998&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/Properties/SetProperty_Properties_02.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/Properties/SetProperty_Properties_02.mxml
Mon Aug  6 20:42:44 2012
@@ -0,0 +1,63 @@
+<?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="States/Flex3Syntax/SetProperty/Properties/"  
+    xmlns:mx="http://www.adobe.com/2006/mxml" 
+    xmlns="*" 
+    testSWF="SetPropertyApp02.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.Application;
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+        <TestCase testID="States_BindingStateName" keywords="[States,SetProperty]" description="CurrentState
changes based on the title of the Panel">
+            <setup>
+                <AssertPropertyValue target="{Application.application}" propertyName="currentState"
value="null"/>
+            </setup>
+            <body>
+                <DispatchMouseClickEvent target="p2" localX="10" localY="20" waitEvent="click"/>
+                <AssertPropertyValue target="{Application.application}" propertyName="currentState"
value="Two"/>
+                <DispatchMouseClickEvent target="p1" localX="10" localY="20" waitEvent="click"/>
+                <AssertPropertyValue target="{Application.application}" propertyName="currentState"
value="One"/>
+            </body>
+        </TestCase>
+
+
+
+	</testCases>                	     
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/Properties/SetProperty_Properties_03.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/Properties/SetProperty_Properties_03.mxml?rev=1369998&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/Properties/SetProperty_Properties_03.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/Properties/SetProperty_Properties_03.mxml
Mon Aug  6 20:42:44 2012
@@ -0,0 +1,89 @@
+<?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="States/Flex3Syntax/SetProperty/Properties/"  
+    xmlns:mx="http://www.adobe.com/2006/mxml" 
+    xmlns="*" 
+    testSWF="SetPropertyApp03.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.Application;
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+        <TestCase testID="States_MultiEventBinding" keywords="[States,SetProperty]" description="Test
two events bound to the same state">
+            <setup>                
+                <AssertPropertyValue target="{Application.application}" propertyName="currentState"
value="One"/>
+            </setup>
+            <body>
+                <DispatchKeyEvent key="TAB" waitEvent="focusIn" waitTarget="ns"/>	
		
+				<DispatchKeyEvent keys="[UP, UP]" />
+                <DispatchMouseClickEvent target="btn" localX="5" localY="5" waitEvent="click"/>
+                <AssertPropertyValue target="ns1count" propertyName="text" value="2"/>
+                <AssertPropertyValue target="ns2count" propertyName="text" value="0"/>
+				<AssertPropertyValue target="btn1count" propertyName="text" value="1"/>
+                <AssertPropertyValue target="btn2count" propertyName="text" value="0"/>
+                <DispatchKeyEvent keys="[TAB, TAB]" waitEvent="focusIn" waitTarget="ns"/>
			
+				<DispatchKeyEvent keys="[UP, UP]" />
+                <DispatchMouseClickEvent target="btn" localX="5" localY="5" waitEvent="click"/>
+                <AssertPropertyValue target="ns1count" propertyName="text" value="4"/>
+                <AssertPropertyValue target="ns2count" propertyName="text" value="0"/>
+				<AssertPropertyValue target="btn1count" propertyName="text" value="2"/>
+                <AssertPropertyValue target="btn2count" propertyName="text" value="0"/>
               
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="Two" waitEvent="currentStateChange"/>
+                <AssertPropertyValue target="{Application.application}" propertyName="currentState"
value="Two"/>
+				<DispatchKeyEvent keys="[TAB, TAB]" waitEvent="focusIn" waitTarget="ns"/>				
+				<DispatchKeyEvent keys="[UP, UP, UP]" />
+                <DispatchMouseClickEvent target="btn" localX="5" localY="5" waitEvent="click"/>
+                <AssertPropertyValue target="ns1count" propertyName="text" value="4"/>
+                <AssertPropertyValue target="ns2count" propertyName="text" value="3"/>
+				<AssertPropertyValue target="btn1count" propertyName="text" value="2"/>
+                <AssertPropertyValue target="btn2count" propertyName="text" value="1"/>
+                <DispatchKeyEvent keys="[TAB, TAB]" waitEvent="focusIn" waitTarget="ns"/>
			
+				<DispatchKeyEvent keys="[UP, UP]" />
+                <DispatchMouseClickEvent target="btn" localX="5" localY="5" waitEvent="click"/>
+                <AssertPropertyValue target="ns1count" propertyName="text" value="4"/>
+                <AssertPropertyValue target="ns2count" propertyName="text" value="5"/>
+				<AssertPropertyValue target="btn1count" propertyName="text" value="2"/>
+                <AssertPropertyValue target="btn2count" propertyName="text" value="2"/>
                                                
+            </body>
+        </TestCase>
+
+
+
+	</testCases>                	     
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/SWFs/SetPropertyApp01.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/SWFs/SetPropertyApp01.mxml?rev=1369998&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/SWFs/SetPropertyApp01.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/SWFs/SetPropertyApp01.mxml
Mon Aug  6 20:42:44 2012
@@ -0,0 +1,82 @@
+<?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.
+
+-->
+<mx:Application backgroundColor="0xFFFFFF"  width="800" height="600" xmlns:mx="http://www.adobe.com/2006/mxml"
>
+
+<mx:Script>
+<![CDATA[
+
+]]>
+</mx:Script>
+
+<!-- Embed fonts for cross platform compatibility of bitmap compares. -->
+<mx:Style>
+    @font-face {
+        src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+        fontFamily: EmbeddedVerdana;
+			embedAsCFF: false;
+    }
+
+    @font-face {
+        src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+        fontWeight: bold;
+        fontFamily: EmbeddedVerdana;
+			embedAsCFF: false;
+    }
+
+    @font-face {
+        src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+        fontStyle: italic;
+        fontFamily: EmbeddedVerdana;
+			embedAsCFF: false;
+    }
+    
+    global{
+        fontFamily: EmbeddedVerdana;
+        fontAntiAliasType: normal;
+    }
+</mx:Style>
+
+<!--
+    State naming convention: 
+        Method_Param_ControlBeingActedUpon_DetailsIfAny_Number
+-->
+
+<mx:states>
+    <mx:State name="ReinitState" />
+
+    <!-- Name, target, and value are tested together -->
+    <mx:State name="SetProperty_01">
+        <mx:SetProperty target="{tiSetProperty}" name="text" value="Changed" />
+    </mx:State>
+
+    <mx:State name="SetProperty_02">
+        <mx:SetProperty target="{dgSetProperty}" name="dataProvider" value="{ac}" />
+    </mx:State>        
+</mx:states>
+
+<mx:ArrayCollection id="ac" >
+    <mx:Object species="dog" age="2" />
+    <mx:Object species="cat" age="8" />
+</mx:ArrayCollection>
+
+<mx:TextInput id="tiSetProperty" text="Default" />
+<mx:DataGrid id="dgSetProperty" width="100" height="50" />
+
+</mx:Application>

Added: incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/SWFs/SetPropertyApp02.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/SWFs/SetPropertyApp02.mxml?rev=1369998&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/SWFs/SetPropertyApp02.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/SWFs/SetPropertyApp02.mxml
Mon Aug  6 20:42:44 2012
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="400">
+
+	<!-- Embed fonts for cross platform compatibility of bitmap compares. -->
+	<mx:Style>
+		@font-face {
+			src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+			fontFamily: EmbeddedVerdana;
+				embedAsCFF: false;
+		}
+
+		@font-face {
+			src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+			fontWeight: bold;
+			fontFamily: EmbeddedVerdana;
+				embedAsCFF: false;
+		}
+
+		@font-face {
+			src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+			fontStyle: italic;
+			fontFamily: EmbeddedVerdana;
+				embedAsCFF: false;
+		}
+
+		global{
+			fontFamily: EmbeddedVerdana;
+			fontAntiAliasType: normal;
+		}
+	</mx:Style>
+
+    <!-- Define the two view states, in addition to the base state.-->
+    <mx:states>
+        <mx:State name="{textOne.text}">
+            <mx:SetProperty target="{p1}" name="x" value="110"/>
+            <mx:SetProperty target="{p1}" name="y" value="0"/>
+            <mx:SetProperty target="{p1}" name="width" value="200"/>
+            <mx:SetProperty target="{p1}" name="height" value="210"/>
+            <mx:SetProperty target="{p2}" name="x" value="0"/>
+            <mx:SetProperty target="{p2}" name="y" value="0"/>
+            <mx:SetProperty target="{p2}" name="width" value="100"/>
+            <mx:SetProperty target="{p2}" name="height" value="100"/>
+            <mx:SetProperty target="{p3}" name="x" value="0"/>
+            <mx:SetProperty target="{p3}" name="y" value="110"/>
+            <mx:SetProperty target="{p3}" name="width" value="100"/>
+            <mx:SetProperty target="{p3}" name="height" value="100"/>
+        </mx:State>
+        <mx:State name="{textTwo.text}">
+            <mx:SetProperty target="{p2}" name="x" value="110"/>
+            <mx:SetProperty target="{p2}" name="y" value="0"/>
+            <mx:SetProperty target="{p2}" name="width" value="200"/>
+            <mx:SetProperty target="{p2}" name="height" value="210"/>
+            <mx:SetProperty target="{p3}" name="x" value="0"/>
+            <mx:SetProperty target="{p3}" name="y" value="110"/>
+            <mx:SetProperty target="{p3}" name="width" value="100"/>
+            <mx:SetProperty target="{p3}" name="height" value="100"/>
+        </mx:State>
+    </mx:states>
+
+    <!-- Define the Canvas container holding the three Panel containers.-->
+    <mx:Canvas id="pm" width="100%" height="100%">
+        <mx:Panel id="p1" title="One" 
+                x="0" y="0" width="100" height="100"
+                click="currentState='One'">
+            <mx:Label fontSize="24" text="One"/>
+        </mx:Panel>
+        
+        <mx:Panel id="p2" title="Two" 
+                x="0" y="110" width="100" height="100"
+                click="currentState='Two'">
+            <mx:Label fontSize="24" text="Two"/>
+        </mx:Panel>
+        
+        <mx:Panel id="p3" title="Three" 
+                x="110" y="0" width="200" height="210" 
+                click="currentState=''">
+            <mx:Label fontSize="24" text="Three"/>
+        </mx:Panel>
+        
+    </mx:Canvas>
+
+    <mx:Text id="textOne" text="One"/>
+    <mx:Text id="textTwo" text="Two"/>
+</mx:Application>
\ No newline at end of file

Added: incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/SWFs/SetPropertyApp03.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/SWFs/SetPropertyApp03.mxml?rev=1369998&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/SWFs/SetPropertyApp03.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetProperty/SWFs/SetPropertyApp03.mxml
Mon Aug  6 20:42:44 2012
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
+				xmlns:mx="library://ns.adobe.com/flex/mx" 
+				xmlns:s="library://ns.adobe.com/flex/spark" 
+				width="400">
+	
+	<fx:Script>
+		<![CDATA[
+			
+			[Bindable] public var nsOneCount:Number = 0;
+			[Bindable] public var nsTwoCount:Number = 0;
+			[Bindable] public var btnOneCount:Number = 0;
+			[Bindable] public var btnTwoCount:Number = 0;
+			
+			public function nsModOne():void{
+				nsOneCount++;
+			}
+			
+			public function nsModTwo():void{
+				nsTwoCount++;
+			}
+			
+			public function btnModOne():void{
+				btnOneCount++;			
+			}						
+			
+			public function btnModTwo():void{
+				btnTwoCount++;				
+			}			
+		]]>
+	</fx:Script>
+		
+	<mx:states>
+		<mx:State name="One"/>		
+		<mx:State name="Two"/>					
+	</mx:states>
+	
+	<mx:NumericStepper id="ns" change.Two="nsModTwo()" change.One="nsModOne()"/>
+	<mx:Button id="btn" click="currentState='Two'" click.One="btnModOne()" click.Two="btnModTwo()"/>
+	
+	<mx:HBox>
+		<mx:Label id="ns1count" text="{nsOneCount}"/>
+		<mx:Label id="ns2count" text="{nsTwoCount}"/>		
+	</mx:HBox>
+
+	<mx:HBox>
+		<mx:Label id="btn1count" text="{btnOneCount}"/>
+		<mx:Label id="btn2count" text="{btnTwoCount}"/>		
+	</mx:HBox>
+	
+	<mx:Button label.One="Go to Two" label.Two="Go to One" click.One="currentState='Two'"
click.Two="currentState='One'"/>
+	
+	
+</mx:Application>
\ No newline at end of file

Added: incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetStyle/Properties/SetStyle_Properties.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetStyle/Properties/SetStyle_Properties.mxml?rev=1369998&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetStyle/Properties/SetStyle_Properties.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetStyle/Properties/SetStyle_Properties.mxml
Mon Aug  6 20:42:44 2012
@@ -0,0 +1,73 @@
+<?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="States/Flex3Syntax/SetStyle/Properties/"  xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*" testSWF="SetStyleApp01.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.Application;
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+        <!-- The setup sets the app. to a ReinitState, then to the default state.  We
need to start each
+             test in a default state, but don't know if the previous test run left us in
that state or some other.
+             If it left us in the default state, then we can't reset to the default state
and then wait for some 
+             event, because the app. will be in that state and no event will occur.
+        -->
+
+        <TestCase testID="SetStyle_01" keywords="[States,SetStyle]" description="SetStyle
changes a backgroundColor when changing from the default state to a new state.">
+            <setup>
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="ReinitState" waitTarget="{Application.application}" waitEvent="currentStateChange"
/>
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="" waitTarget="{Application.application}" waitEvent="currentStateChange" />
+            </setup>
+            <body>
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="SetStyle_01" waitTarget="{Application.application}" waitEvent="currentStateChange"
/>
+                <AssertPixelValue target="bxSetStyle" x="2" y="2" value="0x00ffff" />
+            </body>
+        </TestCase>
+
+        <TestCase testID="SetStyle_02" keywords="[States,SetStyle]" description="SetStyle
changes fillColors and fillAlphas when changing from the default state to a new state.">
+            <setup>
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="ReinitState" waitTarget="{Application.application}" waitEvent="currentStateChange"
/>
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="" waitTarget="{Application.application}" waitEvent="currentStateChange" />
+            </setup>
+            <body>
+                <SetProperty target="{Application.application}" propertyName="currentState"
value="SetStyle_02" waitTarget="{Application.application}" waitEvent="currentStateChange"
/>
+                <AssertPixelValue target="btnSetStyle" x="5" y="5" value="0x008888" />
+            </body>
+        </TestCase>
+	</testCases>                	     
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetStyle/SWFs/SetStyleApp01.compile
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetStyle/SWFs/SetStyleApp01.compile?rev=1369998&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetStyle/SWFs/SetStyleApp01.compile
(added)
+++ incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetStyle/SWFs/SetStyleApp01.compile
Mon Aug  6 20:42:44 2012
@@ -0,0 +1 @@
+ -theme=${flexlib}/themes/Halo/halo.swc

Added: incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetStyle/SWFs/SetStyleApp01.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetStyle/SWFs/SetStyleApp01.mxml?rev=1369998&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetStyle/SWFs/SetStyleApp01.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/States/Flex3Syntax/SetStyle/SWFs/SetStyleApp01.mxml
Mon Aug  6 20:42:44 2012
@@ -0,0 +1,79 @@
+<?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.
+
+-->
+<mx:Application backgroundColor="0xFFFFFF" backgroundImage="" width="800" height="600"
xmlns:mx="http://www.adobe.com/2006/mxml" >
+
+<mx:Script>
+<![CDATA[
+
+]]>
+</mx:Script>
+
+<!-- Embed fonts for cross platform compatibility of bitmap compares. -->
+<mx:Style>
+    @font-face {
+        src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+        fontFamily: EmbeddedVerdana;
+			embedAsCFF: false;
+    }
+
+    @font-face {
+        src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+        fontWeight: bold;
+        fontFamily: EmbeddedVerdana;
+			embedAsCFF: false;
+    }
+
+    @font-face {
+        src: url("../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+        fontStyle: italic;
+        fontFamily: EmbeddedVerdana;
+			embedAsCFF: false;
+    }
+    
+    global{
+        fontFamily: EmbeddedVerdana;
+        fontAntiAliasType: normal;
+    }
+</mx:Style>
+
+<!--
+    State naming convention: 
+        Method_Param_ControlBeingActedUpon_DetailsIfAny_Number
+-->
+
+<mx:states>
+    <mx:State name="ReinitState" />
+    
+    <!-- States for testing SetStyle -->
+    <mx:State name="SetStyle_01">
+        <mx:SetStyle target="{bxSetStyle}" name="backgroundColor" value="0x00ffff" />
+    </mx:State>
+
+    <mx:State name="SetStyle_02">
+        <mx:SetStyle target="{btnSetStyle}" name="fillColors" value="[0x008888,0x008888]"
/>
+        <mx:SetStyle target="{btnSetStyle}" name="fillAlphas" value="[1,1]" />
+    </mx:State>
+
+</mx:states>
+
+<mx:Box id="bxSetStyle" borderStyle="solid" borderThickness="1" width="10" height="10"
/>
+<mx:Button id="btnSetStyle" width="10" height="10" />
+
+</mx:Application>



Mime
View raw message