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 [11/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/SWFs/window_basic_001.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_001.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_001.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_001.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,263 @@
+<?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.
+
+-->
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+	xmlns:mx="library://ns.adobe.com/flex/mx"
+	xmlns:comps="comps.*"
+    	xmlns:local="*" close="closeAllChildWindow()">
+    <fx:Style>
+	@namespace s "library://ns.adobe.com/flex/spark";
+	@namespace mx "library://ns.adobe.com/flex/mx";
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
+		    fontWeight: bold;           
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
+		    fontStyle: italic;          
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+		s|WindowedApplication{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+		s|Window{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|TitleBar{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|Button{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|Label{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}	
+
+
+		global{
+		    fontFamily: EmbeddedVerdana;
+		    fontAntiAliasType: normal;
+		}
+	</fx:Style>
+	<fx:Script>
+	    <![CDATA[
+		import spark.components.Window;
+		import 	flash.display.NativeWindow;
+		import mx.core.FlexGlobals;
+		import spark.components.windowClasses.TitleBar;
+		import comps.*;
+		import flash.system.Capabilities;
+		import spark.components.WindowedApplication; 
+		import mx.events.FlexEvent;
+		public var childWindowList:Array=new Array();
+
+		public var myWin:MyWindow;
+
+		public var windowWithDefferContent:Window;
+
+		public function createAWindow():void
+		{
+		    myWin=new MyWindow();
+		    myWin.title="window test";
+		    myWin.titleBar=new TitleBar();
+		    myWin.titleBar.title="titlebar";
+		    myWin.width=300;
+		    myWin.height=350;
+		    myWin.minimizable=true;
+		    myWin.maximizable=true;
+		    myWin.resizable=true;
+		    myWin.systemChrome="standard";
+		    myWin.transparent=false;
+		    myWin.type="normal";
+		    childWindowList.push(myWin);
+		    myWin.addEventListener("creationComplete", handleNewWindowCreationComplete);
+		    myWin.open(true);
+
+		}	
+		public function createAWindowByClass(c:Class, creationPolicy:String,yPos:Number=100):void
+		{
+			windowWithDefferContent=new c();
+			c(windowWithDefferContent).policy=creationPolicy;
+			c(windowWithDefferContent).yValue=yPos;
+			windowWithDefferContent.title="test window";
+			windowWithDefferContent.systemChrome="standard";
+			childWindowList.push(windowWithDefferContent);
+			windowWithDefferContent.addEventListener("creationComplete", handleNewWindowCreationComplete);
+			windowWithDefferContent.open(true);
+		}
+
+		public function handleNewWindowCreationComplete(e:FlexEvent):void
+		{
+		    e.currentTarget.removeEventListener("creationComplete", handleNewWindowCreationComplete);
+		    dispatchEvent(new FlexEvent("myWindowComplete"));
+		}
+
+
+		public function checkNativeWindow():String
+		{
+		    var current_os:String=Capabilities.os.toLowerCase();
+		    var expect_width:Number=308, expect_height:Number=384;
+		    if (current_os.indexOf("mac")>-1)
+		    {
+		    	expect_width=300;
+		    	expect_height=372;
+		    }else if (current_os.indexOf("linux")>-1)
+		    {
+		    }
+		    var nw:NativeWindow=myWin.nativeWindow;
+		    var errMsg:String="";
+		    if (nw.width!=expect_width)
+			errMsg+="width not expected, nw.width="+nw.width+";expect="+expect_width+"\n";
+		    if (nw.height!=expect_height)
+			errMsg+="height not expected, nw.height="+nw.height+";expect="+expect_height+"\n";
+		    if (nw.resizable!=myWin.resizable)
+			errMsg+="resizable not expected, nw.resizable="+nw.resizable+";expect="+myWin.resizable+"\n";
+		    if (nw.minimizable!=myWin.minimizable)
+			errMsg+="minimizable not expected, nw.minimizable="+nw.minimizable+";expect="+myWin.minimizable+"\n";
+		    if (nw.maximizable!=myWin.maximizable)
+			errMsg+="maximizable not expected, nw.maximizable="+nw.maximizable+";expect="+myWin.maximizable+"\n";
+		    if (nw.type!=myWin.type)
+			errMsg+="type not expected, nw.type="+nw.type+";expect="+myWin.type+"\n";
+		    if (nw.systemChrome!=myWin.systemChrome)
+		       errMsg+="systemChrome not expected, nw.systemChrome="+nw.systemChrome+";expect="+myWin.systemChrome+"\n";
+		    return errMsg;
+		}
+
+
+		public function updateWindow():void
+		{
+		    myWin.width=400;
+		    myWin.height=400;
+		    myWin.title="updated title";
+		    dispatchEvent(new FlexEvent("updateComplete"));
+		}
+		public function verifyNativeWindowUpdate():String
+		{
+		    var errMsg:String="";
+		    var current_os:String=Capabilities.os.toLowerCase();
+		    var expect_width:Number=192, expect_height:Number=166;
+		    if (current_os.indexOf("mac")>-1)
+		    {
+			expect_width=200;
+			expect_height=178;
+		    }else if (current_os.indexOf("linux")>-1)
+		    {
+		    }
+		    trace("myWin.width="+myWin.width+";myWin.height="+myWin.height);
+		    
+		    if (myWin.width!=expect_width)
+			errMsg+="width not expected, myWin.width="+myWin.width+";expect="+expect_width+"\n";
+		    if (myWin.height!=expect_height)
+			errMsg+="height not expected, myWin.height="+myWin.height+";expect="+expect_height+"\n";
+		    if( myWin.title=="test window")
+		       errMsg+="title not expected, title should be changed in systemchrome skin, actual="+myWin.title;
+		    return errMsg;
+		}
+
+
+		public function closeAllChildWindow():void
+		{
+
+			var win:Window;
+		    while(childWindowList.length>0)
+		    {
+				win=Window(childWindowList.pop());
+				if (win!=null && !win.closed)
+					win.close();
+		    }
+
+		}
+		/**
+		*   compare the actual value with expected value based on os.  It returns an error string if comparison fails, otherwise an empty string.
+		*   description: a string you can use to describe what is the test for, you can set it to null.
+		*   actualVal: actual value used to compare for
+		*   expectWinVal: expected value on window os
+		*   expectMacVal: expected value on mac os
+		*   expectLinuxVal: expected value on linux os 
+		*/
+		public function assertValueBaseOnOS(description:String,actualVal:*,expectWinVal:*=null,expectMacVal:*=null,expectLinuxVal:*=null):String
+		{
+			var errMsg:String="";
+			var current_os:String=Capabilities.os.toLowerCase();
+			if (current_os.indexOf("window")>-1)
+			{
+				if (actualVal!=expectWinVal)
+					errMsg+="on os="+current_os+", actual value="+actualVal+";expected value="+expectWinVal;
+			}else if (current_os.indexOf("mac")>-1)
+			{
+				if (actualVal!=expectMacVal)
+					errMsg+="on os="+current_os+", actual value="+actualVal+";expected value="+expectMacVal;
+			}else if (current_os.indexOf("linux")>-1)
+			{
+				if (actualVal!=expectLinuxVal)
+					errMsg+="on os="+current_os+", actual value="+actualVal+";expected value="+expectLinuxVal;
+
+			}else {
+				errMsg+="on os="+current_os+" isn't supported";
+			}
+			if (description!=null && errMsg!="")
+				errMsg=description+" "+errMsg;
+			return errMsg;
+		}
+	    ]]>
+	</fx:Script>
+</s:WindowedApplication>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_002.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_002.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_002.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_002.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,258 @@
+<?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.
+
+-->
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+	xmlns:mx="library://ns.adobe.com/flex/mx"
+	xmlns:comps="comps.*"
+    	xmlns:local="*" close="closeAllChildWindow()">
+    <fx:Style>
+	@namespace s "library://ns.adobe.com/flex/spark";
+	@namespace mx "library://ns.adobe.com/flex/mx";
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
+		    fontWeight: bold;           
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
+		    fontStyle: italic;          
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+		s|WindowedApplication{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+		s|Window{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|TitleBar{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|Button{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|Label{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}	
+
+	        mx|Label{
+		    fontFamily: EmbeddedVerdanaHalo;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+		global{
+		    fontFamily: EmbeddedVerdana;
+		    fontAntiAliasType: normal;
+		}
+	</fx:Style>
+	<fx:Script>
+	    <![CDATA[
+		import spark.components.Window;
+		import mx.core.FlexGlobals;
+
+		import spark.components.WindowedApplication; 
+		import mx.events.FlexEvent;
+		import mx.core.IWindow;
+
+		import comps.*;
+
+		public var childWindowList:Array=new Array();
+		public var myWin:MyWindowWithButton;
+
+		public function createAWindow():void
+		{
+		    myWin=new MyWindowWithButton();
+		    myWin.title="test window";
+		    myWin.width=300;
+		    myWin.height=350;
+		    myWin.systemChrome="standard";
+
+		    var b:Button=new Button();
+		    b.name="testButton";
+		    b.label="testButton";
+		    b.y=50;
+		    myWin.addElement(b);
+		    myWin.addEventListener("creationComplete", handleNewWindowCreationComplete);
+		    childWindowList.push(myWin);
+		    myWin.open(true);
+
+		}	
+		public function keyDownFunc(event:KeyboardEvent):void
+		{
+		    myWin.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownFunc);
+		    info.text=event.keyCode+" Pressed";
+		    trace("###in keyDownFunc, info.text="+info.text);
+		    dispatchEvent(new FlexEvent("keyPressed"));
+		}
+		public function addKeyDownListener():void
+		{
+		    myWin.addEventListener(KeyboardEvent.KEY_DOWN, keyDownFunc);
+
+		}
+
+		public function assertKeyPressed():Boolean
+		{
+		    trace("###info.text="+info.text);
+		    return info.text!="info" && (info.text.indexOf("Pressed")>-1);
+		}
+
+		public function handleNewWindowCreationComplete(e:FlexEvent):void
+		{
+		    myWin.removeEventListener("creationComplete", handleNewWindowCreationComplete);
+		    dispatchEvent(new FlexEvent("myWindowComplete"));
+		}
+
+
+		public function testGetChildByName(win:IWindow, name:String):Boolean
+		{
+		    var iv:DisplayObject=null;
+		    if (win is Window)
+			iv=Window(win).contentGroup.getChildByName(name);
+		    else if (win is  spark.components.WindowedApplication)
+			iv=WindowedApplication(win).contentGroup.getChildByName(name);
+		    if (iv!=null && iv is Button)
+		    {
+			var b:Button=Button(iv);
+			if (b.name.indexOf(name)>-1)
+			 return true;
+
+		    } return false;
+		}
+
+
+		public function closeAllChildWindow():void
+		{
+
+			var win:Window;
+		    while(childWindowList.length>0)
+		    {
+				win=Window(childWindowList.pop());
+				if (win!=null && !win.closed)
+					win.close();
+		    }
+
+		}
+	       public function testButtonOnWindow(name:String):Boolean
+	       {
+		    return testGetChildByName(myWin,name);
+	       }
+
+
+	       public function testButtonOnWindowedApplication(name:String):Boolean
+	       {
+		     return testGetChildByName(this,name);
+	       }
+		/**
+		*   compare the actual value with expected value based on os.  It returns an error string if comparison fails, otherwise an empty string.
+		*   description: a string you can use to describe what is the test for, you can set it to null.
+		*   actualVal: actual value used to compare for
+		*   expectWinVal: expected value on window os
+		*   expectMacVal: expected value on mac os
+		*   expectLinuxVal: expected value on linux os 
+		*/
+		public function assertValueBaseOnOS(description:String,actualVal:*,expectWinVal:*=null,expectMacVal:*=null,expectLinuxVal:*=null):String
+		{
+			var errMsg:String="";
+			var current_os:String=Capabilities.os.toLowerCase();
+			if (current_os.indexOf("window")>-1)
+			{
+				if (actualVal!=expectWinVal)
+					errMsg+="on os="+current_os+", actual value="+actualVal+";expected value="+expectWinVal;
+			}else if (current_os.indexOf("mac")>-1)
+			{
+				if (actualVal!=expectMacVal)
+					errMsg+="on os="+current_os+", actual value="+actualVal+";expected value="+expectMacVal;
+			}else if (current_os.indexOf("linux")>-1)
+			{
+				if (actualVal!=expectLinuxVal)
+					errMsg+="on os="+current_os+", actual value="+actualVal+";expected value="+expectLinuxVal;
+
+			}else {
+				errMsg+="on os="+current_os+" isn't supported";
+			}
+			if (description!=null && errMsg!="")
+				errMsg=description+" "+errMsg;
+			return errMsg;
+		}
+	    ]]>
+	</fx:Script>
+  <s:Button id="button1" name="button1" label="button1" />
+  <mx:Label id="info" name="info" text="info" />
+</s:WindowedApplication>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_003.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_003.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_003.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_003.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,507 @@
+<?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.
+
+-->
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+	xmlns:mx="library://ns.adobe.com/flex/mx"
+	xmlns:comps="comps.*"
+    	xmlns:local="*" close="closeAllChildWindow()">
+    <fx:Style>
+	@namespace s "library://ns.adobe.com/flex/spark";
+	@namespace mx "library://ns.adobe.com/flex/mx";
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
+		    fontWeight: bold;           
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
+		    fontStyle: italic;          
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+		s|WindowedApplication{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+		s|Window{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|TitleBar{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|Button{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|TextArea{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|Label{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}	
+	        s|CheckBox{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        mx|Label{
+		    fontFamily: EmbeddedVerdanaHalo;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        mx|DataGrid{
+		    fontFamily: EmbeddedVerdanaHalo;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+ 
+		global{
+		    fontFamily: EmbeddedVerdana;
+		    fontAntiAliasType: normal;
+		}
+	</fx:Style>
+	<fx:Script>
+	    <![CDATA[
+		import spark.components.Window;
+		import mx.core.IWindow;
+		import flash.display.NativeWindow;
+		import mx.core.FlexGlobals;
+		import spark.components.WindowedApplication; 
+		import mx.events.FlexEvent;
+		import mx.controls.Label;
+		import mx.core.IVisualElement;
+		import mx.collections.ArrayCollection;
+		import comps.*;
+
+		public var childWindowList:Array=new Array();
+
+		public var myWin:MyWindowWithContents;
+		
+
+		public function createAWindow():void
+		{
+		    myWin=new MyWindowWithContents();
+		    myWin.systemChrome="standard";
+		    myWin.alwaysInFront=true;
+		    myWin.title="test window";
+
+		    myWin.width=400;
+		    myWin.height=400;
+		    childWindowList.push(myWin);
+		    myWin.addEventListener("creationComplete", handleNewWindowCreationComplete);
+		    myWin.open(true);
+
+		}	
+		public function createANoOpenWindowByClass(c:Class, title:String,yPos:Number=100):Window
+		{
+			var win:Window=new c();
+			c(win).y=yPos;
+			win.title=title;
+			win.systemChrome="standard";
+			win.width=400;
+		        win.height=400;
+			childWindowList.push(win);
+			win.addEventListener("creationComplete", handleNewWindowCreationComplete);
+			return win;
+		}
+		public function handleNewWindowCreationComplete(e:FlexEvent):void
+		{
+		    e.target.removeEventListener("creationComplete", handleNewWindowCreationComplete);
+		    dispatchEvent(new FlexEvent("myWindowComplete"));
+		}
+
+
+		public function resetWindow():void
+		{
+			closeAllChildWindow();
+			createAWindow();
+		}
+		public function testAddElement():void
+		{
+			var b:spark.components.Button=new spark.components.Button();
+			b.label="new Button";
+			b.name="addElementTest";
+			b.y=70;
+			myWin.addElement(b);
+		}	  
+		public function testAddElementAt(index:Number):Boolean
+		{
+			var lb:Label=new Label();
+			lb.text="new label";
+			lb.x=30*(index+1)
+			var elementCount:Number=myWin.numElements;
+			myWin.addElementAt(lb,index);
+			var n:Number=myWin.numElements;
+			if ((elementCount+1)!=n)
+				return false;
+			var  vElement:IVisualElement=myWin.getElementAt(index);
+			if (!(vElement is Label) || Label(vElement).text!=lb.text)
+				return false;
+			else return true;
+
+		}
+		public function testAddElementAtNegative(index:Number):Boolean
+		{
+			var lb:Label=new Label();
+			lb.text="new label";
+			lb.x=30;
+			try{
+			myWin.addElementAt(lb,index);//index isn't available
+			return false;//if no error, then test fails
+			}catch(e:Error)
+			{
+
+			}
+
+			return true;
+		}
+
+
+		public function testGetElementAt(pos:Number):Boolean
+		{
+			var iv:IVisualElement=myWin.getElementAt(pos);//this should return a button
+			var index:Number=myWin.getElementIndex(iv);
+
+			if (index!=pos)
+			{ 
+			return false;
+			}else 
+			return true;
+		}
+		public function testGetElementIndexNegative():Boolean
+		{
+
+			var lb:Label=new Label();
+			lb.text="new label";
+			lb.x=30;
+			var index:Number=-1;
+			try
+			{
+				index=myWin.getElementIndex(lb);
+			}catch(e:Error)
+			{
+			}
+			if (index!=-1)
+			{
+				trace("###index="+index)
+				return false;
+			}
+			else return true;
+		}
+		public function testGetFirstButton():Boolean
+		{
+
+			var iv:IVisualElement=myWin.getElementAt(1);//this should return a button
+			if (iv is spark.components.Button)
+			{
+			 var b:spark.components.Button=spark.components.Button(iv);
+			if (b.label.indexOf("test Button")>-1)
+			{
+				return true;
+			}
+			else 
+			{
+				trace("###button label not expected");
+				return false;
+			}
+			}else 
+			{
+			trace("###first element isn't a button");
+			return false;
+		}
+
+		}
+		public function testGetElementAtNegative(index:Number):Boolean
+		{
+
+			var iv:IVisualElement=null;
+			try
+			{
+			iv=myWin.getElementAt(index);
+			return false;
+			}catch(e:Error)
+			{
+			}
+			if (iv!=null)
+			return false;
+			else
+			return true;
+		}
+
+		public function closeAllChildWindow():void
+		{
+			var win:Window=null;
+			while(childWindowList.length>0)
+			{
+				win=Window(childWindowList.pop());
+				if (win!=null && !win.closed)
+				{	
+					win.close();
+					win=null;
+				}
+			}
+
+		}
+		public function testRemoveElement():Boolean
+		{
+
+			var iv:IVisualElement=myWin.getElementAt(2);//this should return the drop down list
+			myWin.removeElement(iv); //the drop down list is removed
+			var displayObj:DisplayObject=myWin.getChildByName("datagrid1");//try to get the dropdown list again
+			if (displayObj !=null)
+			return false;
+			else 
+			return true;
+
+		}
+		public function testRemoveElement2():Boolean
+		{
+
+			testAddElement();
+			var num:Number=myWin.numElements;
+			var iv:IVisualElement;
+			var coll:ArrayCollection=new  ArrayCollection();
+
+			for (var i:Number=0;i<num;i++)
+			{	
+			iv=myWin.getElementAt(i);
+			coll.addItem(iv);
+			}
+			for (i=0;i<num;i++)
+			{	
+			myWin.removeElement(IVisualElement(coll.getItemAt(i))); 
+			}
+			num=myWin.numElements;
+			if (num!=0)
+			return false;
+			else 
+			return true;
+
+		}
+
+	      public function testRemoveElementNegative():Boolean
+	      {
+
+			var iv:IVisualElement=myWin.getElementAt(2);
+			myWin.removeElement(iv); 
+			try{
+				//try to remove it again, will receive an error
+				myWin.removeElement(iv);//remove it again
+				return false;//if no error, then return false as we are expecting an error
+
+			}catch(e:Error)
+			{
+				trace(e);
+				return true;
+			}
+
+				return true;
+		}
+
+	      public function testRemoveElementNegative2():Boolean
+	      {
+
+			try{
+			myWin.removeElement(button1);//remove an element not own, should receive an error
+			return false;
+			}catch(e:Error)
+			{
+				trace(e);
+				return true;
+			}
+				return true;
+	      }
+
+
+
+		public function testRemoveElementAt():Boolean
+		{
+			var iv:DisplayObject=null;
+			try{
+				myWin.removeElementAt(4); //remove the drop down list
+				iv=myWin.contentGroup.getChildByName("datagrid1");//try to get the dropdown list again
+			}catch(e:Error)
+			{
+				trace("###ERROR:"+e);
+				return false;
+			}
+			if (iv !=null) 
+				return false;
+			else 
+				return true;
+		}
+
+		public function testRemoveElementAtNegative(index:Number):Boolean
+		{
+
+			var element:IVisualElement=null;
+			try{
+				element=myWin.removeElementAt(index); 
+				return false;
+			}catch(e:Error)
+			{
+				trace(e);
+			}
+			if (element!=null)
+				return false;
+			else 
+				return true;
+		}
+
+		public function testRemoveElementAt2():Boolean
+		{
+			var num:Number=myWin.numElements;
+			var iv:IVisualElement;
+			var coll:ArrayCollection=new  ArrayCollection();
+
+			for (var i:Number=0;i<num;i++)
+			{	
+				myWin.removeElementAt(0); 
+			}
+			num=myWin.numElements;
+			if (num!=0)
+				return false;
+			else 
+				return true;
+
+		}
+
+		public function testRemoveAllElements():String
+		{
+			var errMsg:String="";
+			myWin.removeAllElements();
+			var iv:DisplayObject=myWin.contentGroup.getChildByName("datagrid1");//try to get the dropdown list again
+			if (iv !=null)
+				errMsg+="wrong, datagrid should be removed, expect NUll\n";
+			iv=myWin.getChildByName("childLabel");
+			if (iv !=null)
+				errMsg+="wrong, the childLabel should be removed, expect NUll\n";
+
+			iv=myWin.getChildByName("childButton");
+			if (iv !=null)
+				errMsg+="wrong, the childButton should be removed, expect NUll\n";
+
+			var tmp:IVisualElement=null;
+			try{
+
+				tmp= myWin.getElementAt(0);
+				errMsg+="wrong, element already removed, should get an error\n";
+			}catch(e:Error)
+			{
+			}
+			if (tmp !=null)
+				errMsg+="wrong, expect no child for the window\n";
+			return errMsg;
+
+		}
+		public function testOwns(win:IWindow,b:DisplayObject,expect:Boolean):Boolean
+		{
+			var flag:Boolean=false;
+			if (win is Window)
+				flag=Window(win).owns(b);
+			else if (win is  spark.components.WindowedApplication)
+				flag=WindowedApplication(win).owns(b);
+			if (flag==expect)
+			{
+				return true;
+			}else 
+				return false;
+
+		}
+		public function testOwns2():Boolean
+		{
+			var flag:Boolean=false;
+			var displayObj:DisplayObject=DisplayObject(myWin.getElementAt(1));
+			flag=myWin.owns(displayObj);
+
+			if (!flag)
+				return false;
+
+			myWin.removeElementAt(1);
+			flag=myWin.owns(displayObj);
+
+			if (flag) return false;
+			else return true;
+		}
+
+		]]>
+	</fx:Script>
+  <s:Button id="button1" name="button1" label="button1" />
+ 
+</s:WindowedApplication>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_004.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_004.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_004.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_004.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,187 @@
+<?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.
+
+-->
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+	xmlns:mx="library://ns.adobe.com/flex/mx"
+	xmlns:comps="comps.*"
+    	xmlns:local="*" close="closeAllChildWindow()">
+    <fx:Style>
+	@namespace s "library://ns.adobe.com/flex/spark";
+	@namespace mx "library://ns.adobe.com/flex/mx";
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
+		    fontWeight: bold;           
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
+		    fontStyle: italic;          
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+		s|WindowedApplication{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+		s|Window{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|TitleBar{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|Button{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|Label{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}	
+
+	        mx|Label{
+		    fontFamily: EmbeddedVerdanaHalo;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+		global{
+		    fontFamily: EmbeddedVerdana;
+		    fontAntiAliasType: normal;
+		}
+	</fx:Style>
+	<fx:Script>
+	    <![CDATA[
+		import spark.components.Window;
+		import 	flash.display.NativeWindow;
+		import mx.core.FlexGlobals;
+		import mx.collections.ArrayCollection;
+		import spark.components.windowClasses.TitleBar;
+		import comps.*;
+		import flash.system.Capabilities;
+		import spark.components.WindowedApplication; 
+		import mx.events.FlexEvent;
+		public var childWindowList:ArrayCollection=new ArrayCollection();
+
+		public var myWin:ParentWindow;
+		public var subWinObjRef:SubWindow;
+		public var objInSubWinRef:Window;
+
+		public function createAWindow():void
+		{
+		    myWin=new ParentWindow();
+		    myWin.title="window test";
+		    myWin.titleBar=new TitleBar();
+		    myWin.titleBar.title="titlebar";
+		    myWin.width=300;
+		    myWin.height=350;
+		    myWin.minimizable=true;
+		    myWin.maximizable=true;
+		    myWin.resizable=true;
+		    myWin.systemChrome="standard";
+		    myWin.transparent=false;
+		    myWin.type="normal";
+		    childWindowList.addItem(myWin);
+		    myWin.addEventListener("creationComplete", handleNewWindowCreationComplete);
+		    myWin.open(true);
+
+		}
+
+
+
+		public function handleNewWindowCreationComplete(e:FlexEvent):void
+		{
+		    subWinObjRef=myWin.subWinObj;
+		    objInSubWinRef=myWin.subWinObj.objInSubWin;
+		    e.currentTarget.removeEventListener("creationComplete", handleNewWindowCreationComplete);
+		    dispatchEvent(new FlexEvent("myWindowComplete"));
+		}			 
+
+		public function closeAllChildWindow():void
+		{
+		    var numWindows:Number=childWindowList.length;
+			var win:Window;
+		    for (var i:Number=0;i<numWindows;i++)
+		    {
+				win=Window(childWindowList.getItemAt(i));
+				if (win!=null && !win.closed)
+					win.close();
+		    }
+		}
+
+	    ]]>
+	</fx:Script>
+<mx:Label id="testLabel" text="info" />
+<s:Button id="appButton" label="parent" />
+</s:WindowedApplication>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_005.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_005.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_005.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_005.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,295 @@
+<?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.
+
+-->
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+	xmlns:mx="library://ns.adobe.com/flex/mx"
+	xmlns:comps="comps.*"
+    	xmlns:local="*" close="closeAllChildWindow()">
+<fx:Style>
+@namespace s "library://ns.adobe.com/flex/spark";
+@namespace mx "library://ns.adobe.com/flex/mx";
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
+	    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
+	    fontWeight: bold;           
+	    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
+	    fontStyle: italic;          
+	    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+	    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+	    fontWeight: bold;
+	    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+	    fontStyle: italic;
+	    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+	}
+        @font-face {
+            src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+            fontFamily: EmbeddedVerdanaHalo;
+            embedAsCFF: false;
+        }
+
+        @font-face {
+            src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+            fontWeight: bold;
+            fontFamily: EmbeddedVerdanaHalo;
+            embedAsCFF: false;
+        }
+
+        @font-face {
+            src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+            fontStyle: italic;
+            fontFamily: EmbeddedVerdanaHalo;
+            embedAsCFF: false;
+        }
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Regular.ttf");
+	    fontFamily: EmbeddedMeiryo;
+	    embedAsCFF: true;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Bold.ttf");
+	    fontWeight: bold;
+	    fontFamily: EmbeddedMeiryo;
+	    embedAsCFF: true;
+	}
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Regular.ttf");
+	    fontFamily: EmbeddedMeiryoHalo;
+	    embedAsCFF: false;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Bold.ttf");
+	    fontWeight: bold;
+	    fontFamily: EmbeddedMeiryoHalo;
+	    embedAsCFF: false;
+	}
+	
+	s|WindowedApplication{
+	    fontFamily: EmbeddedVerdana;
+	    fontLookup: embeddedCFF;
+	    fontAntiAliasType: normal;
+	}
+
+	s|Window{
+	    fontFamily: EmbeddedVerdana;
+	    fontLookup: embeddedCFF;
+	    fontAntiAliasType: normal;
+	}
+
+	s|TitleBar{
+	    fontFamily: EmbeddedVerdana;
+	    fontLookup: embeddedCFF;
+	    fontAntiAliasType: normal;
+	}
+	s|Button{
+	    fontFamily: EmbeddedVerdana;
+	    fontLookup: embeddedCFF;
+	    fontAntiAliasType: normal;
+	}
+	s|TextArea{
+	    fontFamily: EmbeddedVerdana;
+	    fontLookup: embeddedCFF;
+	    fontAntiAliasType: normal;
+	}
+
+	s|Label{
+	    fontFamily: EmbeddedVerdana;
+	    fontLookup: embeddedCFF;
+	    fontAntiAliasType: normal;
+	}	
+
+	mx|Label{
+	    fontFamily: EmbeddedVerdanaHalo;
+	    fontLookup: embeddedCFF;
+	    fontAntiAliasType: normal;
+	}
+	global{
+	    fontFamily: EmbeddedVerdana;
+	    fontAntiAliasType: normal;
+	}
+	.testStyle1{
+	    skinClass: ClassReference("spark.skins.spark.WindowedApplicationSkin");
+	}
+
+	.testStyle2{
+	    skinClass: ClassReference("spark.skins.spark.SparkChromeWindowedApplicationSkin");
+	}
+	.testStyle3{
+	    fontFamily: EmbeddedMeiryo;
+	    fontLookup: embeddedCFF;
+            fontAntiAliasType: normal;
+	}
+    </fx:Style>
+    <fx:Script>
+	<![CDATA[
+		import spark.components.Window;
+		import 	flash.display.NativeWindow;
+		import mx.core.FlexGlobals;
+		import spark.components.windowClasses.TitleBar;
+		import comps.*;
+		import flash.system.Capabilities;
+		import spark.components.WindowedApplication; 
+		import mx.collections.ArrayCollection;
+		import mx.events.FlexEvent;
+
+
+		public var screenHeightFudged:int = flash.system.Capabilities.screenResolutionY - 100;
+		public var screenWidthFudged:int = flash.system.Capabilities.screenResolutionX - 4;
+		public var childWindowList:Array=new Array();
+
+		public var window1:PlainWindow, window2:PlainWindow,windowObj:Window,windowObj2:Window;
+
+		public function createAWindow():void
+		{
+			windowObj=new Window();
+			windowObj.x=200;
+			windowObj.title="plain window 1";
+			windowObj.systemChrome="standard";
+			childWindowList.push(windowObj);
+			windowObj.addEventListener("creationComplete", handleNewWindowCreationComplete);
+			windowObj.open(true);
+		}
+		public function createAWindowWithResizeAffordanceWidth(widthVal:Number):void
+		{
+			windowObj=new Window();
+			windowObj.title="plain window 1";
+			windowObj.systemChrome="standard";
+			windowObj.setStyle("resizeAffordanceWidth",widthVal);
+			childWindowList.push(windowObj);
+			windowObj.addEventListener("creationComplete", handleNewWindowCreationComplete);
+			windowObj.open(true);
+		}
+		public function createAWindowByClass(c:Class, title:String,yPos:Number=100):Window
+		{
+			windowObj=createANoOpenWindowByClass(c,title,yPos);
+			windowObj.open(true);
+			return windowObj;
+		}
+
+		public function createANoOpenWindowByClass(c:Class, title:String,yPos:Number=100):Window
+		{
+			var win:Window=new c();
+			c(win).y=yPos;
+			win.title=title;
+			win.systemChrome="standard";
+			childWindowList.push(win);
+			win.addEventListener("creationComplete", handleNewWindowCreationComplete);
+			return win;
+		}
+		public function createAWindowWithScroller():void
+		{
+			windowObj=new WindowWithClippedContent();
+			windowObj.setStyle("skinClass", comps.SkinWithScroller);
+			windowObj.title="scroller window 1";
+			windowObj.systemChrome="standard";
+			childWindowList.push(windowObj);
+			windowObj.addEventListener("creationComplete", handleNewWindowCreationComplete);
+			windowObj.open(true);
+		}
+
+		public function handleNewWindowCreationComplete(e:FlexEvent):void
+		{
+		    e.currentTarget.removeEventListener("creationComplete", handleNewWindowCreationComplete);
+		    dispatchEvent(new FlexEvent("myWindowComplete"));
+		}
+
+
+
+		public function closeAllChildWindow():void
+		{
+
+		    while(childWindowList.length>0)
+		    {
+			var win:Window=Window(childWindowList.pop());
+			win.close();
+		    }
+
+		}
+
+		/**
+		*   compare the actual value with expected value based on os.  It returns an error string if comparison fails, otherwise an empty string.
+		*   description: a string you can use to describe what is the test for, you can set it to null.
+		*   actualVal: actual value used to compare for
+		*   expectWinVal: expected value on window os
+		*   expectMacVal: expected value on mac os
+		*   expectLinuxVal: expected value on linux os 
+		*/
+		public function assertValueBaseOnOS(description:String,actualVal:*,expectWinVal:*=null,expectMacVal:*=null,expectLinuxVal:*=null):String
+		{
+			var errMsg:String="";
+			var current_os:String=Capabilities.os.toLowerCase();
+			if (current_os.indexOf("window")>-1)
+			{
+				if (actualVal!=expectWinVal)
+					errMsg+="on os="+current_os+", actual value="+actualVal+";expected value="+expectWinVal;
+			}else if (current_os.indexOf("mac")>-1)
+			{
+				if (actualVal!=expectMacVal)
+					errMsg+="on os="+current_os+", actual value="+actualVal+";expected value="+expectMacVal;
+			}else if (current_os.indexOf("linux")>-1)
+			{
+				if (actualVal!=expectLinuxVal)
+					errMsg+="on os="+current_os+", actual value="+actualVal+";expected value="+expectLinuxVal;
+
+			}else {
+				errMsg+="on os="+current_os+" isn't supported";
+			}
+			if (description!=null && errMsg!="")
+				errMsg=description+" "+errMsg;
+			return errMsg;
+		}
+	[Bindable]
+	public var cards:ArrayCollection = new ArrayCollection(
+		[ {label:"CreditCard1", data:1}, 
+		  {label:"CreditCard2", data:2}, 
+		  {label:"CreditCard3", data:3} ]);
+
+
+
+	]]>
+    </fx:Script>
+    <mx:ComboBox id="cb" dataProvider="{cards}" width="150" />
+</s:WindowedApplication>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_006.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_006.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_006.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_006.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,194 @@
+<?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.
+
+-->
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+	xmlns:mx="library://ns.adobe.com/flex/mx"
+	xmlns:comps="comps.*"
+    	xmlns:local="*" close="closeAllChildWindow()">
+<fx:Style>
+@namespace s "library://ns.adobe.com/flex/spark";
+@namespace mx "library://ns.adobe.com/flex/mx";
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
+	    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
+	    fontWeight: bold;           
+	    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
+	    fontStyle: italic;          
+	    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+	    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+	    fontWeight: bold;
+	    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+	    fontStyle: italic;
+	    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+	}
+        @font-face {
+            src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+            fontFamily: EmbeddedVerdanaHalo;
+            embedAsCFF: false;
+        }
+
+        @font-face {
+            src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+            fontWeight: bold;
+            fontFamily: EmbeddedVerdanaHalo;
+            embedAsCFF: false;
+        }
+
+        @font-face {
+            src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+            fontStyle: italic;
+            fontFamily: EmbeddedVerdanaHalo;
+            embedAsCFF: false;
+        }
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Regular.ttf");
+	    fontFamily: EmbeddedMeiryo;
+	    embedAsCFF: true;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Bold.ttf");
+	    fontWeight: bold;
+	    fontFamily: EmbeddedMeiryo;
+	    embedAsCFF: true;
+	}
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Regular.ttf");
+	    fontFamily: EmbeddedMeiryoHalo;
+	    embedAsCFF: false;
+	}
+
+	@font-face {
+	    src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Bold.ttf");
+	    fontWeight: bold;
+	    fontFamily: EmbeddedMeiryoHalo;
+	    embedAsCFF: false;
+	}
+	
+	s|WindowedApplication{
+	    fontFamily: EmbeddedMeiryo;
+	    fontLookup: embeddedCFF;
+	    fontAntiAliasType: normal;
+	}
+
+	s|Window{
+	    fontFamily: EmbeddedMeiryo;
+	    fontLookup: embeddedCFF;
+	    fontAntiAliasType: normal;
+	}
+
+	s|TitleBar{
+	    fontFamily: EmbeddedMeiryo;
+	    fontLookup: embeddedCFF;
+	    fontAntiAliasType: normal;
+	}
+	s|Button{
+	    fontFamily: EmbeddedMeiryo;
+	    fontLookup: embeddedCFF;
+	    fontAntiAliasType: normal;
+	}
+
+	s|Label{
+	    fontFamily: EmbeddedMeiryo;
+	    fontLookup: embeddedCFF;
+	    fontAntiAliasType: normal;
+	}	
+	global{
+	    fontFamily: EmbeddedMeiryo;
+	    fontAntiAliasType: normal;
+	}
+	
+    </fx:Style>
+    <fx:Script>
+	<![CDATA[
+		import spark.components.Window;
+		import 	flash.display.NativeWindow;
+		import mx.core.FlexGlobals;
+		import spark.components.windowClasses.TitleBar;
+		import comps.*;
+		import flash.system.Capabilities;
+		import spark.components.WindowedApplication; 
+		import mx.events.FlexEvent;
+		public var childWindowList:Array=new Array();
+
+		public var windowObj:Window;
+
+		public function createAWindow():void
+		{
+			windowObj=new Window();
+			windowObj.x=200;
+			windowObj.minWidth=140;
+			windowObj.title="plain window 1";
+			windowObj.systemChrome="standard";
+			childWindowList.push(windowObj);
+			windowObj.addEventListener("creationComplete", handleNewWindowCreationComplete);
+			windowObj.open(true);
+		}
+		 
+
+		public function handleNewWindowCreationComplete(e:FlexEvent):void
+		{
+		    e.currentTarget.removeEventListener("creationComplete", handleNewWindowCreationComplete);
+		    dispatchEvent(new FlexEvent("myWindowComplete"));
+		}
+
+
+
+		public function closeAllChildWindow():void
+		{
+
+			var win:Window;
+		    while(childWindowList.length>0)
+		    {
+				win=Window(childWindowList.pop());
+				if (win!=null && !win.closed)
+					win.close();
+		    }
+
+		}
+
+	]]>
+    </fx:Script>
+</s:WindowedApplication>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_flexchrome.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_flexchrome.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_flexchrome.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_basic_flexchrome.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,313 @@
+<?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.
+
+-->
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+	xmlns:mx="library://ns.adobe.com/flex/mx"
+	xmlns:comps="comps.*"
+    	xmlns:local="*" close="closeAllChildWindow()">
+    <fx:Style>
+	@namespace s "library://ns.adobe.com/flex/spark";
+	@namespace mx "library://ns.adobe.com/flex/mx";
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
+		    fontFamily: EmbeddedArial;
+			embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
+		    fontWeight: bold;           
+		    fontFamily: EmbeddedArial;
+			embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
+		    fontStyle: italic;          
+		    fontFamily: EmbeddedArial;
+			embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdana;
+			embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdana;
+			embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdana;
+			embedAsCFF: false;
+		}
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Regular.ttf");
+		    fontFamily: EmbeddedMeiryo;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Lobster_Two/LobsterTwo-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedMeiryo;
+		    embedAsCFF: true;
+		}
+	        s|Window
+	        {
+	            skinClass: ClassReference("spark.skins.spark.SparkChromeWindowedApplicationSkin");
+	        }
+		s|WindowedApplication{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+		s|Window{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|TitleBar{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|Button{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|DropDownList{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|Label{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}	
+
+	        mx|Label{
+		    fontFamily: EmbeddedVerdanaHalo;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	       .testStyle3{
+	    	    fontFamily: EmbeddedMeiryo;
+	            fontLookup: embeddedCFF;
+	            fontAntiAliasType: normal;
+	        }   	        
+		global{
+		    fontFamily: EmbeddedVerdana;
+		    fontAntiAliasType: normal;
+		}
+	</fx:Style>
+    	
+        <fx:Declarations> 
+	         <mx:Fade id="myFade1" alphaFrom="1" alphaTo="0" duration="1000" /> 
+		 <mx:Fade id="myFade2"  alphaFrom="0" alphaTo="1" duration="2000"/>	 	
+        </fx:Declarations> 
+	<fx:Script>
+		<![CDATA[
+
+		import spark.components.Window;
+		import 	flash.display.NativeWindow;
+		import mx.core.FlexGlobals;
+		import spark.components.windowClasses.TitleBar;
+		import comps.*;
+		import flash.system.Capabilities;
+		import spark.components.WindowedApplication; 
+		import mx.events.FlexEvent;
+		public var childWindowList:Array=new Array();
+
+		public var myWin:MySubWindow;
+		public var windowObj:Window;
+		[Bindable]
+		public var statusStr:String="this is a test, this is a test, this is a test, this is a test";
+		public function createAWindow():void
+		{
+		    myWin=new MySubWindow();
+		    myWin.title="window test";
+		    myWin.titleBar=new TitleBar();
+		    myWin.titleBar.title="titlebar";
+		    myWin.width=300;
+		    myWin.height=350;
+		    myWin.systemChrome="none";
+		    childWindowList.push(myWin);
+		    myWin.addEventListener("creationComplete", handleNewWindowCreationComplete);
+		    myWin.open(true);
+
+		}	
+
+		public function handleNewWindowCreationComplete(e:FlexEvent):void
+		{
+		    e.currentTarget.removeEventListener("creationComplete", handleNewWindowCreationComplete);
+		    dispatchEvent(new FlexEvent("myWindowComplete"));
+		}
+		public function createAWindowByClass(c:Class, title:String,yPos:Number=100):Window
+		{
+			windowObj=createANoOpenWindowByClass(c,title,yPos);
+			windowObj.open(true);
+			return windowObj;
+		}
+
+		public function createANoOpenWindowByClass(c:Class, title:String,yPos:Number=100):Window
+		{
+			var win:Window=new c();
+			c(win).y=yPos;
+			win.title=title;
+			win.systemChrome="none";
+			childWindowList.push(win);
+			win.addEventListener("creationComplete", handleNewWindowCreationComplete);
+			return win;
+		}                  
+		public function checkNativeWindow():String
+		{
+		    var nw:NativeWindow=myWin.nativeWindow;
+		    var errMsg:String="";
+		    if (nw.width!=myWin.width)
+			errMsg+="width not expected, nw.width="+nw.width+";expect="+myWin.width+"\n";
+		    if (nw.height!=myWin.height)
+			errMsg+="height not expected, nw.height="+nw.height+";expect="+myWin.height+"\n";
+		    if (nw.resizable!=myWin.resizable)
+			errMsg+="resizable not expected, nw.resizable="+nw.resizable+";expect="+myWin.resizable+"\n";
+		    if (nw.minimizable!=myWin.minimizable)
+			errMsg+="minimizable not expected, nw.minimizable="+nw.minimizable+";expect="+myWin.minimizable+"\n";
+		    if (nw.maximizable!=myWin.maximizable)
+			errMsg+="maximizable not expected, nw.maximizable="+nw.maximizable+";expect="+myWin.maximizable+"\n";
+		    if (nw.type!=myWin.type)
+			errMsg+="type not expected, nw.type="+nw.type+";expect="+myWin.type+"\n";
+		    if (nw.systemChrome!=myWin.systemChrome)
+		       errMsg+="systemChrome not expected, nw.systemChrome="+nw.systemChrome+";expect="+myWin.systemChrome+"\n";
+		    return errMsg;
+		}
+
+		public function updateNativeWindow():void
+		{
+		    var nw:NativeWindow=myWin.nativeWindow;
+		    nw.bounds=new Rectangle(0,0,300,300);
+		    nw.width=200;
+		    nw.title="test title";
+		    nw.visible=true;
+		    myWin.addEventListener("updateComplete",handleNativeWindowUpdate);
+		    nw.height=200;
+		}
+		public function handleNativeWindowUpdate(e:FlexEvent):void
+		{
+		       myWin.removeEventListener("updateComplete", handleNativeWindowUpdate);
+			dispatchEvent(new FlexEvent("NativeWindowUpdateComplete"));
+		}
+
+		public function updateWindow():void
+		{
+		    myWin.width=400;
+		    myWin.height=400;
+		    myWin.title="updated title";
+		    myWin.addEventListener("updateComplete",handleWindowUpdate);
+
+		}
+		public function handleWindowUpdate(e:FlexEvent):void
+		{
+		    myWin.removeEventListener("updateComplete", handleWindowUpdate);
+		    dispatchEvent(new FlexEvent("WindowUpdateComplete"));
+
+		}
+		public function verifyNativeWindowUpdate():String
+		{
+		    var errMsg:String="";
+		    trace("myWin.width="+myWin.width+";myWin.height="+myWin.height);
+
+		    if (myWin.height!=200)
+			errMsg+="height not expected, myWin.height="+myWin.height+";expect=200; ";
+		    if( myWin.title!="window test")
+		       errMsg+="title not expected, title should not be changed in flexchrome skin";
+		     if (myWin.width!=200)
+			errMsg+="width not expected, myWin.width="+myWin.width+";expect=200;";
+		    return errMsg;
+		}
+
+
+
+		public function closeAllChildWindow():void
+		{
+
+		    while(childWindowList.length>0)
+		    {
+			var win:Window=Window(childWindowList.pop());
+			win.close();
+			win=null;
+		    }
+
+		}
+		public function assertValueBaseOnOS(description:String,actualVal:*,expectWinVal:*=null,expectMacVal:*=null,expectLinuxVal:*=null):String
+		{
+		var errMsg:String="";
+		var current_os:String=Capabilities.os.toLowerCase();
+		if (current_os.indexOf("window")>-1)
+		{
+			if (actualVal!=expectWinVal)
+				errMsg+="on os="+current_os+", actual value="+actualVal+";expected value="+expectWinVal;
+		}else if (current_os.indexOf("mac")>-1)
+		{
+			if (actualVal!=expectMacVal)
+				errMsg+="on os="+current_os+", actual value="+actualVal+";expected value="+expectMacVal;
+		}else if (current_os.indexOf("linux")>-1)
+		{
+			if (actualVal!=expectLinuxVal)
+				errMsg+="on os="+current_os+", actual value="+actualVal+";expected value="+expectLinuxVal;
+
+		}else {
+			errMsg+="on os="+current_os+" isn't supported";
+		}
+		if (description!=null && errMsg!="")
+			errMsg=description+" "+errMsg;
+		return errMsg;
+		}	
+		]]>
+	</fx:Script>
+</s:WindowedApplication>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_effect_flexchrome.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_effect_flexchrome.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_effect_flexchrome.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_effect_flexchrome.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,251 @@
+<?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.
+
+-->
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+	xmlns:mx="library://ns.adobe.com/flex/mx"
+	xmlns:comps="comps.*"
+    	xmlns:local="*" close="closeAllChildWindow()" creationComplete="this.setStyle('hideEffect',myFade2);">
+    <fx:Style>
+	@namespace s "library://ns.adobe.com/flex/spark";
+	@namespace mx "library://ns.adobe.com/flex/mx";
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
+		    fontWeight: bold;           
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
+		    fontStyle: italic;          
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+	        s|Window
+		    {
+			 skinClass: ClassReference("spark.skins.spark.SparkChromeWindowedApplicationSkin");
+		    }
+		s|WindowedApplication{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+		s|Window{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|TitleBar{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|Button{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|DropDownList{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|Label{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}	
+
+	        mx|Label{
+		    fontFamily: EmbeddedVerdanaHalo;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+		global{
+		    fontFamily: EmbeddedVerdana;
+		    fontAntiAliasType: normal;
+		}
+	</fx:Style>
+	
+        <fx:Declarations> 
+	         <mx:Fade id="myFade1" alphaFrom="1" alphaTo="0" duration="1000" /> 
+		 <mx:Fade id="myFade2"  alphaFrom="0" alphaTo="1" duration="2000"/>	 	
+        </fx:Declarations> 
+	<fx:Script>
+		<![CDATA[
+
+			import spark.components.Window;
+			import 	flash.display.NativeWindow;
+			import mx.core.FlexGlobals;
+			import spark.components.windowClasses.TitleBar;
+			import comps.*;
+		        import flash.system.Capabilities;
+			import spark.components.WindowedApplication; 
+			import mx.events.FlexEvent;
+		        public var childWindowList:Array=new Array();
+			
+		        public var myWin:MySubWindow;
+			public function createAWindow():void
+			{
+			    myWin=new MySubWindow();
+			    myWin.title="test window";
+			    myWin.titleBar=new TitleBar();
+			    myWin.titleBar.title="titlebar";
+			    myWin.width=300;
+			    myWin.height=350;
+			    myWin.minimizable=true;
+			    myWin.maximizable=true;
+			    myWin.resizable=true;
+			    myWin.systemChrome="none";
+			    myWin.transparent=false;
+			    myWin.type="normal";
+			    childWindowList.push(myWin);
+			    myWin.setStyle("closeEffect",myFade2);
+			    myWin.setStyle("minimizeEffect",myFade2);
+			    myWin.setStyle("unminimizeEffect",myFade1);
+			    myWin.setStyle("hideEffect",myFade2);
+		            myWin.addEventListener("creationComplete", handleNewWindowCreationComplete);
+			    myWin.open(true);
+			  		            
+		        }	
+			  				
+		        public function handleNewWindowCreationComplete(e:FlexEvent):void
+			{
+			    myWin.removeEventListener("creationComplete", handleNewWindowCreationComplete);
+			    dispatchEvent(new FlexEvent("myWindowComplete"));
+                        }
+				
+			public function checkNativeWindow():String
+			{
+			    var nw:NativeWindow=myWin.nativeWindow;
+			    var errMsg:String="";
+			    if (nw.width!=myWin.width)
+			    	errMsg+="width not expected, nw.width="+nw.width+";expect="+myWin.width+"\n";
+			    if (nw.height!=myWin.height)
+			        errMsg+="height not expected, nw.height="+nw.height+";expect="+myWin.height+"\n";
+			    if (nw.resizable!=myWin.resizable)
+			        errMsg+="resizable not expected, nw.resizable="+nw.resizable+";expect="+myWin.resizable+"\n";
+			    if (nw.minimizable!=myWin.minimizable)
+			        errMsg+="minimizable not expected, nw.minimizable="+nw.minimizable+";expect="+myWin.minimizable+"\n";
+			    if (nw.maximizable!=myWin.maximizable)
+			        errMsg+="maximizable not expected, nw.maximizable="+nw.maximizable+";expect="+myWin.maximizable+"\n";
+			    if (nw.type!=myWin.type)
+			        errMsg+="type not expected, nw.type="+nw.type+";expect="+myWin.type+"\n";
+			    if (nw.systemChrome!=myWin.systemChrome)
+			       errMsg+="systemChrome not expected, nw.systemChrome="+nw.systemChrome+";expect="+myWin.systemChrome+"\n";
+			    return errMsg;
+			}
+		
+			public function updateNativeWindow():void
+			{
+			    var nw:NativeWindow=myWin.nativeWindow;
+			    nw.bounds=new Rectangle(0,0,300,300);
+			    nw.width=200;
+			    nw.height=200;
+			    nw.title="test title";
+			    nw.visible=true;
+			   dispatchEvent(new FlexEvent("updateComplete"));
+			}
+			public function updateWindow():void
+			{
+			    myWin.width=400;
+			    myWin.height=400;
+			    myWin.title="updated title";
+			    dispatchEvent(new FlexEvent("updateComplete"));
+			}
+			public function verifyNativeWindowUpdate():String
+			{
+			    var errMsg:String="";
+			    trace("myWin.width="+myWin.width+";myWin.height="+myWin.height);
+			   
+			    if (myWin.height!=200)
+				errMsg+="height not expected, myWin.height="+myWin.height+";expect=200; ";
+			    if( myWin.title!="test window")
+			       errMsg+="title not expected, title should not be changed in flexchrome skin";
+			     if (myWin.width!=200)
+				errMsg+="width not expected, myWin.width="+myWin.width+";expect=200;";
+			    return errMsg;
+	                }
+			 
+		       
+	
+			public function closeAllChildWindow():void
+			{
+			     	 
+				var win:Window;
+			    while(childWindowList.length>0)
+			    {
+					win=Window(childWindowList.pop());
+					if (win!=null && !win.closed)
+						win.close();
+			    }
+			    
+			}
+			
+		]]>
+	</fx:Script>
+</s:WindowedApplication>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_events_main.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_events_main.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_events_main.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_events_main.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,130 @@
+<?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.
+
+-->
+<s:WindowedApplication 
+	xmlns:fx="http://ns.adobe.com/mxml/2009" 
+	xmlns:s="library://ns.adobe.com/flex/spark" 
+	xmlns:mx="library://ns.adobe.com/flex/mx"
+	skinClass="spark.skins.spark.SparkChromeWindowedApplicationSkin" >
+   <fx:Style>
+	@namespace s "library://ns.adobe.com/flex/spark";
+	@namespace mx "library://ns.adobe.com/flex/mx";
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
+		    fontWeight: bold;           
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
+		    fontStyle: italic;          
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+	        s|Window
+	        {
+	            skinClass: ClassReference("spark.skins.spark.SparkChromeWindowedApplicationSkin");
+	        }
+		s|WindowedApplication{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+		s|Window{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|TitleBar{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|Button{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|TextArea{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|Label{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}	
+	        
+		global{
+		    fontFamily: EmbeddedVerdana;
+		    fontAntiAliasType: normal;
+		}
+    </fx:Style>    
+    <fx:Script>
+	<![CDATA[
+		import spark.components.Window;
+			
+		public var aw:Window;
+			
+		public function resetWindow():void
+			{
+				if (aw && !aw.closed)
+				{
+					aw.close();
+					aw=null;
+				}
+				aw = new Window();
+		
+			}
+	]]>
+</fx:Script>
+<s:TextArea id="ti"/>
+
+</s:WindowedApplication>

Added: incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_events_multple_windows.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_events_multple_windows.mxml?rev=1370009&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_events_multple_windows.mxml (added)
+++ incubator/flex/trunk/mustella/tests/apollo/spark/components/Window/SWFs/window_events_multple_windows.mxml Mon Aug  6 20:51:08 2012
@@ -0,0 +1,200 @@
+<?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.
+
+-->
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+	xmlns:mx="library://ns.adobe.com/flex/mx"
+	xmlns:comps="comps.*"
+    	xmlns:local="*" close="closeAllChildWindow()">
+   <fx:Style>
+	@namespace s "library://ns.adobe.com/flex/spark";
+	@namespace mx "library://ns.adobe.com/flex/mx";
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
+		    fontWeight: bold;           
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
+		    fontStyle: italic;          
+		    fontFamily: EmbeddedArial;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdana;
+		    embedAsCFF: true;
+		}
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
+		    fontWeight: bold;
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+
+		@font-face {
+		    src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
+		    fontStyle: italic;
+		    fontFamily: EmbeddedVerdanaHalo;
+		    embedAsCFF: false;
+		}
+	        s|Window
+	        {
+	            skinClass: ClassReference("spark.skins.spark.SparkChromeWindowedApplicationSkin");
+	        }
+		s|WindowedApplication{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+		s|Window{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+
+	        s|TitleBar{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|Button{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}
+	        s|Label{
+		    fontFamily: EmbeddedVerdana;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}	
+
+	        mx|Label{
+		    fontFamily: EmbeddedVerdanaHalo;
+		    fontLookup: embeddedCFF;
+		    fontAntiAliasType: normal;
+		}	        
+		global{
+		    fontFamily: EmbeddedVerdana;
+		    fontAntiAliasType: normal;
+		}
+	</fx:Style>
+	
+	<fx:Script>
+		<![CDATA[
+			import spark.components.Window;
+			import 	flash.display.NativeWindow;
+			import mx.core.FlexGlobals;
+			import mx.collections.ArrayCollection;
+			import spark.components.windowClasses.TitleBar;
+			import comps.*;
+		        import flash.system.Capabilities;
+			import spark.components.WindowedApplication; 
+			import mx.events.FlexEvent;
+		        public var childWindowList:ArrayCollection=new ArrayCollection();
+			
+		        public var myWin:MyWindow;
+		        
+	 		public var windowObj:Window;
+	 		public var window1:Window, window2:Window, window3:Window;
+			public function createAWindow():void
+			{
+			    myWin=new MyWindow();
+			    myWin.title="window test";
+			    myWin.titleBar=new TitleBar();
+			    myWin.titleBar.title="titlebar";
+			    myWin.width=300;
+			    myWin.height=350;
+			    myWin.minimizable=true;
+			    myWin.maximizable=true;
+			    myWin.resizable=true;
+			    myWin.systemChrome="standard";
+			    myWin.transparent=false;
+			    myWin.type="normal";
+			    childWindowList.addItem(myWin);
+		            myWin.addEventListener("creationComplete", handleNewWindowCreationComplete);
+		            myWin.open(true);
+		            
+			}
+			
+			public function createAWindowByClass(c:Class,title:String, x:Number=100, y:Number=100):Window
+			{
+				windowObj=new c();
+				c(windowObj).y=y;
+				c(windowObj).x=x;
+				windowObj.title=title;
+				windowObj.systemChrome="standard";
+				childWindowList.addItem(windowObj);
+				windowObj.addEventListener("creationComplete", handleNewWindowCreationComplete);
+		           	windowObj.open(true);
+		           	return windowObj;
+			}
+			
+			public function handleNewWindowCreationComplete(e:FlexEvent):void
+			{
+			    e.currentTarget.removeEventListener("creationComplete", handleNewWindowCreationComplete);
+			    dispatchEvent(new FlexEvent("myWindowComplete"));
+                        }			 
+	
+			public function closeAllChildWindow():void
+			{
+			    var numWindows:Number=childWindowList.length;
+			    var win:Window;
+			    for (var i:Number=0;i<numWindows;i++)
+			    {
+					win=Window(childWindowList.getItemAt(i));
+					if (win!=null && !win.closed)win.close();
+			    }
+			    
+			}
+			
+		]]>
+	</fx:Script>
+<mx:Label id="testLabel" text="info" />
+<s:Button id="appButton" label="parent" />
+</s:WindowedApplication>



Mime
View raw message