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 [21/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/Window/properties/window_properties_titleIcon_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_titleIcon_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_titleIcon_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_titleIcon_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,180 @@
+<?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/Window/properties/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="window_basic_flexchrome.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.*;
+        import spark.skins.spark.*;
+        import comps.*;
+ 	[Embed(source="../../../../../../Assets/Images/redrect.jpg")]
+	[Bindable]
+	public var smallSquare1:Class;
+
+	[Embed(source="../../../../../../Assets/Images/smallbluerect.jpg")]
+	[Bindable]
+	public var smallSquare2:Class;
+
+	[Embed(source="../../../../../../Assets/Images/redrect.jpg")]
+	[Bindable]
+	public var longRect1:Class;
+    
+        [Embed(source="../../../../../../Assets/Images/redrect.jpg")]
+    	[Bindable]
+	public var largeIcon:Class;
+    
+	]]>
+	</mx:Script>
+
+    <testCases>
+
+	<!--
+	========================================================
+	Test titleIcon
+	========================================================
+	-->
+	<TestCase testID="titleIcon_test1" keywords="[Window,titleIcon]" description="Set to something." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(PlainWindow,'window1')" waitTarget="" waitEvent="myWindowComplete"/>        
+	    </setup> 
+	    <body>
+		<SetProperty target="" propertyName="titleIcon" valueExpression="value =smallSquare1" waitEvent="updateComplete" />
+		<MyCompareBitmap target="windowObj.skin.titleBar" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="titleIcon_test2" keywords="[Window,titleIcon]" description="Set to something and change it." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(PlainWindow,'window1')" waitTarget="" waitEvent="myWindowComplete"/>        
+	    </setup> 
+	    <body>
+		<SetProperty target="" propertyName="titleIcon" valueExpression="value = smallSquare1" waitEvent="updateComplete" />
+		<SetProperty target="" propertyName="titleIcon" valueExpression="value = smallSquare2" waitEvent="updateComplete" />
+		<MyCompareBitmap target="windowObj.skin.titleBar" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="titleIcon_test3" keywords="[Window,titleIcon]" description="Set to something and remove it." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(PlainWindow,'window1')" waitTarget="" waitEvent="myWindowComplete"/>        
+	    </setup> 
+	    <body>
+		<SetProperty target="windowObj" propertyName="titleIcon" valueExpression="value = longRect1" waitEvent="updateComplete" />
+		<SetProperty target="windowObj" propertyName="titleIcon" valueExpression="value = null" waitEvent="updateComplete" />
+		<MyCompareBitmap target="windowObj.skin.titleBar" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="titleIcon_test4" keywords="[Window,titleIcon]" description="Set to something and change to a larger icon." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(PlainWindow,'window1')" waitTarget="" waitEvent="myWindowComplete"/>        
+	    </setup> 
+	    <body>
+		<SetProperty target="windowObj" propertyName="titleIcon" valueExpression="value = smallSquare1" waitEvent="updateComplete" />
+		<SetProperty target="windowObj" propertyName="titleIcon" valueExpression="value = longRect1" waitEvent="updateComplete" />
+		<MyCompareBitmap target="windowObj.skin.titleBar" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="titleIcon_test5" keywords="[Window,titleIcon]" description="Set to something and change to a smaller icon." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(PlainWindow,'window1')" waitTarget="" waitEvent="myWindowComplete"/>        
+	    </setup> 
+	    <body>
+		<SetProperty target="windowObj" propertyName="titleIcon" valueExpression="value =longRect1" waitEvent="updateComplete" />
+		<SetProperty target="windowObj" propertyName="titleIcon" valueExpression="value = smallSquare1" waitEvent="updateComplete" />
+		<MyCompareBitmap target="windowObj.skin.titleBar" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="titleIcon_test61" keywords="[Window,titleIcon]" description="Bindable" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithBindableSettings,'window1')" waitTarget="" waitEvent="myWindowComplete"/>        
+	    </setup> 
+	    <body>
+	       <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj.activate()" waitEvent="enterFrame" waitTarget="stage"/>
+	       <!-- verify should get default binded titleIcon -->
+		<MyCompareBitmap target="windowObj.skin.titleBar" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="titleIcon_test62" keywords="[Window,titleIcon]" description="Bindable" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithBindableSettings,'window1')" waitTarget="" waitEvent="myWindowComplete"/>        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.titleIconRef=longRect1" />
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<!-- verify the titleIcon now should be longRect1 -->
+		<MyCompareBitmap target="windowObj.skin.titleBar" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="titleIcon_test7" keywords="[Window,titleIcon]" description="Title truncates when switching to a longer icon." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithBindableSettings,'window1')" waitTarget="" waitEvent="myWindowComplete"/>        
+	    </setup> 
+	    <body>
+		<SetProperty target="windowObj" propertyName="title" value="The quick, brown fox jumps over the lazy dog. The quick, brown fox jumps over the lazy dog. The quick, brown fox jumps over the lazy dog. The quick, brown fox jumps over the lazy dog. The quick, brown fox jumps over the lazy dog. " waitEvent="updateComplete" />
+		<SetProperty target="windowObj" propertyName="titleIcon" valueExpression="value = longRect1" waitEvent="updateComplete" />
+		<MyCompareBitmap target="windowObj.skin.titleBar" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="titleIcon_test8" keywords="[Window,titleIcon]" description="large icon should be auto fit" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithBindableSettings,'window1')" waitTarget="" waitEvent="myWindowComplete"/>        
+	    </setup> 
+	    <body>
+		<SetProperty target="windowObj" propertyName="title" value="The quick, brown fox jumps over the lazy dog. The quick, brown fox jumps over the lazy dog. The quick, brown fox jumps over the lazy dog. The quick, brown fox jumps over the lazy dog. The quick, brown fox jumps over the lazy dog. " waitEvent="updateComplete" />
+		<SetProperty target="windowObj" propertyName="titleIcon" valueExpression="value = largeIcon" waitEvent="updateComplete" />
+		<MyCompareBitmap target="windowObj.skin.titleBar" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+	    </body>
+	</TestCase>
+	
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_title_skin_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_title_skin_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_title_skin_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_title_skin_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,88 @@
+<?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/Window/properties/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="window_basic_flexchrome.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.skins.spark.*;
+        import comps.*;
+
+	public var titleStr:String="The pokey, orange fox leapt over the lazy cat.";
+	public var longTitle:String="The pokey, orange fox leapt over the lazy cat. The pokey, orange fox leapt over the lazy cat. The pokey, orange fox leapt over the lazy cat. The pokey, orange fox leapt over the lazy cat.";
+	]]>
+	</mx:Script>
+
+    <testCases>
+
+	<!--
+	========================================================
+	Test title set in MXML
+	========================================================
+	-->
+	<TestCase testID="title_mxml_test1" keywords="[Window,title]" description="Check title set in mxml." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.title=titleStr"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/> 
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="windowObj.titleBar.skin.titleText" propertyName="text" valueExpression="value=titleStr" />
+		<MyCompareBitmap target="windowObj" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+	    </body>
+	</TestCase>
+
+
+
+	<TestCase testID="title_mxml_test2" keywords="[Window,title]" description="Check truncated title set in mxml." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.title=longTitle"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/> 
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="windowObj.titleBar.skin.titleText" propertyName="text" valueExpression="value=longTitle" />
+		<MyCompareBitmap target="windowObj" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+	   </body>
+	</TestCase>
+
+
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_title_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_title_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_title_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_title_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,140 @@
+<?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/Window/properties/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="window_basic_flexchrome.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.skins.spark.*;
+        import comps.*;
+
+	]]>
+	</mx:Script>
+
+    <testCases>
+
+	<!--
+	========================================================
+	Test title
+	========================================================
+	-->
+	<TestCase testID="title_test1" keywords="[Window,title]" description="Set to something." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<SetProperty target="myWin" propertyName="title" value="The quick, brown fox" waitEvent="updateComplete" />
+		<AssertPropertyValue target="myWin.skin.titleBar.skin.titleText" propertyName="text" value="The quick, brown fox" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="title_test2" keywords="[Window,title]" description="Clear it." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<SetProperty target="myWin" propertyName="title" value="The brown, quick fox" waitEvent="updateComplete" />
+		<SetProperty target="myWin" propertyName="title" value="" waitEvent="updateComplete" />
+		<AssertPropertyValue target="myWin.skin.titleBar.skin.titleText" propertyName="text" value="" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="title_test3" keywords="[Window,title]" description="Change it." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<SetProperty target="myWin" propertyName="title" value="The quick, brown fox" waitEvent="updateComplete" />
+		<SetProperty target="myWin" propertyName="title" value="The brown, quick fox" waitEvent="updateComplete" />
+		<AssertPropertyValue target="myWin.skin.titleBar.skin.titleText" propertyName="text" value="The brown, quick fox" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="title_test4" keywords="[Window,title]" description="Bindable." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithBindableSettings,'window1')" waitTarget="" waitEvent="myWindowComplete"/>   
+	    </setup>
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.titleStr='The slow, red fox'" />
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="windowObj" propertyName="title" value="The slow, red fox" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="title_test5" keywords="[Window,title]" description="Check the position (short string)." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+
+		<SetProperty target="myWin" propertyName="title" value="a" waitEvent="updateComplete" />
+		<MyCompareBitmap target="myWin" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+
+	    </body>
+	</TestCase>
+
+	<TestCase testID="title_test6" keywords="[Window,title]" description="Check the position (long string)." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+
+		<SetProperty target="myWin" propertyName="title" value="I am the very model of a modern major general." waitEvent="updateComplete" />
+		<MyCompareBitmap target="myWin" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+
+	    </body>
+	</TestCase>
+
+	<TestCase testID="title_test7" keywords="[Window,title]" description="Check truncation." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<SetProperty target="myWin" propertyName="title" value="I am the very model of a modern major general.  I've information vegetable animal and mineral." waitEvent="updateComplete" />
+		<MyCompareBitmap target="myWin" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+
+	    </body>
+	</TestCase>
+
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_type_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_type_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_type_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_type_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,120 @@
+<?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/Window/properties/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="window_basic_005.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.*;
+	    import spark.skins.spark.*;
+	    import flash.display.NativeWindowType;
+	    import comps.*;
+	]]>
+	</mx:Script>
+
+    <testCases>
+
+	<!--
+	========================================================
+	Test type
+	========================================================
+	-->
+
+	<TestCase testID="type_normal_test1" keywords="[Window,type]" description="This is just 'normal', no matter what." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(WindowWithBindableSettings,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.type=NativeWindowType.NORMAL"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/> 
+		<AssertPropertyValue target="windowObj" propertyName="type" valueExpression="value=NativeWindowType.NORMAL" />
+	    </body>
+	</TestCase>
+
+
+	<TestCase testID="type_normal_test2" keywords="[Window,type]" description="default type is normal" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(WindowWithBindableSettings,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/> 
+		<AssertPropertyValue target="windowObj" propertyName="type" valueExpression="value=NativeWindowType.NORMAL" />
+	    </body>
+	</TestCase>
+
+
+	<TestCase testID="type_lightweight_test3" keywords="[Window,type]" description="type is NativeWindowType.LIGHTWEIGHT" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(WindowWithBindableSettings,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.systemChrome='none'"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.type=NativeWindowType.LIGHTWEIGHT"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/> 
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="windowObj" propertyName="type" valueExpression="value=NativeWindowType.LIGHTWEIGHT" />
+		<CompareBitmap target="windowObj" url="../properties/baselines/$testID.png" />
+	    </body>
+
+	</TestCase>
+
+
+	<TestCase testID="type_utility_test4" keywords="[Window,type]" description="type is NativeWindowType.UTILITY" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(WindowWithBindableSettings,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.type=NativeWindowType.UTILITY"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/> 
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="windowObj" propertyName="type" valueExpression="value=NativeWindowType.UTILITY" />
+		<CompareBitmap target="windowObj" url="../properties/baselines/$testID.png" />
+	    </body>
+
+
+	</TestCase>
+
+
+
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_visible.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_visible.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_visible.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_visible.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,137 @@
+<?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/Window/properties/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="window_basic_flexchrome.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;
+	]]>
+	</mx:Script>
+
+    <testCases>
+
+	<!--
+	========================================================
+	Test visible
+	========================================================
+	-->
+
+	<TestCase testID="properties_visible_test1" keywords="[Window,properties,visible]" description="check default value for visible property is true" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="myWin" propertyName="visible" value="true" />
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="properties_visible_true" keywords="[Window,properties,visible]" description="check visible=true property" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<SetProperty target="myWin" propertyName="visible" value="true"/>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="myWin" propertyName="visible" value="true" />
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+
+	<TestCase testID="properties_visible_windowclosed" keywords="[Window,properties,visible]" description="check visible=false when window is closed" >
+	     <setup>
+		    <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		    <RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+		</setup>
+		<body>
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="myWin" propertyName="visible" value="true" />
+		    <RunCode code="FlexGlobals.topLevelApplication.myWin.close()" waitTarget="myWin" waitEvent="closing" />
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertMethodValue method="value=FlexGlobals.topLevelApplication.myWin.visible" value="false" />
+
+	    </body>
+	</TestCase>
+
+
+
+
+	<TestCase testID="properties_visible_false" keywords="[Window,properties,visible]" description="check visible=false property" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+		 </setup>
+	    <body>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<SetProperty target="myWin" propertyName="visible" value="false"  waitTarget="myWin" waitEvent="hide"/>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="myWin" propertyName="visible" value="false" />
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+	    </body>
+	</TestCase>
+
+
+
+	<TestCase testID="properties_visible_change2" keywords="[Window,properties,visible]" description="check visible=false changed to true" >
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+
+	    </setup>
+	    <body>
+
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<SetProperty target="myWin" propertyName="visible" value="false"  waitTarget="myWin" waitEvent="hide"/> 
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="myWin" propertyName="visible" value="false" />
+
+		<SetProperty target="myWin" propertyName="visible" value="true"  waitTarget="myWin" waitEvent="show"/> 
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="myWin" propertyName="visible" value="true" />
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_minmaxsize_systemchrome.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_minmaxsize_systemchrome.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_minmaxsize_systemchrome.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_minmaxsize_systemchrome.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,86 @@
+<?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/Window/properties/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="window_basic_005.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 flash.system.Capabilities;
+        import mx.core.FlexGlobals;
+        import spark.components.*;
+        import spark.skins.spark.*;
+        import comps.*;
+
+	]]>
+	</mx:Script>
+
+    <testCases>
+
+	<!--
+	========================================================
+	Test width
+	Note: minSize and maxSize are:
+	    <minSize>100 100</minSize>
+	    <maxSize>750 650</maxSize>
+	========================================================
+	-->
+	<TestCase testID="width_minSize_test1_systemChrome" keywords="[Window,width]" description="Width less than window's minSize width" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(WindowWithBindableSettings,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minWidth=120"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>  
+		<SetProperty target="windowObj" propertyName="width" value="50" waitEvent="resize" />
+		<AssertPropertyValue target="windowObj" propertyName="width" value="120" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="width_maxSize_test2_systemChrome" keywords="[Window,width]" description="Width more than window's maxSize width" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(WindowWithBindableSettings,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxWidth=750"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>  
+		<SetProperty target="windowObj" propertyName="width" value="800" waitEvent="resize" />
+		<AssertPropertyValue target="windowObj" propertyName="width" value="750" />
+	    </body>
+	</TestCase>
+
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_minmaxsize_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_minmaxsize_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_minmaxsize_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_minmaxsize_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,88 @@
+<?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/Window/properties/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="window_basic_flexchrome.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 flash.system.Capabilities;
+        import mx.core.FlexGlobals;
+        import spark.components.*;
+        import spark.skins.spark.*;
+        import comps.*;
+
+	]]>
+	</mx:Script>
+
+    <testCases>
+
+	<!--
+	========================================================
+	Test width
+	Note: minSize and maxSize are:
+	    <minSize>100 100</minSize>
+	    <maxSize>750 650</maxSize>
+	========================================================
+	-->
+	<TestCase testID="width_minSize_test1_flexChrome" keywords="[Window,width]" description="Width less than window's minSize height" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minWidth=140"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<SetProperty target="windowObj" propertyName="width" value="50" waitEvent="resize" />
+		<AssertPropertyValue target="windowObj" propertyName="width" value="140" />
+	    </body>
+	</TestCase>
+
+
+	<TestCase testID="width_maxSize_test2_flexChrome" keywords="[Window,width]" description="Width more than window's maxSize width" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxWidth=750"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<SetProperty target="windowObj" propertyName="width" value="800" waitEvent="resize" />
+		<AssertPropertyValue target="windowObj" propertyName="width" value="750" />
+	    </body>
+	</TestCase>
+	
+
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_systemchrome_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_systemchrome_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_systemchrome_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_systemchrome_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,252 @@
+<?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/Window/properties/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="window_basic_005.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 flash.system.Capabilities;
+
+        import mx.core.FlexGlobals;
+
+        import spark.components.*;
+
+        import spark.skins.spark.*;
+
+        import mx.binding.utils.*;
+
+        import comps.*;
+
+        public var btn1:Button=new Button();
+
+        public function setBinding():void
+
+        {
+
+	    BindingUtils.bindProperty( btn1, "label",
+
+	    FlexGlobals.topLevelApplication.windowObj, "width" );
+
+	}
+
+
+
+	]]>
+
+	</mx:Script>
+
+
+
+    <testCases>
+
+
+
+	<!--
+
+	========================================================
+
+	Test width
+
+	========================================================
+
+	-->
+
+
+
+	<TestCase testID="width_test4_systemChrome" keywords="[Window,width]" description="Set width to a positive, reasonable value." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithContents,'window1')" waitTarget="" waitEvent="myWindowComplete" />
+
+	    </setup>
+
+	    <body>
+
+		<SetProperty target="windowObj" propertyName="width" value="115" waitEvent="resize" />
+
+		<AssertPropertyValue target="windowObj" propertyName="width" value="115" />
+
+		<MyCompareBitmap target="windowObj"  numColorVariances="10" maxColorVariance="10" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+
+	    </body>
+
+	</TestCase>
+
+
+
+	<TestCase testID="width_test5_systemChrome" keywords="[Window,width]" description="Set width to a positive, reasonable value." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithContents,'window1')" waitTarget="" waitEvent="myWindowComplete" />
+
+	    </setup>
+
+	    <body>
+
+		<SetProperty target="windowObj" propertyName="width" value="253" waitEvent="resize" />
+
+		<AssertPropertyValue target="windowObj" propertyName="width" value="253" />
+
+		<MyCompareBitmap target="windowObj"  numColorVariances="10" maxColorVariance="10" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+
+	    </body>
+
+	</TestCase>
+
+
+
+	<TestCase testID="width_test6_systemChrome" keywords="[Window,width]" description="Less than minWidth" >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithContents,'window1')" waitTarget="" waitEvent="myWindowComplete" />
+
+	    </setup>
+
+	    <body>
+
+		<SetProperty target="windowObj" propertyName="minWidth" value="150" />
+
+		<SetProperty target="windowObj" propertyName="width" value="130" waitEvent="resize" />
+
+		<AssertPropertyValue target="windowObj" propertyName="width" value="150" />
+
+		<MyCompareBitmap target="windowObj"  numColorVariances="10" maxColorVariance="10" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+
+	   
+
+	    </body>
+
+	</TestCase>
+
+
+
+	<TestCase testID="width_test7_systemChrome" keywords="[Window,width]" description="More than maxWidth" >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithContents,'window1')" waitTarget="" waitEvent="myWindowComplete" />
+
+	    </setup>
+
+	    <body>
+
+		<SetProperty target="windowObj" propertyName="maxWidth" value="160" />
+
+		<SetProperty target="windowObj" propertyName="width" value="170" waitEvent="resize" />
+
+		<AssertPropertyValue target="windowObj" propertyName="width" value="160" />
+
+		<MyCompareBitmap target="windowObj"  numColorVariances="10" maxColorVariance="10" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+
+	    </body>
+
+	</TestCase>
+
+
+
+	<TestCase testID="width_test8_binding_systemChrome" keywords="[Window,width]" description="Bind to the width" >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithBindableSettings,'window1')"   waitTarget="" waitEvent="myWindowComplete"/>        
+
+	    </setup> 
+
+	    <body>
+
+	        <RunCode code="setBinding()" />
+
+		<AssertPropertyValue target="windowObj" propertyName="width" value="400" />
+
+		<AssertPropertyValue target="script:btn1" propertyName="label" value="400" />
+
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.widthVal=130"/>
+
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+
+		<AssertPropertyValue target="windowObj" propertyName="width" value="130" />
+
+		<AssertPropertyValue target="script:btn1" propertyName="label" value="130" />
+
+	    </body>
+
+	</TestCase>
+
+
+
+    </testCases>
+
+</UnitTester>
+
+
+
+		
+
+		
+

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_width_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,138 @@
+<?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/Window/properties/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="window_basic_flexchrome.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 flash.system.Capabilities;
+        import mx.core.FlexGlobals;
+        import spark.components.*;
+        import spark.skins.spark.*;
+        import mx.binding.utils.*;
+        import comps.*;
+        public var btn1:Button=new Button();
+        public function setBinding():void
+        {
+	    BindingUtils.bindProperty( btn1, "label",
+	    FlexGlobals.topLevelApplication.windowObj, "width" );
+	}
+
+	]]>
+	</mx:Script>
+
+    <testCases>
+
+	<!--
+	========================================================
+	Test width
+	========================================================
+	-->
+	
+	<TestCase testID="width_test4_flexChrome" keywords="[Window,width]" description="Set width to a positive, reasonable value." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<SetProperty target="myWin" propertyName="width" value="140" waitEvent="resize" />
+		<AssertPropertyValue target="myWin" propertyName="width" value="140" />
+		<MyCompareBitmap target="myWin" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+
+	    </body>
+	</TestCase>
+
+
+	<TestCase testID="width_test5_flexChrome" keywords="[Window,width]" description="Set width to a positive, reasonable value." >
+	     <setup>
+		 <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		 <RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<SetProperty target="myWin" propertyName="width" value="253" waitEvent="resize" />
+		<AssertPropertyValue target="myWin" propertyName="width" value="253" />
+		<MyCompareBitmap target="myWin" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+
+	    </body>
+	</TestCase>
+
+	<TestCase testID="width_test6_flexChrome" keywords="[Window,width]" description="Less than minWidth" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<SetProperty target="myWin" propertyName="minWidth" value="150" />
+		<SetProperty target="myWin" propertyName="width" value="130" waitEvent="resize" />
+		<AssertPropertyValue target="myWin" propertyName="width" value="150" />
+		<MyCompareBitmap target="myWin" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+
+	    </body>
+	</TestCase>
+
+
+	<TestCase testID="width_test7_flexChrome" keywords="[Window,width]" description="More than maxWidth" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<SetProperty target="myWin" propertyName="maxWidth" value="160" />
+		<SetProperty target="myWin" propertyName="width" value="170" waitEvent="resize" />
+		<AssertPropertyValue target="myWin" propertyName="width" value="160" />
+		<MyCompareBitmap target="myWin" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png" />
+
+	    </body>
+	</TestCase>
+
+
+	<TestCase testID="width_test8_binding" keywords="[Window,width]" description="Bind to the width" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithBindableSettings,'window1')"  waitTarget="" waitEvent="myWindowComplete" />        
+	    </setup> 
+	    <body>
+	        <RunCode code="setBinding()" />
+		<AssertPropertyValue target="windowObj" propertyName="width" value="400" />
+		<AssertPropertyValue target="script:btn1" propertyName="label" value="400" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.widthVal=140"/>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="windowObj" propertyName="width" value="140" />
+		<AssertPropertyValue target="script:btn1" propertyName="label" value="140" />
+	    </body>
+	</TestCase>	
+		
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test10_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test10_SparkChrome.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test10_SparkChrome.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test10_SparkChrome_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test10_SparkChrome_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test10_SparkChrome_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test1_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test1_SparkChrome.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test1_SparkChrome.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test1_SparkChrome_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test1_SparkChrome_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test1_SparkChrome_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test2_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test2_SparkChrome.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test2_SparkChrome.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test2_SparkChrome_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test2_SparkChrome_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test2_SparkChrome_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test3_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test3_SparkChrome.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test3_SparkChrome.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test3_SparkChrome_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test3_SparkChrome_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test3_SparkChrome_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test4_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test4_SparkChrome.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test4_SparkChrome.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test4_SparkChrome_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test4_SparkChrome_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test4_SparkChrome_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test5_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test5_SparkChrome.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test5_SparkChrome.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test5_SparkChrome_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test5_SparkChrome_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test5_SparkChrome_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test6_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test6_SparkChrome.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test6_SparkChrome.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test6_SparkChrome_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test6_SparkChrome_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test6_SparkChrome_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test7_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test7_SparkChrome.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test7_SparkChrome.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test7_SparkChrome_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test7_SparkChrome_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test7_SparkChrome_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test8_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test8_SparkChrome.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test8_SparkChrome.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test8_SparkChrome_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test8_SparkChrome_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test8_SparkChrome_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9a_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9a_SparkChrome.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9a_SparkChrome.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9a_SparkChrome_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9a_SparkChrome_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9a_SparkChrome_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9b_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9b_SparkChrome.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9b_SparkChrome.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9b_SparkChrome_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9b_SparkChrome_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9b_SparkChrome_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9c_SparkChrome.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9c_SparkChrome.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9c_SparkChrome.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9c_SparkChrome_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9c_SparkChrome_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/baselines/titleBar_test9c_SparkChrome_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/window_skin_titleBar_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/window_skin_titleBar_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/window_skin_titleBar_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/skin/window_skin_titleBar_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,448 @@
+<?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/Window/skin/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="window_basic_005.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 flash.system.Capabilities;
+
+        import mx.core.FlexGlobals;
+
+        import spark.components.*;
+
+        import spark.skins.spark.*;
+
+
+
+	]]>
+
+	</mx:Script>
+
+
+
+    <testCases>
+
+
+
+	<!--
+
+	========================================================
+
+	Test the minimize/maximize/close buttons.
+
+	Tests which click the minimize/maximize buttons to 
+
+	minimize/maximize, and tests verifying that they are 
+
+	enabled/disabled appropriately, are covered in:
+
+
+
+	    window_properties_maximizable_false.mxml and 
+
+	    window_properties_maximizable_true.mxml.
+
+	    window_properties_minimizable_false.mxml
+
+	    window_properties_minimizable_true.mxml
+
+
+
+	========================================================
+
+	-->
+
+
+
+	<TestCase testID="titleBar_test1_SparkChrome" keywords="[Window,titleBar]" description="Verify the appearance of the buttons when the application is disabled." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>    
+
+	    </setup>
+
+	    <body>
+
+	    	<SetProperty target="windowObj" propertyName="width" value="115"/>
+
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
+
+		<SetProperty target="windowObj" propertyName="enabled" value="false" waitEvent="updateComplete"/>
+
+		<MyCompareBitmap target="windowObj.skin.titleBar"  numColorVariances="10" maxColorVariance="10" url="../skin/baselines/$testID.png"  mac_url="../skin/baselines/$testID_mac.png"/>
+
+	    </body>
+
+	</TestCase>
+
+
+
+
+
+	<TestCase testID="titleBar_test2_SparkChrome" keywords="[Window,titleBar]" description="Verify the appearance of the buttons when the application is enabled." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>  
+
+	    </setup>
+
+	    <body>
+
+		<SetProperty target="windowObj" propertyName="width" value="115"/>
+
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
+
+		<MyCompareBitmap target="windowObj.skin.titleBar"  numColorVariances="10" maxColorVariance="10" url="../skin/baselines/$testID.png"  mac_url="../skin/baselines/$testID_mac.png"/>
+
+	    </body>
+
+	</TestCase>
+
+
+
+
+
+	<TestCase testID="titleBar_test3_SparkChrome" keywords="[Window,titleBar]" description="Mouse over the maximize button and verify its appearance." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>  
+
+	    </setup>
+
+	    <body>
+
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<MyCompareBitmap target="windowObj.skin.titleBar.maximizeButton"  numColorVariances="10" maxColorVariance="10" url="../skin/baselines/$testID.png"  mac_url="../skin/baselines/$testID_mac.png"/>
+
+	    </body>
+
+	</TestCase>
+
+
+
+
+
+	<TestCase testID="titleBar_test4_SparkChrome" keywords="[Window,titleBar]" description="Mouse over the minimize button and verify its appearance." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>  
+
+	    </setup>
+
+	    <body>
+
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.minimizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<MyCompareBitmap target="windowObj.skin.titleBar.minimizeButton"  numColorVariances="10" maxColorVariance="10" url="../skin/baselines/$testID.png"  mac_url="../skin/baselines/$testID_mac.png"/>
+
+	    </body>
+
+	</TestCase>
+
+
+
+
+
+	<TestCase testID="titleBar_test5_SparkChrome" keywords="[Window,titleBar]" description="Mouse over the close button and verify its appearance." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>  
+
+	    </setup>
+
+	    <body>
+
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.closeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<MyCompareBitmap target="windowObj.skin.titleBar.closeButton"  numColorVariances="10" maxColorVariance="10" url="../skin/baselines/$testID.png"  mac_url="../skin/baselines/$testID_mac.png"/>
+
+	    </body>
+
+	</TestCase>
+
+
+
+
+
+	<TestCase testID="titleBar_test6_SparkChrome" keywords="[Window,titleBar]" description="Mouse down on the maximize button and verify its appearance." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>  
+
+	    </setup>
+
+	    <body>
+
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.maximizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<MyCompareBitmap target="windowObj.skin.titleBar.maximizeButton"  numColorVariances="10" maxColorVariance="10" url="../skin/baselines/$testID.png"  mac_url="../skin/baselines/$testID_mac.png"/>
+
+	    </body>
+
+	</TestCase>
+
+
+
+
+
+	<TestCase testID="titleBar_test7_SparkChrome" keywords="[Window,titleBar]" description="Mouse down on the minimize button and verify its appearance." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>  
+
+	    </setup>
+
+	    <body>
+
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.minimizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.minimizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<MyCompareBitmap target="windowObj.skin.titleBar.minimizeButton"  numColorVariances="10" maxColorVariance="10" url="../skin/baselines/$testID.png"  mac_url="../skin/baselines/$testID_mac.png"/>
+
+	    </body>
+
+	</TestCase>
+
+
+
+
+
+	<TestCase testID="titleBar_test8_SparkChrome" keywords="[Window,titleBar]" description="Mouse down on the close button and verify its appearance." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>  
+
+	    </setup>
+
+	    <body>
+
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.closeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.closeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<MyCompareBitmap target="windowObj.skin.titleBar.closeButton"  numColorVariances="10" maxColorVariance="10" url="../skin/baselines/$testID.png"  mac_url="../skin/baselines/$testID_mac.png"/>
+
+	    </body>
+
+	</TestCase>
+
+
+
+	<TestCase testID="titleBar_test9a_SparkChrome" keywords="[Window,titleBar]" description="Verify the appearance of the maximize button after clicking on it to maximize." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>  
+
+	    </setup>
+
+	    <body>
+
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.maximizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<DispatchMouseClickEvent target="windowObj.skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="windowObj" waitEvent="displayStateChange" />
+
+		<MyCompareBitmap target="windowObj.skin.titleBar.maximizeButton"  numColorVariances="10" maxColorVariance="10" url="../skin/baselines/$testID.png"  mac_url="../skin/baselines/$testID_mac.png"/>
+
+	    </body>
+
+	</TestCase>
+
+
+
+	<TestCase testID="titleBar_test9b_SparkChrome" keywords="[Window,titleBar]" description="Verify the appearance of the maximize button, when maximized, on rollOver, in Windows." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>  
+
+	    </setup>
+
+	    <body>
+
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin "  waitEvent="updateComplete"/>
+
+		<DispatchMouseClickEvent target="windowObj.skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="windowObj" waitEvent="displayStateChange" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5"/>
+
+		<WaitForEffectsToEnd />
+
+		<MyCompareBitmap target="windowObj.skin.titleBar.maximizeButton"  numColorVariances="10" maxColorVariance="10" url="../skin/baselines/$testID.png"  mac_url="../skin/baselines/$testID_mac.png"/>
+
+	    </body>
+
+	</TestCase>
+
+
+
+	<TestCase testID="titleBar_test9c_SparkChrome" keywords="[Window,titleBar]" description="Verify the appearance of the maximize button, when maximized, on mouseDown, in Windows." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>  
+
+	    </setup>
+
+	    <body>
+
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
+
+		<DispatchMouseClickEvent target="windowObj.skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="windowObj" waitEvent="displayStateChange" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.maximizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" />
+
+		<MyCompareBitmap target="windowObj.skin.titleBar.maximizeButton"  numColorVariances="10" maxColorVariance="10" url="../skin/baselines/$testID.png"  mac_url="../skin/baselines/$testID_mac.png"/>
+
+	    </body>
+
+	</TestCase>
+
+
+
+
+
+	<TestCase testID="titleBar_test10_SparkChrome" keywords="[Window,titleBar]" description="Be sure the maximize button is no longer in the over state after clicking on it to restore from maximize." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>  
+
+	    </setup>
+
+	    <body>
+
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
+
+		<DispatchMouseClickEvent target="windowObj.skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="windowObj" waitEvent="displayStateChange" />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5"/>
+
+		<WaitForEffectsToEnd />
+
+		<DispatchMouseEvent target="windowObj.skin.titleBar.maximizeButton" type="mouseDown" localX="5" localY="5"/>
+
+		<WaitForEffectsToEnd />
+
+		<DispatchMouseClickEvent target="windowObj.skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="windowObj" waitEvent="displayStateChange" />
+
+		<MyCompareBitmap target="windowObj.skin.titleBar.maximizeButton"  numColorVariances="10" maxColorVariance="10" url="../skin/baselines/$testID.png"  mac_url="../skin/baselines/$testID_mac.png"/>
+
+	    </body>
+
+	</TestCase>
+
+
+
+    </testCases>
+
+</UnitTester>
+

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/styles/baselines/css_baseColor_test1.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/styles/baselines/css_baseColor_test1.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/styles/baselines/css_baseColor_test1.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/styles/baselines/css_baseColor_test1_mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/styles/baselines/css_baseColor_test1_mac.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/styles/baselines/css_baseColor_test1_mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/styles/baselines/css_focusColor_test1.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/styles/baselines/css_focusColor_test1.png?rev=1370009&view=auto
==============================================================================
Binary file - no diff available.



Mime
View raw message