| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <UnitTester testDir="apollo/spark/components/Window/mirroring/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="window_mirroring_001.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.Window; |
| import spark.components.Button; |
| import spark.components.CheckBox; |
| import mx.events.FlexEvent; |
| import comps.*; |
| import spark.skins.spark.*; |
| [Embed(source="../../../../../../Assets/Images/smallgreenrect.jpg")] |
| [Bindable] |
| public var smallSquare1:Class; |
| |
| [Embed(source="../../../../../../Assets/Images/smallbluerect.jpg")] |
| [Bindable] |
| public var smallSquare2:Class; |
| |
| public var b:CheckBox=new CheckBox(); |
| public function addAButton():void |
| { |
| var b:Button=new Button(); |
| b.name="testButton"; |
| b.label="testButton"; |
| b.y=500; |
| b.x=400; |
| if (FlexGlobals.topLevelApplication.windowObj!=null) |
| FlexGlobals.topLevelApplication.windowObj.addElement(b); |
| } |
| |
| public function addCheckBox(t:Window, yPos:Number=100):void |
| { |
| b.label="checkbox"; |
| var n:Number=t.numElements; |
| b.y=yPos; |
| t.addElementAt(b,n); |
| t.addEventListener("add",addListener); |
| } |
| |
| public function addCheckBox2(t:Window, layoutDir:String):void |
| { |
| b.label="checkbox"; |
| var n:Number=t.numElements; |
| b.y=100; |
| if (layoutDir!=null) |
| { |
| b.layoutDirection=layoutDir; |
| b.setStyle("direction",layoutDir); |
| } |
| t.addElementAt(b,n); |
| t.addEventListener("add",addListener); |
| } |
| public function addListener(e:FlexEvent):void |
| { |
| e.currentTarget.removeEventListener("add", addListener); |
| dispatchEvent(new FlexEvent("addChildComplete")); |
| |
| } |
| ]]> |
| </mx:Script> |
| |
| <testCases> |
| |
| <TestCase testID="Window_layoutDirection_rtl1" keywords="[Window,Mirroring]" description="Test Window UI without any content and layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindow()" waitTarget="" waitEvent="myWindowComplete" /> |
| </setup> |
| <body> |
| <MyCompareBitmap target="myWin" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_layoutDirection_rtl2" keywords="[Window,Mirroring]" description="Test Window UI with content and layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithContents);" waitTarget="" waitEvent="myWindowComplete" /> |
| </setup> |
| <body> |
| <MyCompareBitmap target="windowObj" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_layoutDirection_rtl3" keywords="[Window,Mirroring]" description="Test Window UI with content and layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MySubWindow);" waitTarget="" waitEvent="myWindowComplete" /> |
| </setup> |
| <body> |
| <AssertPropertyValue target="windowObj" propertyName="layoutDirection" value="rtl"/> |
| <MyCompareBitmap target="windowObj" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| |
| <TestCase testID="Window_layoutDirection_rtl4" keywords="[Window,Mirroring]" description="Test Window UI with content and layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithModule);" waitTarget="" waitEvent="myWindowComplete" /> |
| </setup> |
| <body> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="8"/> |
| <AssertPropertyValue target="windowObj" propertyName="layoutDirection" value="rtl"/> |
| <MyCompareBitmap target="windowObj" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_scroller_1" keywords="[Window,mirroring,scroller]" description="make window content area scrollable"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowWithScroller();" waitTarget="" waitEvent="myWindowComplete" /> |
| </setup> |
| <body> |
| <MyCompareBitmap numColorVariances="10" maxColorVariance="10" target="windowObj" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_scroller_2" keywords="[Window,mirroring,scroller]" description="make window content area scrollable"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowWithScroller();" waitTarget="" waitEvent="myWindowComplete" /> |
| </setup> |
| <body> |
| <!-- the window should have scrollers, then compare images --> |
| <DispatchMouseClickEvent target="windowObj" stageX="600" stageY="500" /> |
| <WaitForEffectsToEnd /> |
| <!-- hopefully the window should show the Button at (600,500) --> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_scroller_3" keywords="[Window,mirroring,scroller]" description="remove the element causes scroller, verify window should have no scroller"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowWithScroller();" waitTarget="" waitEvent="myWindowComplete" /> |
| <!-- the window should have scrollers, then compare images --> |
| <!-- remove the button from the window caused scrolling --> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.removeElementAt(1)" waitTarget="windowObj" waitEvent="updateComplete" /> |
| </setup> |
| <body> |
| |
| <!-- verify the window should not show scroller any more --> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| |
| <TestCase testID="Window_mirroring_scroller_4" keywords="[Window,mirroring,scroller]" description="add an element causes scroller, verify window should have scroller"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowWithScroller();" waitTarget="" waitEvent="myWindowComplete" /> |
| <!-- add a button from the window caused scrolling --> |
| <RunCode code="addAButton();" /> |
| <WaitForLayoutManager /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| </setup> |
| <body> |
| <!-- verify the window should show scroller --> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_contents1" keywords="[Window,mirroring,scroller]" description="add an element causes scroller, verify window should have scroller"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithRTLContents);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <!-- verify the window should show scroller --> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_update1" keywords="[Window,mirroring,update]" description="change layoutDirection=rtl at runtime"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithRTLContents,'ltr');" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.layoutDirection='rtl'" waitEvent="updateComplete" waitTarget="windowObj" /> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.setStyle('direction','rtl')" waitEvent="updateComplete" waitTarget="windowObj" /> |
| <WaitForLayoutManager /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_update2" keywords="[Window,mirroring,update]" description="change layoutDirection=ltr at runtime"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithRTLContents);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.layoutDirection='ltr'" /> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.setStyle('direction','ltr')" /> |
| |
| <WaitForLayoutManager /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_addElement1" keywords="[Window,mirroring,update]" description="add an element without layoutDirection set"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj=FlexGlobals.topLevelApplication.createAWindowByClass(RTLWindowWithContents);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <RunCode code="addCheckBox(FlexGlobals.topLevelApplication.windowObj)" waitEvent="elementAdd" waitTarget="windowObj"/> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| |
| <TestCase testID="Window_mirroring_addElement2" keywords="[Window,mirroring,update]" description="add an element without layoutDirection set"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(RTLWindowWithContents);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <RunCode code="addCheckBox2(FlexGlobals.topLevelApplication.windowObj,'ltr')" waitEvent="elementAdd" waitTarget="windowObj"/> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_inheritance1" keywords="[Window,mirroring,inheriting]" description="verify a Window inheriting layoutDirection from parent set"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyRTLInheritedSubWindow);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <AssertPropertyValue target="windowObj" propertyName="layoutDirection" value="rtl"/> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_constraints1" keywords="[Window,mirroring,constraints]" description="Test content inside window with size constraint setting, layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithSizeConstraints1);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <AssertPropertyValue target="windowObj" propertyName="layoutDirection" value="rtl"/> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_constraints2" keywords="[Window,mirroring,constraints]" description="Test content inside window with size constraint setting, layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithSizeConstraints2);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <AssertPropertyValue target="windowObj" propertyName="layoutDirection" value="rtl"/> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_constraints3" keywords="[Window,mirroring,constraints]" description="Test content inside window with size constraint setting, layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithSizeConstraints2);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.chk1.move(150,60)" waitTarget="windowObj.chk1" waitEvent="move"/> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_constraints4" keywords="[Window,mirroring,constraints]" description="Test content inside window with size constraint setting, layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(WindowWithSizeConstraints2);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.chk2.move(200,300)" waitTarget="windowObj.chk2" waitEvent="move"/> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_sparkChrome1" keywords="[Window,mirroring,sparkChrome]" description="Test content inside window with size constraint setting, layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithContents);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" waitEvent="updateComplete" /> |
| <WaitForLayoutManager /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_sparkChrome2" keywords="[Window,mirroring,sparkChrome]" description="Test content inside window with size constraint setting, layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithContents);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" waitEvent="updateComplete" /> |
| <SetProperty target="windowObj" propertyName="status" value="this is a status test, this is a status test, this is a status test" /> |
| <WaitForLayoutManager /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| |
| <TestCase testID="Window_mirroring_titleIcon1" keywords="[Window,mirroring,titleIcon]" description="Test content inside window with size constraint setting, layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithContents);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| <SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" waitEvent="updateComplete" /> |
| <SetProperty target="" propertyName="titleIcon" valueExpression="value =smallSquare1" waitEvent="updateComplete" /> |
| <WaitForLayoutManager /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| |
| <TestCase testID="Window_mirroring_titleIcon2" keywords="[Window,mirroring,titleIcon]" description="Test content inside window with size constraint setting, layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithContents);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| |
| <SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" waitEvent="updateComplete" /> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.layoutDirection='ltr'" waitEvent="updateComplete" waitTarget="windowObj" /> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.setStyle('direction','ltr')" waitEvent="updateComplete" waitTarget="windowObj" /> |
| |
| <SetProperty target="windowObj" propertyName="titleIcon" valueExpression="value =smallSquare1" waitEvent="updateComplete" /> |
| <WaitForLayoutManager /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Window_mirroring_titleIcon3" keywords="[Window,mirroring,titleIcon]" description="Test content inside window with size constraint setting, layoutDirection=rtl"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| <RunCode code="FlexGlobals.topLevelApplication.createAWindowByClass(MyWindowWithContents);" waitTarget="" waitEvent="myWindowComplete" /> |
| |
| </setup> |
| <body> |
| |
| <SetStyle target="windowObj" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin" waitEvent="updateComplete" /> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.layoutDirection='ltr'" waitEvent="updateComplete" waitTarget="windowObj" /> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.setStyle('direction','ltr')" waitEvent="updateComplete" waitTarget="windowObj" /> |
| |
| <SetProperty target="windowObj" propertyName="titleIcon" valueExpression="value =smallSquare1" waitEvent="updateComplete" /> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.layoutDirection='rtl'" waitEvent="updateComplete" waitTarget="windowObj" /> |
| <RunCode code="FlexGlobals.topLevelApplication.windowObj.setStyle('direction','rtl')" waitEvent="updateComplete" waitTarget="windowObj" /> |
| <WaitForLayoutManager /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| |
| <MyCompareBitmap target="windowObj" numColorVariances="10" maxColorVariance="10" url="../mirroring/baselines/$testID.png" mac_url="../mirroring/baselines/$testID_mac.png" /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <RunCode code="FlexGlobals.topLevelApplication.closeAllChildWindow()"/> |
| </body> |
| </TestCase> |
| |
| </testCases> |
| |
| </UnitTester> |