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 [19/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_maximizable_true_closed.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_true_closed.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_true_closed.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_maximizable_true_closed.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 maximizable = true
+	- This tests the maximizable property.
+	- These are not tests specifically for the maximize
+	button or the maximize() method; those are tested
+	elsewhere.
+	- We cannot compare the height of the app. with the
+	height of the screen due to the Mac's toolbar, Windows'
+	task bar, stuff like that.  So we just use the width,
+	which should be consistent, and the nativeWindow's
+	displayState property.
+	- These are order dependent!  The last tests are on
+	a closed window, so tests on an open window cannot
+	be put after them.
+	========================================================
+	-->
+	<!--
+	================================================================================
+	ALL TESTS ARE PERFORMED ON A CLOSED WINDOW.  IT CANNOT BE REOPENED.
+	================================================================================
+	-->
+	<TestCase testID="maximizable_true_test4_SparkChromeWindowedApplicationSkin " keywords="[Window,maximizable]" description="Returns false if the window is closed." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>    
+	    </setup>
+	    <body>
+		<AssertPropertyValue target="myWin" propertyName="maximizable" value="true" />
+		 <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.myWin.close()" waitTarget="myWin" waitEvent="close" />
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="myWin" propertyName="maximizable" value="true" />
+	    </body>
+	</TestCase>
+
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_false.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_false.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_false.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_false.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,139 @@
+<?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 minimizable = false
+	- This tests the minimizable property.
+	- These are not tests specifically for the minimize
+	button or the minimize() method; those are tested
+	elsewhere.
+	- Pauses are necessary. There is no event because
+	we're making sure things *don't* happen.
+	========================================================
+	-->
+	<TestCase testID="minimizable_false_test1_SparkChrome " keywords="[Window,minimizable]" description="Click the minimize button to minimize." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>    
+		<RunCode code="FlexGlobals.topLevelApplication.myWin.minWidth=160;"/>
+		<RunCode code="FlexGlobals.topLevelApplication.myWin.minHeight=31;" waitTarget="myWin" waitEvent="updateComplete" />
+	    </setup>
+	    <body>
+
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<DispatchMouseClickEvent target="myWin.skin.titleBar.minimizeButton" localX="2" localY="2"/>
+		<!-- 
+		<WaitForEvent numExpectedEvents="1" eventName="displayStateChange" target="myWin" timeout="200" />
+		-->
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="10"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('width',FlexGlobals.topLevelApplication.myWin.width,300,300,160)" value=""/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.myWin.height,350,350,31)" value=""/>
+		<AssertPropertyValue target="myWin.nativeWindow" propertyName="displayState" value="normal" />
+	    </body>
+	</TestCase>
+
+	<!-- SDK-21585 -->
+	<TestCase testID="minimizable_false_test2_SparkChrome" keywords="[Window,minimizable]" description="Call the minimize method to minimize." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>    
+		<RunCode code="FlexGlobals.topLevelApplication.myWin.minWidth=200;"/>
+		<RunCode code="FlexGlobals.topLevelApplication.myWin.minHeight=200;" waitTarget="myWin" waitEvent="updateComplete" />
+	    </setup>
+	    <body>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.myWin.minimize()" waitTarget="myWin" waitEvent="displayStateChange"/>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="10"/>
+		 <AssertPropertyValue target="myWin.nativeWindow" propertyName="displayState" value="minimized" />
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('width',FlexGlobals.topLevelApplication.myWin.width,300,300,160)" value=""/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.myWin.height,350,350,31)" value=""/>
+		
+
+	    </body>
+	</TestCase>
+
+	<!-- SDK-21585 -->
+	<TestCase testID="minimizable_false_test3_windowedApplicationSkin" keywords="[Window,minimizable]" description="Call the minimize method to minimize." >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = WindowedApplicationSkin"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minWidth=200;"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minHeight=200;"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/> 
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minimize()" waitTarget="windowObj" waitEvent="displayStateChange"/>
+
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="10"/>
+		<!-- width, height is taken from PlainWindow -->
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('width',FlexGlobals.topLevelApplication.windowObj.width,400,400,160)" value=""/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('width',FlexGlobals.topLevelApplication.windowObj.height,400,400,31)" value=""/>
+		<AssertPropertyValue target="windowObj.nativeWindow" propertyName="displayState" value="minimized" />
+	  </body>
+	</TestCase>
+
+	<TestCase testID="minimizable_false_test4_SparkChrome" keywords="[Window,minimizable]" description="Be sure the minimize button appears disabled." >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minimizable=false;"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/> 
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<MyCompareBitmap url="../Properties/Baselines/$testID.png" mac_url="../Properties/Baselines/$testID_mac.png" target="windowObj"  numColorVariances="15" maxColorVariance="20" />
+	    </body>
+	</TestCase>
+
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_false_systemchrome.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_false_systemchrome.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_false_systemchrome.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_false_systemchrome.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,116 @@
+<?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 minimizable = false
+	- This tests the minimizable property.
+	- These are not tests specifically for the minimize
+	button or the minimize() method; those are tested
+	elsewhere.
+	- Pauses are necessary. There is no event because
+	we're making sure things *don't* happen.
+	========================================================
+	-->
+
+	<!-- SDK-21585 -->
+	<TestCase testID="minimizable_false_test2_SystemChrome" keywords="[Window,minimizable]" description="Call the minimize method to minimize." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>    
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minWidth=200;"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minHeight=200;" waitTarget="windowObj" waitEvent="updateComplete" />
+	    </setup>
+	    <body>
+	    	<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minimize()" waitTarget="windowObj" waitEvent="displayStateChange"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('width',FlexGlobals.topLevelApplication.windowObj.width,200,200,200)" value=""/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.windowObj.height,200,200,200)" value=""/>
+		<AssertPropertyValue target="windowObj.nativeWindow" propertyName="displayState" value="minimized" />
+	    </body>
+	</TestCase>
+
+	<!-- SDK-21585 -->
+	<TestCase testID="minimizable_false_test3_windowedApplicationSkin" keywords="[Window,minimizable]" description="Call the minimize method to minimize." >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    	<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minWidth=200;"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minHeight=200;"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/> 
+		<SetStyle target="windowObj" styleName="skinClass" valueExpression="value = WindowedApplicationSkin" waitEvent="updateComplete" />
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minimize()" waitTarget="windowObj" waitEvent="displayStateChange"/>
+		<!-- width, height is taken from PlainWindow -->
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('width',FlexGlobals.topLevelApplication.windowObj.width,400,400,400)" value=""/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.windowObj.height,400,400,400)" value=""/>
+	
+		<AssertPropertyValue target="windowObj.nativeWindow" propertyName="displayState" value="minimized" />
+	  </body>
+	</TestCase>
+
+	<TestCase testID="minimizable_false_test4_SystemChrome" keywords="[Window,minimizable]" description="Be sure the minimize button appears disabled." >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minimizable=false;"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/> 
+
+		<MyCompareBitmap url="../Properties/Baselines/$testID.png" mac_url="../Properties/Baselines/$testID_mac.png" target="windowObj" />
+	    </body>
+	</TestCase>
+
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_true.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_true.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_true.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_true.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,288 @@
+<?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 minimizable = true
+
+	- This tests the minimizable property.
+
+	- These are not tests specifically for the minimize
+
+	button or the minimize() method; those are tested
+
+	elsewhere.
+
+	- We cannot compare the height of the app. with the
+
+	height of the screen due to the Mac's toolbar, Windows'
+
+	task bar, stuff like that.  So we just use the width,
+
+	which should be consistent, and the nativeWindow's
+
+	displayState property.
+
+	- These are order dependent!  The last tests are on
+
+	a closed window, so tests on an open window cannot
+
+	be put after them.
+
+	========================================================
+
+	-->
+
+	<TestCase testID="minimizable_true_test1" keywords="[Window,minimizable]" description="Confirm default is true." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>    
+
+	    </setup>
+
+	    <body>
+
+		<AssertPropertyValue target="myWin" propertyName="minimizable" value="true" />
+
+	    </body>
+
+	</TestCase>
+
+
+
+	<TestCase testID="minimizable_true_test2_SparkChrome" keywords="[Window,minimizable]" description="Click the minimize button to minimize." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>    
+
+	    </setup>
+
+	    <body>
+
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+
+		<DispatchMouseClickEvent target="myWin.skin.titleBar.minimizeButton" localX="2" localY="2" waitTarget="myWin" waitEvent="displayStateChange" />
+
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="4"/>
+
+		<AssertPropertyValue target="myWin.nativeWindow" propertyName="displayState" value="minimized" />
+
+	    </body>
+
+	</TestCase>
+
+
+
+	<TestCase testID="minimizable_true_test3_SparkChrome" keywords="[Window,minimizable]" description="Call the minimize method to minimize." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>    
+
+	    </setup>
+
+	    <body>
+
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+
+	       <RunCode code="FlexGlobals.topLevelApplication.myWin.minimize()" waitTarget="myWin" waitEvent="displayStateChange" />
+
+	       <WaitForEffectsToEnd />
+
+	       <!-- 
+
+	       <SetProperty target="myWin" propertyName="height" value="100" waitEvent="resize" />
+
+	       -->
+
+	       <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="4"/>
+
+	       <AssertPropertyValue target="myWin.nativeWindow" propertyName="displayState" value="minimized" />
+
+	    </body>
+
+	</TestCase>
+
+
+
+	<TestCase testID="minimizable_true_test3dowedApplicationSkin" keywords="[Window,minimizable]" description="Call the minimize method to minimize." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>    
+
+	    </setup>
+
+	    <body>
+
+		<SetStyle target="myWin" styleName="skinClass" valueExpression="value = WindowedApplicationSkin" waitEvent="updateComplete" />
+
+	        <RunCode code="FlexGlobals.topLevelApplication.myWin.activate()" waitEvent="enterFrame" waitTarget="stage"/>
+
+	        <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+
+	        <RunCode code="FlexGlobals.topLevelApplication.myWin.minimize()" waitTarget="myWin" waitEvent="displayStateChange" />
+
+	        <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+
+	        <WaitForEffectsToEnd />
+
+	        <AssertPropertyValue target="myWin.nativeWindow" propertyName="displayState" value="minimized" />
+
+	    </body>
+
+	</TestCase>
+
+
+
+
+
+	<TestCase testID="minimizable_true_test4_WindowedAppSkin" keywords="[Window,minimizable]" description="Be sure the minimize button appears enabled." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>    
+
+	    </setup>
+
+	    <body>
+
+		<SetStyle target="myWin" styleName="skinClass" valueExpression="value = WindowedApplicationSkin" waitEvent="updateComplete" />
+
+		<RunCode code="FlexGlobals.topLevelApplication.myWin.minimize()" waitTarget="myWin" waitEvent="displayStateChange" />
+
+		<WaitForEffectsToEnd />
+
+		<MyCompareBitmap url="../Properties/Baselines/$testID.png" mac_url="../Properties/Baselines/$testID_mac.png" target="myWin" />
+
+	    </body>
+
+	</TestCase>
+
+
+
+	<TestCase testID="minimizable_true_test4_SparkChrome" keywords="[Window,minimizable]" description="Be sure the minimize button appears enabled." >
+
+	    <setup>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete"/>    
+
+	    </setup>
+
+	    <body>
+
+		<RunCode code="FlexGlobals.topLevelApplication.myWin.minimize()" waitTarget="myWin" waitEvent="displayStateChange" />
+
+		<WaitForEffectsToEnd />
+
+		<MyCompareBitmap url="../Properties/Baselines/$testID.png" mac_url="../Properties/Baselines/$testID_mac.png" target="myWin" />
+
+
+
+	    </body>
+
+	</TestCase>
+
+
+
+    </testCases>
+
+</UnitTester>
+

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_true_closed.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_true_closed.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_true_closed.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minimizable_true_closed.mxml Mon Aug  6 20:51:08 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="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 minimizable = true
+	- This tests the minimizable property.
+	- These are not tests specifically for the minimize
+	button or the minimize() method; those are tested
+	elsewhere.
+	- We cannot compare the height of the app. with the
+	height of the screen due to the Mac's toolbar, Windows'
+	task bar, stuff like that.  So we just use the width,
+	which should be consistent, and the nativeWindow's
+	displayState property.
+	- These are order dependent!  The last tests are on
+	a closed window, so tests on an open window cannot
+	be put after them.
+	========================================================
+	-->
+
+	<!--
+	================================================================================
+	ALL TESTS AFTER THIS LINE ARE PERFORMED ON A CLOSED WINDOW.
+	================================================================================
+	-->
+	<TestCase testID="minimizable_true_test4_SparkChrome" keywords="[Window,minimizable]" description="Returns false if the 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="minimizable" value="true" />
+		<RunCode code="FlexGlobals.topLevelApplication.myWin.close()" waitTarget="myWin" waitEvent="close" />
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="myWin" propertyName="minimizable" value="true" />
+	    </body>
+	</TestCase>
+
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmax_width_systemchrome.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmax_width_systemchrome.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmax_width_systemchrome.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmax_width_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_minmax_width_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmax_width_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmax_width_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmax_width_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,87 @@
+<?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>140 140</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_minmaxheightwidth_minmaxsize_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmaxheightwidth_minmaxsize_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmaxheightwidth_minmaxsize_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmaxheightwidth_minmaxsize_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,115 @@
+<?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>
+
+	<!--
+	========================================================
+	In this file, just be sure the min/max height/width
+	come from the XML file if not explicitly set in Flex.
+	<minSize>200 300</minSize>
+	<maxSize>700 800</maxSize>
+	========================================================
+	-->
+
+	<TestCase testID="minHeight_minSize_test1" keywords="[Window,minHeight]" description="set minHeight before window open" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minHeight=300;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertPropertyValue target="windowObj" propertyName="minHeight" value="300" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="minWidth_minSize_test2" keywords="[Window,minWidth]" description="set minWidth before window open">
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minWidth=200;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertPropertyValue target="windowObj" propertyName="minWidth" value="200" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="maxHeight_maxSize_test3" keywords="[Window,maxHeight]" description="set maxHeight before window open" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxHeight=800;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertPropertyValue target="windowObj" propertyName="maxHeight" value="800" />
+	    </body>
+	</TestCase>
+
+	<TestCase testID="maxWidth_maxSize_test4" keywords="[Window,maxWidth]" description="set maxWidth before window open" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxWidth=700;"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertPropertyValue target="windowObj" propertyName="maxWidth" value="700" />
+	    </body>
+	</TestCase>
+
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmaxheightwidth_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmaxheightwidth_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmaxheightwidth_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_minmaxheightwidth_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,366 @@
+<?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, "minWidth" );
+	}
+	public function setBinding2():void
+	{
+	    BindingUtils.bindProperty( btn1, "label",
+	    FlexGlobals.topLevelApplication.windowObj, "minHeight" );
+	}
+	
+	]]>
+	</mx:Script>
+
+    <testCases>
+
+	<!--
+	========================================================
+	maxHeight
+	Most tests decreaes it from 200.
+	========================================================
+	-->
+
+	<TestCase testID="maxHeight_test1" keywords="[Window,maxHeight]" description="Decrease to negative val" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minHeight=-10;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxHeight=-1;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+                <AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.windowObj.height,-1,-1,-1)" value=""/>
+
+	    </body>
+	</TestCase>
+
+	<TestCase testID="maxHeight_test2" keywords="[Window,maxHeight]" description="Decrease to zero" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minHeight=-10;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxHeight=0;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+                <AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.windowObj.height,0,0,0)" value=""/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="maxHeight_test3" keywords="[Window,maxHeight]" description="Decrease to 1" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxHeight=1;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.windowObj.height,1,1,1)" value=""/>
+
+	    </body>
+	</TestCase>
+
+	<TestCase testID="maxHeight_test4" keywords="[Window,maxHeight]" description="Decrease to reasonable value" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxHeight=99;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.windowObj.height,99,99,99)" value=""/>
+
+	    </body>
+	</TestCase>
+
+	<TestCase testID="maxHeight_test5" keywords="[Window,maxHeight]" description="Increase." >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxHeight=500;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<SetProperty target="windowObj" propertyName="height" value="600" waitEvent="updateComplete" />
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.windowObj.height,500,500,500)" value=""/>
+
+	    </body>
+	</TestCase>
+
+	<TestCase testID="maxHeight_test6" keywords="[Window,maxHeight]" description="Bindable" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(WindowWithBindableSettings,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxHeightVal=500;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('maxHeight',FlexGlobals.topLevelApplication.windowObj.maxHeight,500,500,500)" value=""/>
+
+	    </body>
+	</TestCase>
+
+	<!--
+	========================================================
+	maxWidth
+	Most tests decreaes it from 200.
+	========================================================
+	-->
+
+	<TestCase testID="maxWidth_test1" keywords="[Window,maxWidth]" description="Decrease to negative val" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minWidth=-10;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxWidth=-1;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('width',FlexGlobals.topLevelApplication.windowObj.width,-1,-1,-1)" value=""/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="maxWidth_test2" keywords="[Window,maxWidth]" description="Decrease to zero" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minWidth=-10;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxWidth=0;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('width',FlexGlobals.topLevelApplication.windowObj.width,0,0,0)" value=""/>
+
+	    </body>
+	</TestCase>
+
+	<TestCase testID="maxWidth_test3" keywords="[Window,maxWidth]" description="Decrease to 1" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		 <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	     </setup> 
+	     <body>
+	     <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		 <RunCode code="FlexGlobals.topLevelApplication.windowObj.maxWidth=1;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('width',FlexGlobals.topLevelApplication.windowObj.width,1,1,1)" value=""/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="maxWidth_test4" keywords="[Window,maxWidth]" description="Decrease to reasonable value" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		 <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	     </setup> 
+	     <body>
+	     <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		 <RunCode code="FlexGlobals.topLevelApplication.windowObj.maxWidth=99;" />
+		 <RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		 <AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('width',FlexGlobals.topLevelApplication.windowObj.width,99,99,99)" value=""/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="maxWidth_test5" keywords="[Window,maxWidth]" description="Increase." >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	     <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj.maxWidth=500;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('width',FlexGlobals.topLevelApplication.windowObj.width,400,400,400)" value=""/>
+		<SetProperty target="windowObj" propertyName="width" value="600" waitEvent="updateComplete" />
+	        <AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('width',FlexGlobals.topLevelApplication.windowObj.width,500,500,500)" value=""/>
+
+	    </body>
+	</TestCase>
+
+	<TestCase testID="maxWidth_test6" keywords="[Window,maxWidth]" description="Bindable" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(WindowWithBindableSettings,'window1')" />        
+	    </setup> 
+	    <body>
+	     <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.maxWidthVal=500;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertPropertyValue target="windowObj" propertyName="maxWidth" value="500" />
+	    </body>
+	</TestCase>
+
+	<!--
+	========================================================
+	minHeight
+
+	========================================================
+	-->
+	<TestCase testID="minHeight_test1" keywords="[Window,minHeight]" description="Negative" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	     <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minHeight=-1;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.height=-2;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.windowObj.height,0,0,0)" value=""/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="minHeight_test2" keywords="[Window,minHeight]" description="Zero" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minHeight=0;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.height=-2;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.windowObj.height,0,0,0)" value=""/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="minHeight_test3" keywords="[Window,minHeight]" description="1" >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minHeight=1;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.height=-2;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.windowObj.height,1,1,1)" value=""/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="minHeight_test4" keywords="[Window,minHeight]" description="Greater than the height." >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minHeight=51;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.height=50;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.windowObj.height,51,51,51)" value=""/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="minHeight_test5" keywords="[Window,minHeight]" description="Less than the height. There's no event to wait for." >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minHeight=49;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.height=50;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('height',FlexGlobals.topLevelApplication.windowObj.height,50,50,50)" value=""/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="minHeight_test6" keywords="[Window,bindable]" description="Be sure it's bindable." >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(WindowWithBindableSettings,'window1')" />        
+	    </setup> 
+	    <body>
+	    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minHeightVal=49;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<RunCode code="setBinding2()" />
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('minHeight',FlexGlobals.topLevelApplication.windowObj.minHeight,49,49,49)" value=""/>
+	    	<AssertPropertyValue target="script:btn1" propertyName="label" value="49" />
+	    	<SetProperty target="windowObj" propertyName="minHeight" value="170" waitEvent="updateComplete" />
+		<AssertPropertyValue target="script:btn1" propertyName="label" value="170" />
+	    </body>
+	</TestCase>
+
+
+	<!--
+	========================================================
+	minWidth
+	========================================================
+	-->
+	
+
+	<TestCase testID="minWidth_test6" keywords="[Window,bindable]" description="Be sure it's bindable." >
+	    <setup>
+	       <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	       <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(WindowWithBindableSettings,'window1')" />        
+	    </setup> 
+	    <body>
+	         <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+	        <RunCode code="setBinding()" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.minWidthVal=150;" />
+		<RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete"/>
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.assertValueBaseOnOS('minWidth',FlexGlobals.topLevelApplication.windowObj.minWidth,150,150,150)" value=""/>
+		<AssertPropertyValue target="script:btn1" propertyName="label" value="150" />
+		<SetProperty target="windowObj" propertyName="minWidth" value="170" waitEvent="updateComplete" />
+		<AssertPropertyValue target="script:btn1" propertyName="label" value="170" />
+	    </body>
+	</TestCase>
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_nativeWindow_flexchrome.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_nativeWindow_flexchrome.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_nativeWindow_flexchrome.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_nativeWindow_flexchrome.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,108 @@
+<?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 nativeWindow
+	========================================================
+	-->
+
+	<TestCase testID="flexChrome_nativeWindow_test1" keywords="[Window,flexChrome,nativeWindow]" description="check nativeWindow property, verify it gets same settings as window" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/><!-- give sometime to make sure nativeWindow is created -->
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.checkNativeWindow()" value="" />
+		<!-- 
+		<CompareBitmap target="FlexGlobals.topLevelApplication.myWin" url="../properties/baselines/$testID.png" />
+		-->
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+
+	<TestCase testID="flexChrome_nativeWindow_test2" keywords="[Window,flexChrome,nativeWindow]" description="check when nativeWindow  update some properties, verify the change is effective" >
+	    <setup>
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+		<RunCode code="FlexGlobals.topLevelApplication.myWin=null;FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.myWin.nativeWindow.height = 200"/>
+		<RunCode code="FlexGlobals.topLevelApplication.myWin.nativeWindow.width = 200"/>
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		<RunCode code="FlexGlobals.topLevelApplication.myWin.nativeWindow.title = 'test title'"  />
+		<WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="4"/>
+		<AssertPropertyValue target="myWin" propertyName="width" value="200" />
+		<AssertPropertyValue target="myWin" propertyName="height" value="200" />
+		<AssertPropertyValue target="myWin" propertyName="title" value="window test" />
+		<AssertMethodValue method="value=FlexGlobals.topLevelApplication.verifyNativeWindowUpdate()" value="" />
+		<!-- 
+		<CompareBitmap target="myWin" url="../properties/baselines/$testID.png" />
+		-->
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+
+	    </body>
+	</TestCase>
+
+	<TestCase testID="flexChrome_nativeWindow_test3" keywords="[Window,flexChrome,nativeWindow]" description="check when window  updates some properties, verify nativeWindow should get updated value" >
+	    <setup>
+	      <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	      <RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" />
+	    </setup>
+	    <body>
+		<RunCode code="FlexGlobals.topLevelApplication.updateWindow()" waitTarget="" waitEvent="WindowUpdateComplete" />
+		<AssertPropertyValue target="myWin.nativeWindow" propertyName="width" value="400" />
+		<AssertPropertyValue target="myWin.nativeWindow" propertyName="height" value="400" />
+		 <AssertPropertyValue target="myWin.nativeWindow" propertyName="title" value="updated title" />
+		 <!-- 
+		<CompareBitmap target="myWin" url="../properties/baselines/$testID.png" />
+		-->
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()" />
+	    </body>
+	</TestCase>
+
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_nochangeable_flexchrome.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_nochangeable_flexchrome.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_nochangeable_flexchrome.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/properties/window_properties_nochangeable_flexchrome.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,239 @@
+<?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 comps.*;
+	]]>
+	</mx:Script>
+
+    <testCases>
+
+	<!--
+	========================================================
+	Test no changeable property
+	========================================================
+	-->
+
+	<TestCase testID="nochangeable_property_minimizable1" keywords="[Window,properties,minimizable]" description="once minimizable is set, verify it will not be changed" >
+	      <setup>
+	            <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>   
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')"  />        
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.minimizable=true"/>
+		</setup> 
+		<body>
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete" />
+		    <AssertPropertyValue target="windowObj" propertyName="minimizable" value ="true" />
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.minimizable=true"/>
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="minimizable" value ="true" />         
+		    <MyCompareBitmap target="windowObj" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png"  numColorVariances="15" maxColorVariance="20"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="nochangeable_property_minimizable2" keywords="[Window,properties,minimizable]" description="once minimizable is set(false), verify it will not be changed" >
+	      <setup>
+	            <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>   
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')"  />        
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.minimizable=false"/>
+		</setup> 
+		<body>
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.open(false)" waitTarget="" waitEvent="myWindowComplete"/>
+		    <AssertPropertyValue target="windowObj" propertyName="minimizable" value ="false" />
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.minimizable=true"/>
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="minimizable" value ="false" /> 
+		    <AssertPropertyValue target="windowObj" propertyName="width" value="400" />
+	  	    <AssertPropertyValue target="windowObj" propertyName="height" value="400" />
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="nochangeable_property_maximizable1" keywords="[Window,properties,maximizable]" description="once maximizable is set, verify it will not be changed" >
+	      <setup>
+	            <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>   
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')"  />        
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.maximizable=true"/>
+		</setup> 
+		<body>
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete" />
+		    <AssertPropertyValue target="windowObj" propertyName="maximizable" value ="true" />
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.maximizable=true"/>
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="maximizable" value ="true" />         
+		    <MyCompareBitmap target="windowObj" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png"  numColorVariances="15" maxColorVariance="20"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="nochangeable_property_maximizable2" keywords="[Window,properties,maximizable]" description="once maximizable is set(false), verify it will not be changed" >
+	      <setup>
+	            <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>   
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')"  />        
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.maximizable=false"/>
+		</setup> 
+		<body>
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.open(false)" waitTarget="" waitEvent="myWindowComplete" />
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="maximizable" value ="false" />
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.maximizable=true"/>
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="maximizable" value ="false" />         
+		    <AssertPropertyValue target="windowObj" propertyName="width" value="400" />
+		    <AssertPropertyValue target="windowObj" propertyName="height" value="400" />
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+
+	<TestCase testID="nochangeable_property_resizable1" keywords="[Window,properties,resizable]" description="once resizable is set, verify it will not be changed" >
+	      <setup>
+	            <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>   
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')"  />        
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.resizable=true"/>
+		</setup> 
+		<body>
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete" />
+		    <AssertPropertyValue target="windowObj" propertyName="resizable" value ="true" />
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.resizable=true"/>
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="resizable" value ="true" />         
+		    <MyCompareBitmap target="windowObj" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png"  numColorVariances="15" maxColorVariance="20"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="nochangeable_property_resizable2" keywords="[Window,properties,resizable]" description="once resizable is set(false), verify it will not be changed" >
+	      <setup>
+	            <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>   
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')"  />        
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.resizable=false"/>
+		</setup> 
+		<body>
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.open(false)" waitTarget="" waitEvent="myWindowComplete" />
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="resizable" value ="false" />
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.resizable=true"/>
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="resizable" value ="false" />         
+		    
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="nochangeable_property_transparent1" keywords="[Window,properties,transparent]" description="once transparent is set, verify it will not be changed" >
+	      <setup>
+	            <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>   
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')"  />        
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.transparent=true"/>
+		</setup> 
+		<body>
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete" />
+		    <AssertPropertyValue target="windowObj" propertyName="transparent" value ="true" />
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.transparent=true"/>
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="transparent" value ="true" />         
+		    <MyCompareBitmap target="windowObj" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png"  numColorVariances="15" maxColorVariance="20"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="nochangeable_property_transparent2" keywords="[Window,properties,transparent]" description="once transparent is set(false), verify it will not be changed" >
+	      <setup>
+	            <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>   
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')"  />        
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.transparent=false"/>
+		</setup> 
+		<body>
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.open(false)" waitTarget="" waitEvent="myWindowComplete" />
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="transparent" value ="false" />
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.transparent=true"/>
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="transparent" value ="false" />         
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+	<TestCase testID="nochangeable_property_type1" keywords="[Window,properties,type]" description="once type is set, verify it will not be changed" >
+	      <setup>
+	            <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>   
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')"  />        
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.type='normal'"/>
+		</setup> 
+		<body>
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.open(true)" waitTarget="" waitEvent="myWindowComplete" />
+		    <AssertPropertyValue target="windowObj" propertyName="type" value ="normal" />
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.type=NativeWindowType.UTILITY"/>
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="type" value ="normal" />         
+		    <MyCompareBitmap target="windowObj" url="../properties/baselines/$testID.png" mac_url="../properties/baselines/$testID_mac.png"  numColorVariances="15" maxColorVariance="20"/>
+
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+
+
+	<TestCase testID="nochangeable_property_systemChrome2" keywords="[Window,properties,systemChrome]" description="once systemChrome is set(false), verify it will not be changed" >
+	      <setup>
+	            <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>   
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createANoOpenWindowByClass(PlainWindow,'window1')"  />        
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.systemChrome='none'"/>
+		</setup> 
+		<body>
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.open(false)" waitTarget="" waitEvent="myWindowComplete" />
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="systemChrome" value ="none" />
+		    <RunCode code="FlexGlobals.topLevelApplication.windowObj.systemChrome='standard'"/>
+		    <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/>
+		    <AssertPropertyValue target="windowObj" propertyName="systemChrome" value ="none" />         
+		<RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/>
+	    </body>
+	</TestCase>
+
+
+    </testCases>
+</UnitTester>



Mime
View raw message