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 [27/34] - in /incubator/flex/trunk/mustella/tests/apollo: ./ DragManager/ DragManager/SWFs/ DragManager/SWFs/assets/ DragManager/SWFs/comps/ DragManager/Spark/ DragManager/Spark/baselines/ FileComboBox/ FileComboBox/SWFs/ FileCombo...
Date Mon, 06 Aug 2012 20:51:43 GMT
Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_deferredInstantiation_all_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_deferredInstantiation_all_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_deferredInstantiation_all_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_deferredInstantiation_all_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/integration/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_deferredInstantiation_all.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>
+
+<!--
+========================================================
+Be sure everything was created.
+========================================================
+-->
+
+<TestCase testID="deferredInstantiation_all_test1" keywords="[WindowedApplication,deferredInstantiation]" description="Be sure everything was created." >
+    <body>
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn1.parent != null)" value="true" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn2.parent != null)" value="true" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn3.parent != null)" value="true" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn4.parent != null)" value="true" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn5.parent != null)" value="true" /> 
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn6.parent != null)" value="true" />
+    </body>
+</TestCase>
+
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_deferredInstantiation_none_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_deferredInstantiation_none_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_deferredInstantiation_none_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_deferredInstantiation_none_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/integration/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_deferredInstantiation_none.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>
+
+<!--
+========================================================
+Be sure nothing was created, then call
+createDeferredContent().
+
+These are order dependent.  We can't undo it after
+calling createDeferredContent().
+========================================================
+-->
+
+<TestCase testID="deferredInstantiation_none_test1" keywords="[WindowedApplication,deferredInstantiation]" description="Be sure nothing was created." >
+    <body>
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn1 == null)" value="true" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn2 == null)" value="true" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn3 == null)" value="true" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn4 == null)" value="true" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn5 == null)" value="true" /> 
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn6 == null)" value="true" />
+    </body>
+</TestCase>
+
+<TestCase testID="deferredInstantiation_none_test2" keywords="[WindowedApplication,deferredInstantiation]" description="Be sure everything was created after calling createDeferredContent()." >
+    <body>
+        <RunCode code="FlexGlobals.topLevelApplication.createDeferredContent()" waitTarget="" waitEvent="updateComplete" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn1.parent != null)" value="true" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn2.parent != null)" value="true" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn3.parent != null)" value="true" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn4.parent != null)" value="true" />
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn5.parent != null)" value="true" /> 
+        <AssertMethodValue method="value = (FlexGlobals.topLevelApplication.btn6.parent != null)" value="true" />
+    </body>
+</TestCase>
+
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_focus_scroller_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_focus_scroller_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_focus_scroller_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_focus_scroller_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/integration/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_focus_scroller.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.*;
+
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+<!--
+========================================================
+Basic focus test with a WindowedApplication which
+has a scroller.
+There is no valueCommit, updateComplete, or change
+event when setting the text.  So pause.
+========================================================
+-->
+
+<TestCase testID="focus_scroller_test1" keywords="[WindowedApplication,focus,scroller]" description="Give focus to a TextInput and type in it." >
+    <setup>
+        <ResetComponent target="ti1" className="spark.components::TextInput" waitEvent="updateComplete" />
+    </setup>
+    <body>
+        <DispatchKeyEvent keys="[TAB]" waitTarget="ti1" waitEvent="focusIn" />
+        <DispatchKeyEvent char="boogie" />
+        <Pause timeout="200" />
+        <AssertPropertyValue target="ti1" propertyName="text" value="boogie" />
+    </body>
+</TestCase>
+
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_focus_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_focus_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_focus_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_focus_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/integration/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_focus.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.*;
+
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+<!--
+========================================================
+Basic focus test.
+There is no valueCommit, updateComplete, or change
+event when setting the text.  So pause.
+========================================================
+-->
+
+<TestCase testID="focus_test1" keywords="[WindowedApplication,states]" description="Give focus to a TextInput and type in it." >
+    <setup>
+        <ResetComponent target="ti1" className="spark.components::TextInput" waitEvent="updateComplete" />
+    </setup>
+    <body>
+        <DispatchKeyEvent keys="[TAB, TAB]" waitTarget="ti1" waitEvent="focusIn" />
+        <DispatchKeyEvent char="boogie" />
+        <Pause timeout="200" />
+        <AssertPropertyValue target="ti1" propertyName="text" value="boogie" />
+    </body>
+</TestCase>
+
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_localization_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_localization_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_localization_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_localization_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/integration/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_localization.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.*;
+
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+<!--
+========================================================
+Put Japanese characters in the status and title.
+This is done with the system chrome as a manual test.
+========================================================
+-->
+
+<TestCase testID="localization_test1_mac" keywords="[WindowedApplication,localization]" description="Put Japanese characters in the status and title." >
+    <body>
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" />
+        <SetProperty target="" propertyName="title" value="アクアクアクアクアクアクアク" />
+        <SetProperty target="" propertyName="status" value="チェッチェッチェッチェッチェッ" waitEvent="updateComplete" />
+        <CompareBitmap target="" url="../integration/baselines/$testID.png" />
+    </body>
+</TestCase>
+
+<TestCase testID="localization_test1_win" keywords="[WindowedApplication,localization]" description="Put Japanese characters in the status and title." >
+    <body>
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" />
+        <SetProperty target="" propertyName="title" value="アクアクアクアクアクアクアク" />
+        <SetProperty target="" propertyName="status" value="チェッチェッチェッチェッチェッ" waitEvent="updateComplete" />
+        <CompareBitmap target="" url="../integration/baselines/$testID.png" />
+    </body>
+</TestCase>
+
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_modules_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_modules_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_modules_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_modules_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/integration/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_modules.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.*;
+
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+<!--
+========================================================
+Should be able to load an Application, but not a 
+WindowedApplication.
+========================================================
+-->
+
+<TestCase testID="modules_test1" keywords="[WindowedApplication,modules]" description="Try to load an Application." >
+    <setup>
+        <ResetComponent target="sl1" className="mx.controls.SWFLoader" waitEvent="updateComplete" />
+    </setup>
+    <body>
+        <SetProperty target="sl1" propertyName="autoLoad" value="true" />
+        <SetProperty target="sl1" propertyName="source" value="assets/ApplicationModule.swf" waitEvent="complete" waitTarget="sl1" />
+        <DispatchMouseEvent target="" type="mouseMove" localX="10" localY="10" waitTarget="sl1.content" waitEvent="applicationComplete"/>
+        <AssertMethodValue method="value = Object(FlexGlobals.topLevelApplication.sl1.content).document.rect1.fill.color" value="0x008800" />
+    </body>
+</TestCase>
+
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_states_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_states_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_states_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/integration/wa_states_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/integration/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_app2.mxml">
+
+	<!-- this set of lines form a template that must be in each unit test -->
+	<mx:Script>
+	<![CDATA[
+	public static function init(o:DisplayObject):void
+	{
+	}
+	]]>
+	</mx:Script>
+	<mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+	</mx:Metadata>
+	<!-- end of set of lines that must be in each unit test -->
+
+	<mx:Script>
+	<![CDATA[
+
+        import mx.core.FlexGlobals;
+        import spark.skins.spark.*;
+
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+<!--
+========================================================
+Basic states tests.
+========================================================
+-->
+
+<TestCase testID="states_test1" keywords="[WindowedApplication,states]" description="Switch states and check the title, skin, and a control." >
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+    </setup>
+    <body>
+        <SetProperty target="" propertyName="currentState" value="state2" waitEvent="updateComplete" />
+        <AssertPropertyValue target="" propertyName="title" value="Title in state2" />
+        <AssertMethodValue method="value = FlexGlobals.topLevelApplication.btnState2.parent != null" value="true" />
+        <AssertStyleValue target="" styleName="skinClass" valueExpression="value = '[class SparkChromeWindowedApplicationSkin]'" />
+    </body>
+</TestCase>
+
+<TestCase testID="states_test2" keywords="[WindowedApplication,states]" description="Switch states when minimized." >
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+    </setup>
+    <body>
+        <RunCode code="FlexGlobals.topLevelApplication.minimize()" waitTarget="" waitEvent="displayStateChange" />
+        <SetProperty target="" propertyName="currentState" value="state2" waitEvent="updateComplete" />
+        <RunCode code="FlexGlobals.topLevelApplication.restore()" waitTarget="" waitEvent="displayStateChange" />
+        <AssertPropertyValue target="" propertyName="title" value="Title in state2" />
+        <AssertMethodValue method="value = FlexGlobals.topLevelApplication.btnState2.parent != null" value="true" />
+        <AssertStyleValue target="" styleName="skinClass" valueExpression="value = '[class SparkChromeWindowedApplicationSkin]'" />
+    </body>
+</TestCase>
+
+	</testCases>
+</UnitTester>

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

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/baselines/method_addElementAt_test1.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/baselines/method_addElementAt_test2.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/baselines/method_addElementAt_test3.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/baselines/method_addElementAt_test4.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/baselines/method_addElementAt_test5.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/baselines/method_addElementAt_test6.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/baselines/method_addElement_test1.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/baselines/method_addElement_test2.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/baselines/method_removeElementAt_test4.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/baselines/method_removeElementAt_test5.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/baselines/method_removeElement_test2.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Propchange: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/baselines/method_removeElement_test3.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_activate_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_activate_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_activate_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_activate_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_app2.mxml">
+
+	<!-- this set of lines form a template that must be in each unit test -->
+	<mx:Script>
+	<![CDATA[
+	public static function init(o:DisplayObject):void
+	{
+	}
+	]]>
+	</mx:Script>
+	<mx:Metadata>
+	<![CDATA[
+		[Mixin]
+	]]>
+	</mx:Metadata>
+	<!-- end of set of lines that must be in each unit test -->
+
+	<mx:Script>
+	<![CDATA[
+
+        import mx.core.FlexGlobals;
+        import spark.components.*;
+
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+<!--
+========================================================
+activate method
+- There's not much to do here in mustella-ville, since
+you have to click on another application to have the
+method really do something.  But let's just call it
+and make sure it doesn't do something catastrophic.
+========================================================
+-->
+<TestCase testID="activate_test1" keywords="[WindowedApplication,activate]" description="Call activate.  There's nothing to verify in Mustella; just make sure nothing catastrophic happened by asserting the height." >
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+    </setup>
+    <body>
+        <AssertMethodValue method="value = FlexGlobals.topLevelApplication.activate()" value="null" />
+        <AssertPropertyValue propertyName="height" valueExpression="value = FlexGlobals.topLevelApplication.heightResetVal" />
+    </body>
+</TestCase>
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_elements_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_elements_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_elements_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_elements_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_generic_systemchrome_nocontrols.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.collections.*;   
+        import mx.core.*;     
+        import spark.components.*;
+        
+        public var theUIC:UIComponent;
+        public var theUIC2:UIComponent;
+
+    ]]>
+    </mx:Script>
+
+    <!--
+    ========================================================
+    We just test these methods lightly.  They should be
+    tested elsewhere already, theoretically.
+    ========================================================
+    -->
+    
+    <testCases>
+
+    <TestCase testID="method_resetMethod_test1" keywords="[WindowedApplication,methods]" description="Let's be sure the reset method really starts us off clean.">
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new Button())" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new CheckBox())" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+            <AssertPropertyValue target="" propertyName="numElements" value="0" />
+            <!--CompareBitmap target="" url="../methods/$testID.png" /-->
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_addElement_test1" keywords="[WindowedApplication,methods,addElement]" description="Add an element to a WindowedApplication">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new Button())" waitTarget="" waitEvent="updateComplete" />
+            <AssertPropertyValue target="" propertyName="numElements" value="1" />
+            <CompareBitmap target="" url="../methods/baselines/$testID.png" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_addElement_test2" keywords="[WindowedApplication,methods,addElement]" description="Add an element when one is already there.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new Button())" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new CheckBox())" waitTarget="" waitEvent="updateComplete" />
+            <AssertPropertyValue target="" propertyName="numElements" value="2" />
+            <CompareBitmap target="" url="../methods/baselines/$testID.png" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_addElementAt_test1" keywords="[WindowedApplication,methods,addElementAt]" description="Add at -1.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <AssertMethodValue method="try{FlexGlobals.topLevelApplication.addElementAt(new Button(), -1)}catch(e:Error){value = e.message}" value="Index -1 is out of range." />
+            <AssertPropertyValue target="" propertyName="numElements" value="0" />
+            <CompareBitmap target="" url="../methods/baselines/$testID.png" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_addElementAt_test2" keywords="[WindowedApplication,methods,addElementAt]" description="Add at 0, no other items.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new Button(), 0)" waitTarget="" waitEvent="updateComplete" />
+            <AssertPropertyValue target="" propertyName="numElements" value="1" />
+            <CompareBitmap target="" url="../methods/baselines/$testID.png" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_addElementAt_test3" keywords="[WindowedApplication,methods,addElementAt]" description="Add at 0, one other item.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new Button(), 0)" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new CheckBox(), 0)" waitTarget="" waitEvent="updateComplete" />
+            <AssertPropertyValue target="" propertyName="numElements" value="2" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.getElementAt(0) is CheckBox" value="true" />
+            <CompareBitmap target="" url="../methods/baselines/$testID.png" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_addElementAt_test4" keywords="[WindowedApplication,methods,addElementAt]" description="Add at 1, no other items.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <AssertMethodValue method="try{FlexGlobals.topLevelApplication.addElementAt(new Button(), 1)}catch(e:Error){value = e.message}" value="Index 1 is out of range." />
+            <AssertPropertyValue target="" propertyName="numElements" value="0" />
+            <CompareBitmap target="" url="../methods/baselines/$testID.png" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_addElementAt_test5" keywords="[WindowedApplication,methods,addElementAt]" description="Add at 1, one other item.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new Button(), 0)" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new CheckBox(), 1)" waitTarget="" waitEvent="updateComplete" />
+            <AssertPropertyValue target="" propertyName="numElements" value="2" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.getElementAt(1) is CheckBox" value="true" />
+            <CompareBitmap target="" url="../methods/baselines/$testID.png" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_addElementAt_test6" keywords="[WindowedApplication,methods,addElementAt]" description="Add at 1, two other items.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new Button(), 0)" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new CheckBox(), 1)" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new RadioButton(), 1)" waitTarget="" waitEvent="updateComplete" />
+            <AssertPropertyValue target="" propertyName="numElements" value="3" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.getElementAt(1) is RadioButton" value="true" />
+            <CompareBitmap target="" url="../methods/baselines/$testID.png" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_getElementAt_test1" keywords="[WindowedApplication,methods,getElementAt]" description="Call when there are no elements.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <AssertMethodValue method="try{FlexGlobals.topLevelApplication.getElementAt(1)}catch(e:Error){value = e.message}" value="Index 1 is out of range." />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_getElementAt_test2" keywords="[WindowedApplication,methods,getElementAt]" description="Call with -1.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <AssertMethodValue method="try{FlexGlobals.topLevelApplication.getElementAt(-1)}catch(e:Error){value = e.message}" value="Index -1 is out of range." />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_getElementAt_test3" keywords="[WindowedApplication,methods,getElementAt]" description="Call beyond bounds.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new Button(), 0)" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new CheckBox(), 0)" waitTarget="" waitEvent="updateComplete" />
+            <AssertMethodValue method="try{FlexGlobals.topLevelApplication.getElementAt(2)}catch(e:Error){value = e.message}" value="Index 2 is out of range." />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_getElementAt_test4" keywords="[WindowedApplication,methods,getElementAt]" description="Get 0th item.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new Button(), 0)" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new CheckBox(), 0)" waitTarget="" waitEvent="updateComplete" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.getElementAt(0) is CheckBox" value="true" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_getElementAt_test5" keywords="[WindowedApplication,methods,getElementAt]" description="Get 3rd item.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new Button(), 0)" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new CheckBox(), 1)" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new RadioButton(), 2)" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new HSlider(), 3)" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(new Panel(), 4)" waitTarget="" waitEvent="updateComplete" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.getElementAt(3) is HSlider" value="true" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_getElementIndex_test1" keywords="[WindowedApplication,methods,getElementIndex]" description="Get when item hasn't been added.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <AssertMethodValue method="try{FlexGlobals.topLevelApplication.getElementIndex(new Button())}catch(e:Error){value = e.message.indexOf('is not found in this Group.') > -1}" value="true" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_getElementIndex_test2" keywords="[WindowedApplication,methods,getElementIndex]" description="Get when item is at index 0.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="theUIC = new Button()" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(theUIC)" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new CheckBox())" waitTarget="" waitEvent="updateComplete" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.getElementIndex(theUIC)" value="0" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_getElementIndex_test3" keywords="[WindowedApplication,methods,getElementIndex]" description="Get when item is at index 2.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="theUIC = new Button()" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new CheckBox())" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new RadioButton())" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElementAt(theUIC, 2)" waitTarget="" waitEvent="updateComplete" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.getElementIndex(theUIC)" value="2" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_removeElement_test1" keywords="[WindowedApplication,methods,removeElement]" description="Call when the item isn't there.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <AssertMethodValue method="try{FlexGlobals.topLevelApplication.removeElement(new Button())}catch(e:Error){value = e.message.indexOf('is not found in this Group.') > -1}" value="true" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_removeElement_test2" keywords="[WindowedApplication,methods,removeElement]" description="Remove the only item.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="theUIC = new Button()" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(theUIC)" waitTarget="" waitEvent="updateComplete" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.removeElement(theUIC)" valueExpression="value = theUIC" />
+            <AssertPropertyValue target="" propertyName="numElements" value="0" />
+            <CompareBitmap target="" url="../methods/baselines/$testID.png" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_removeElement_test3" keywords="[WindowedApplication,methods,removeElement]" description="Remove several items.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="theUIC = new Button()" />
+            <RunCode code="theUIC2 = new CheckBox()" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(theUIC)" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(theUIC2)" waitTarget="" waitEvent="updateComplete" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.removeElement(theUIC)" valueExpression="value = theUIC" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.removeElement(theUIC2)" valueExpression="value = theUIC2" />
+            <AssertPropertyValue target="" propertyName="numElements" value="0" />
+            <CompareBitmap target="" url="../methods/baselines/$testID.png" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_removeElement_test4" keywords="[WindowedApplication,methods,removeElement]" description="Remove an item twice.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="theUIC = new Button()" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(theUIC)" waitTarget="" waitEvent="updateComplete" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.removeElement(theUIC)" valueExpression="value = theUIC" />
+            <AssertMethodValue method="try{FlexGlobals.topLevelApplication.removeElement(theUIC)}catch(e:Error){value = e.message.indexOf('is not found in this Group.') > -1}" value="true" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_removeElementAt_test1" keywords="[WindowedApplication,methods,removeElementAt]" description="-1.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new Button())" waitTarget="" waitEvent="updateComplete" />
+            <AssertMethodValue method="try{FlexGlobals.topLevelApplication.removeElementAt(-1)}catch(e:Error){value = e.message}" value="Index -1 is out of range." />
+        </body> 
+    </TestCase>
+
+    <TestCase testID="method_removeElementAt_test2" keywords="[WindowedApplication,methods,removeElementAt]" description="Index too large.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new Button())" waitTarget="" waitEvent="updateComplete" />
+            <AssertMethodValue method="try{FlexGlobals.topLevelApplication.removeElementAt(1)}catch(e:Error){value = e.message}" value="Index 1 is out of range." />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_removeElementAt_test3" keywords="[WindowedApplication,methods,removeElementAt]" description="No items present (same as index too large, essentially).">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <AssertMethodValue method="try{FlexGlobals.topLevelApplication.removeElementAt(0)}catch(e:Error){value = e.message}" value="Index 0 is out of range." />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_removeElementAt_test4" keywords="[WindowedApplication,methods,removeElementAt]" description="Remove only element.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new Button())" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.removeElementAt(0)" waitTarget="" waitEvent="updateComplete" />
+            <AssertPropertyValue target="" propertyName="numElements" value="0" />
+            <CompareBitmap target="" url="../methods/baselines/$testID.png" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="method_removeElementAt_test5" keywords="[WindowedApplication,methods,removeElementAt]" description="Remove multiple elements.">
+        <setup> 
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />   
+        </setup>
+        <body>
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new Button())" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new RadioButton())" waitTarget="" waitEvent="updateComplete" />
+            <RunCode code="FlexGlobals.topLevelApplication.addElement(new CheckBox())" waitTarget="" waitEvent="updateComplete" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.removeElementAt(2) is CheckBox" value="true" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.removeElementAt(1) is RadioButton" value="true" />
+            <AssertMethodValue target="" method="value = FlexGlobals.topLevelApplication.removeElementAt(0) is Button" value="true" />
+            <AssertPropertyValue target="" propertyName="numElements" value="0" />
+            <CompareBitmap target="" url="../methods/baselines/$testID.png" />
+        </body>
+    </TestCase>
+
+</testCases>
+
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_getChildByName.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_getChildByName.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_getChildByName.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_getChildByName.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/WindowedApplication/methods/"  
+    xmlns:mx="http://www.adobe.com/2006/mxml" 
+    xmlns="*"
+    xmlns:custom="assets.*"
+    testSWF="wa_app2.mxml">
+    
+<!-- this set of lines form a template that must be in each unit test -->
+    
+    <mx:Script>
+    <![CDATA[
+    public static function init(o:DisplayObject):void
+    {
+    }
+    ]]>
+    </mx:Script>
+    <mx:Metadata>
+    <![CDATA[
+        [Mixin]
+    ]]>
+    </mx:Metadata>
+    <!-- end of set of lines that must be in each unit test -->
+
+    <mx:Script>
+    <![CDATA[
+     import mx.core.*;
+     import spark.components.*;
+     
+     public var theButton:Button;
+     public var theButton2:Button;
+    ]]>
+    </mx:Script>
+    
+    <testCases>
+
+    <TestCase testID="getChildByName_test1" keywords="[WindowedApplication,methods,getChildByName]" description="Try to get nonexistant item.">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+        </setup>
+        <body>
+            <AssertMethodValue method="value = FlexGlobals.topLevelApplication.getChildByName('Peanut')" value="null" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="getChildByName_test2" keywords="[WindowedApplication,methods,getChildByName]" description="Try to get an item.">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+            <RunCode code="theButton = FlexGlobals.topLevelApplication.addButtonToGroup('Butter', FlexGlobals.topLevelApplication.group2)" waitTarget="group2" waitEvent="updateComplete" />
+        </setup>
+        <body>
+            <AssertMethodValue method="value = FlexGlobals.topLevelApplication.getChildByName('Butter')" valueExpression="script:theButton" />
+        </body>
+    </TestCase>
+
+    <TestCase testID="getChildByName_test3" keywords="[WindowedApplication,methods,getChildByName]" description="Try to get an item when several have the same name.">
+        <setup>
+            <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+            <RunCode code="theButton = FlexGlobals.topLevelApplication.addButtonToGroup('Jelly', FlexGlobals.topLevelApplication.group2)" waitTarget="group2" waitEvent="updateComplete" />
+            <RunCode code="theButton2 = FlexGlobals.topLevelApplication.addButtonToGroup('Jelly', FlexGlobals.topLevelApplication.group2)" waitTarget="group2" waitEvent="updateComplete" />
+        </setup>
+        <body>
+            <AssertMethodValue method="value = FlexGlobals.topLevelApplication.getChildByName('Jelly')" valueExpression="script:theButton" />
+        </body>
+    </TestCase>
+
+</testCases>
+
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_getCurrentSkinState_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_getCurrentSkinState_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_getCurrentSkinState_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_getCurrentSkinState_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_methods_getCurrentSkinState.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>
+
+<!--
+========================================================
+getCurrentSkinState method
+Override this method.
+========================================================
+-->
+<TestCase testID="getCurrentSkinState_test1" keywords="[WindowedApplication,getCurrentSkinState]" description="Trigger a change." >
+    <body>
+        <RunCode code="FlexGlobals.topLevelApplication.changeMood('happy')" waitTarget="" waitEvent="updateComplete" />
+        <AssertPixelValue x="50" y="50" value="0xffff00" />
+    </body>
+</TestCase>
+
+<TestCase testID="getCurrentSkinState_test2" keywords="[WindowedApplication,getCurrentSkinState]" description="Trigger a change." >
+    <body>
+        <RunCode code="FlexGlobals.topLevelApplication.changeMood('sad')" waitTarget="" waitEvent="updateComplete" />
+        <AssertPixelValue x="50" y="50" value="0x0000ff" />
+    </body>
+</TestCase>
+
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_maximize_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_maximize_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_maximize_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_maximize_tests.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester testDir="apollo/spark/components/WindowedApplication/methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_properties_heightwidth.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.SparkChromeWindowedApplicationSkin ;
+
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+<!--
+========================================================
+Test maximize()
+- The maximizable property is tested elsewhere.  Here,
+we're just testing that maximmize() maximizes, which is
+a similar, partly duplicated, set of tests.
+- Clicking the maximize button to maximize is also
+tested in the maximizable tests.
+========================================================
+-->
+
+
+<TestCase testID="maximize_test1_WindowedApplicationSkin" keywords="[WindowedApplication,maximize]" description="Maximize when in the restored state." >
+    <setup>
+    	 
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+         
+        <SetProperty target="" propertyName="maxHeight" value="10000" />
+        <WaitForEvent numExpectedEvents="1" eventName="maxHeightChanged" target="" timeout="2000" />
+         
+        <SetProperty target="" propertyName="maxWidth" value="10000" />
+        <WaitForEvent numExpectedEvents="1" eventName="maxWidthChanged" target="" timeout="2000" />
+    </setup>
+    <body>
+    
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" waitEvent="updateComplete" />
+        <RunCode code="FlexGlobals.topLevelApplication.maximize()" waitTarget="" waitEvent="windowResize"  />    
+        <Pause timeout="400"/>
+        <AssertPropertyValue target="nativeWindow" propertyName="displayState" value="maximized" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionX >= FlexGlobals.topLevelApplication.width) &amp;&amp; (FlexGlobals.topLevelApplication.width >= FlexGlobals.topLevelApplication.screenWidthFudged)" value="true" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionY >= FlexGlobals.topLevelApplication.height) &amp;&amp; (FlexGlobals.topLevelApplication.height >= FlexGlobals.topLevelApplication.screenHeightFudged)" value="true" />
+        <AssertPropertyValue target="btn1" propertyName="top" value="0" />
+        <AssertPropertyValue target="btn1" propertyName="left" value="0" />
+        <AssertPropertyValue target="btn2" propertyName="top" value="0" />
+        <AssertPropertyValue target="btn2" propertyName="right" value="0" />
+        <AssertPropertyValue target="btn3" propertyName="left" value="0" />
+        <AssertPropertyValue target="btn3" propertyName="bottom" value="0" />
+        <AssertPropertyValue target="btn4" propertyName="right" value="0" />
+        <AssertPropertyValue target="btn4" propertyName="bottom" value="0" />
+        <RunCode code="FlexGlobals.topLevelApplication.restore()" />
+    </body>
+</TestCase>
+<TestCase testID="maximize_test2_WindowedApplicationSkin" keywords="[WindowedApplication,maximize]" description="Maximize when maximized.  We must use Pause." >
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+        <SetProperty target="" propertyName="maxHeight" value="10000" />
+        <WaitForEvent numExpectedEvents="1" eventName="maxHeightChanged" target="" timeout="2000" />
+	         
+	<SetProperty target="" propertyName="maxWidth" value="10000" />
+        <WaitForEvent numExpectedEvents="1" eventName="maxWidthChanged" target="" timeout="2000" />
+    </setup>
+    <body>
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" waitEvent="updateComplete" />
+        <RunCode code="FlexGlobals.topLevelApplication.maximize()" waitTarget="" waitEvent="windowResize"  />  
+        
+        <RunCode code="FlexGlobals.topLevelApplication.maximize()" />
+        <Pause timeout="200" />
+        <AssertPropertyValue target="nativeWindow" propertyName="displayState" value="maximized" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionX >= FlexGlobals.topLevelApplication.width) &amp;&amp; (FlexGlobals.topLevelApplication.width >= FlexGlobals.topLevelApplication.screenWidthFudged)" value="true" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionY >= FlexGlobals.topLevelApplication.height) &amp;&amp; (FlexGlobals.topLevelApplication.height >= FlexGlobals.topLevelApplication.screenHeightFudged)" value="true" />
+        <AssertPropertyValue target="btn1" propertyName="top" value="0" />
+        <AssertPropertyValue target="btn1" propertyName="left" value="0" />
+        <AssertPropertyValue target="btn2" propertyName="top" value="0" />
+        <AssertPropertyValue target="btn2" propertyName="right" value="0" />
+        <AssertPropertyValue target="btn3" propertyName="left" value="0" />
+        <AssertPropertyValue target="btn3" propertyName="bottom" value="0" />
+        <AssertPropertyValue target="btn4" propertyName="right" value="0" />
+        <AssertPropertyValue target="btn4" propertyName="bottom" value="0" />
+        <RunCode code="FlexGlobals.topLevelApplication.restore()" />
+    </body>
+</TestCase>
+<TestCase testID="maximize_test3_WindowedApplicationSkin" keywords="[WindowedApplication,maximize]" description="Maximize when minimized." >
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+        <SetProperty target="" propertyName="maxHeight" value="10000" />
+        <WaitForEvent numExpectedEvents="1" eventName="maxHeightChanged" target="" timeout="2000" />
+        <SetProperty target="" propertyName="maxWidth" value="10000" />
+        <WaitForEvent numExpectedEvents="1" eventName="maxWidthChanged" target="" timeout="2000" />
+        <RunCode code="FlexGlobals.topLevelApplication.restore()" />
+    </setup>
+    <body>
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" waitEvent="updateComplete" />
+        <RunCode code="FlexGlobals.topLevelApplication.minimize()" waitTarget="" waitEvent="displayStateChange" />
+        <RunCode code="FlexGlobals.topLevelApplication.maximize()" waitTarget="" waitEvent="displayStateChange" />
+        <Pause timeout="200"/>
+        <AssertPropertyValue target="nativeWindow" propertyName="displayState" value="maximized" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionX >= FlexGlobals.topLevelApplication.width) &amp;&amp; (FlexGlobals.topLevelApplication.width >= FlexGlobals.topLevelApplication.screenWidthFudged)" value="true" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionY >= FlexGlobals.topLevelApplication.height) &amp;&amp; (FlexGlobals.topLevelApplication.height >= FlexGlobals.topLevelApplication.screenHeightFudged)" value="true" />
+        <AssertPropertyValue target="btn1" propertyName="top" value="0" />
+        <AssertPropertyValue target="btn1" propertyName="left" value="0" />
+        <AssertPropertyValue target="btn2" propertyName="top" value="0" />
+        <AssertPropertyValue target="btn2" propertyName="right" value="0" />
+        <AssertPropertyValue target="btn3" propertyName="left" value="0" />
+        <AssertPropertyValue target="btn3" propertyName="bottom" value="0" />
+        <AssertPropertyValue target="btn4" propertyName="right" value="0" />
+        <AssertPropertyValue target="btn4" propertyName="bottom" value="0" />
+        <RunCode code="FlexGlobals.topLevelApplication.restore()" />
+    </body>
+</TestCase>
+<TestCase testID="maximize_test1_SparkChromeWindowedApplicationSkin " keywords="[WindowedApplication,maximize]" description="Maximize when in the restored state." >
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+        <SetProperty target="" propertyName="maxHeight" value="10000" />
+        <SetProperty target="" propertyName="maxWidth" value="10000" />
+    </setup>
+    <body>
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" waitEvent="updateComplete" />
+        <RunCode code="FlexGlobals.topLevelApplication.maximize()" waitTarget="" waitEvent="displayStateChange" />        
+        <AssertPropertyValue target="nativeWindow" propertyName="displayState" value="maximized" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionX >= FlexGlobals.topLevelApplication.width) &amp;&amp; (FlexGlobals.topLevelApplication.width >= FlexGlobals.topLevelApplication.screenWidthFudged)" value="true" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionY >= FlexGlobals.topLevelApplication.height) &amp;&amp; (FlexGlobals.topLevelApplication.height >= FlexGlobals.topLevelApplication.screenHeightFudged)" value="true" />
+        <AssertPropertyValue target="btn1" propertyName="top" value="0" />
+        <AssertPropertyValue target="btn1" propertyName="left" value="0" />
+        <AssertPropertyValue target="btn2" propertyName="top" value="0" />
+        <AssertPropertyValue target="btn2" propertyName="right" value="0" />
+        <AssertPropertyValue target="btn3" propertyName="left" value="0" />
+        <AssertPropertyValue target="btn3" propertyName="bottom" value="0" />
+        <AssertPropertyValue target="btn4" propertyName="right" value="0" />
+        <AssertPropertyValue target="btn4" propertyName="bottom" value="0" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionX >= FlexGlobals.topLevelApplication.skin.titleBar.width) &amp;&amp; (FlexGlobals.topLevelApplication.skin.titleBar.width >= FlexGlobals.topLevelApplication.screenWidthFudged)" value="true" />
+        <RunCode code="FlexGlobals.topLevelApplication.restore()" />
+    </body>
+</TestCase>
+
+<TestCase testID="maximize_test2_SparkChromeWindowedApplicationSkin" keywords="[WindowedApplication,maximize]" description="Maximize when maximized.  We must use Pause." >
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+        <SetProperty target="" propertyName="maxHeight" value="10000" />
+        <SetProperty target="" propertyName="maxWidth" value="10000" />
+    </setup>
+    <body>
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" waitEvent="updateComplete" />
+        <RunCode code="FlexGlobals.topLevelApplication.maximize()" waitTarget="" waitEvent="windowResize"  />        
+        <RunCode code="FlexGlobals.topLevelApplication.maximize()" />
+        <Pause timeout="200" />
+        <AssertPropertyValue target="nativeWindow" propertyName="displayState" value="maximized" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionX >= FlexGlobals.topLevelApplication.width) &amp;&amp; (FlexGlobals.topLevelApplication.width >= FlexGlobals.topLevelApplication.screenWidthFudged)" value="true" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionY >= FlexGlobals.topLevelApplication.height) &amp;&amp; (FlexGlobals.topLevelApplication.height >= FlexGlobals.topLevelApplication.screenHeightFudged)" value="true" />
+        <AssertPropertyValue target="btn1" propertyName="top" value="0" />
+        <AssertPropertyValue target="btn1" propertyName="left" value="0" />
+        <AssertPropertyValue target="btn2" propertyName="top" value="0" />
+        <AssertPropertyValue target="btn2" propertyName="right" value="0" />
+        <AssertPropertyValue target="btn3" propertyName="left" value="0" />
+        <AssertPropertyValue target="btn3" propertyName="bottom" value="0" />
+        <AssertPropertyValue target="btn4" propertyName="right" value="0" />
+        <AssertPropertyValue target="btn4" propertyName="bottom" value="0" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionX >= FlexGlobals.topLevelApplication.skin.titleBar.width) &amp;&amp; (FlexGlobals.topLevelApplication.skin.titleBar.width >= FlexGlobals.topLevelApplication.screenWidthFudged)" value="true" />
+        <RunCode code="FlexGlobals.topLevelApplication.restore()" />
+    </body>
+</TestCase>
+
+
+
+<TestCase testID="maximize_test3_SparkChromeWindowedApplicationSkin" keywords="[WindowedApplication,maximize]" description="Maximize when minimized." >
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+        <SetProperty target="" propertyName="maxHeight" value="10000" />
+        <SetProperty target="" propertyName="maxWidth" value="10000" />
+    </setup>
+    <body>
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" waitEvent="updateComplete" />
+        <RunCode code="FlexGlobals.topLevelApplication.minimize()" waitTarget="" waitEvent="displayStateChange" />
+        <RunCode code="FlexGlobals.topLevelApplication.maximize()" waitTarget="" waitEvent="displayStateChange" />
+        <AssertPropertyValue target="nativeWindow" propertyName="displayState" value="maximized" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionX >= FlexGlobals.topLevelApplication.width) &amp;&amp; (FlexGlobals.topLevelApplication.width >= FlexGlobals.topLevelApplication.screenWidthFudged)" value="true" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionY >= FlexGlobals.topLevelApplication.height) &amp;&amp; (FlexGlobals.topLevelApplication.height >= FlexGlobals.topLevelApplication.screenHeightFudged)" value="true" />
+        <AssertPropertyValue target="btn1" propertyName="top" value="0" />
+        <AssertPropertyValue target="btn1" propertyName="left" value="0" />
+        <AssertPropertyValue target="btn2" propertyName="top" value="0" />
+        <AssertPropertyValue target="btn2" propertyName="right" value="0" />
+        <AssertPropertyValue target="btn3" propertyName="left" value="0" />
+        <AssertPropertyValue target="btn3" propertyName="bottom" value="0" />
+        <AssertPropertyValue target="btn4" propertyName="right" value="0" />
+        <AssertPropertyValue target="btn4" propertyName="bottom" value="0" />
+        <AssertMethodValue method="value = (Capabilities.screenResolutionX >= FlexGlobals.topLevelApplication.skin.titleBar.width) &amp;&amp; (FlexGlobals.topLevelApplication.skin.titleBar.width >= FlexGlobals.topLevelApplication.screenWidthFudged)" value="true" />
+        <RunCode code="FlexGlobals.topLevelApplication.restore()" />
+    </body>
+</TestCase>
+
+
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_minimize_tests.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_minimize_tests.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_minimize_tests.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/WindowedApplication/methods/wa_methods_minimize_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/WindowedApplication/methods/"  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_properties_heightwidth.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.SparkChromeWindowedApplicationSkin ;
+
+	]]>
+	</mx:Script>
+
+	<testCases>
+
+<!--
+========================================================
+Test minimize()
+- The minimizable property is tested elsewhere.  Here,
+we're just testing that minimmize() minimizes, which is
+a similar, partly duplicated, set of tests.
+- Clicking the minimize button to minimize is also
+tested in the minimizable tests.
+- There's not much we can do (e.g. CompareBitmap
+and such) in mustella.  There will be manual tests.
+========================================================
+-->
+
+<TestCase testID="minimize_test2_SparkChromeWindowedApplicationSkin " keywords="[WindowedApplication,minimize]" description="Minimize when maximized." >
+    <setup>
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+    </setup>
+    <body>
+        <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" waitEvent="updateComplete" />
+        <RunCode code="FlexGlobals.topLevelApplication.maximize()" waitTarget="" waitEvent="displayStateChange" />
+        <RunCode code="FlexGlobals.topLevelApplication.minimize()" waitTarget="" waitEvent="displayStateChange" />
+        <AssertPropertyValue target="nativeWindow" propertyName="displayState" value="minimized" />
+    </body>
+</TestCase>
+
+<TestCase testID="minimize_test2_WindowedApplicationSkin " keywords="[WindowedApplication,minimize]" description="Minimize when maximized." >
+    <setup>
+        <Pause timeout="1000" />
+        <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
+    </setup>
+    <body>
+        <RunCode code="FlexGlobals.topLevelApplication.maximize()" waitTarget="" waitEvent="displayStateChange" />
+        <RunCode code="FlexGlobals.topLevelApplication.minimize()" waitTarget="" waitEvent="displayStateChange" />
+        <AssertPropertyValue target="nativeWindow" propertyName="displayState" value="minimized" />
+    </body>
+</TestCase>
+
+	</testCases>
+</UnitTester>



Mime
View raw message