| <?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="gumbo/components/List/properties/" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark" |
| xmlns="*" testSWF="ListBasic.mxml"> |
| |
| <!-- this set of lines form a template that must be in each unit test --> |
| |
| <fx:Script> |
| <![CDATA[ |
| public static function init(o:DisplayObject):void |
| { |
| } |
| ]]> |
| </fx:Script> |
| |
| <fx:Metadata> |
| <![CDATA[ |
| [Mixin] |
| ]]> |
| </fx:Metadata> |
| <!-- end of set of lines that must be in each unit test --> |
| <fx:Script> |
| <![CDATA[ |
| |
| import comps.*; |
| import mx.collections.*; |
| import spark.layouts.*; |
| |
| ]]> |
| </fx:Script> |
| <testCases> |
| <TestCase testID="List_scroll1" keywords="[List, scroll,dataProvider]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createNullDupAC()" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="200" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="150" waitEvent="updateComplete" waitTarget="list1"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="list1.scroller.verticalScrollBar.thumb" type="rollOver" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseDown" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="50" target="list1.scroller.verticalScrollBar.track" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="100" target="list1.scroller.verticalScrollBar.track" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="150" target="list1.scroller.verticalScrollBar.track" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchMouseEvent type="mouseUp" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" waitEvent="mouseUp" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createPlayersAC()" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="height" value="120" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="250" waitEvent="updateComplete" waitTarget="list1"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1.scroller.verticalScrollBar" numColorVariances="5" ignoreMaxColorVariance="true"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="List_scroll2" keywords="[List, scroll,dataProvider]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createNullDupAC()" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="200" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="150" waitEvent="updateComplete" waitTarget="list1"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="list1.scroller.verticalScrollBar.thumb" type="rollOver" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseDown" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="50" target="list1.scroller.verticalScrollBar.track" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="100" target="list1.scroller.verticalScrollBar.track" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="160" target="list1.scroller.verticalScrollBar.track" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <DispatchMouseEvent type="mouseUp" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" waitEvent="mouseUp" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=new ArrayList([1,2,3])" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <SetProperty target="list1" propertyName="width" value="50" waitEvent="updateComplete" waitTarget="list1"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="List_scroll3" keywords="[List, scroll,dataProvider]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC()" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="220" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="150" waitEvent="updateComplete" waitTarget="list1"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="list1.scroller.verticalScrollBar.thumb" type="rollOver" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseDown" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="70" target="list1.scroller.verticalScrollBar.track" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="4" localY="160" target="list1.scroller.verticalScrollBar.track" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchMouseEvent type="mouseUp" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" waitEvent="mouseUp" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createPlayersAC()" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="height" value="120" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="100" waitEvent="updateComplete" waitTarget="list1"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1.scroller.verticalScrollBar" numColorVariances="5" ignoreMaxColorVariance="true"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="List_scroll4" keywords="[List, scroll,dataProvider]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC()" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="200" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="150" waitEvent="updateComplete" waitTarget="list1"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="list1.scroller.verticalScrollBar.thumb" type="rollOver" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseDown" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="4" localY="50" target="list1.scroller.verticalScrollBar.track" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="4" localY="160" target="list1.scroller.verticalScrollBar.track" waitEvent="updateComplete" waitTarget="list1.dataGroup" /> |
| <DispatchMouseEvent type="mouseUp" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" waitEvent="mouseUp" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=new ArrayList([1,2,3,4,5,6,7,8,9])" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <SetProperty target="list1" propertyName="width" value="50" waitEvent="updateComplete" waitTarget="list1"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" numColorVariances="5" maxColorVariance="1"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="List_scroll1_nonVirtual" keywords="[List, scroll,dataProvider]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createNullDupAC()" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="useVirtualLayout" value="false" /> |
| <SetProperty target="list1" propertyName="height" value="200" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="150" waitEvent="updateComplete" waitTarget="list1"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="list1.scroller.verticalScrollBar.thumb" type="rollOver" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseDown" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="50" target="list1.scroller.verticalScrollBar.track" waitEvent="mouseMove" waitTarget="list1" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="100" target="list1.scroller.verticalScrollBar.track" waitEvent="mouseMove" waitTarget="list1" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="150" target="list1.scroller.verticalScrollBar.track" waitEvent="mouseMove" waitTarget="list1" /> |
| <DispatchMouseEvent type="mouseUp" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" waitEvent="mouseUp" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createPlayersAC()" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="height" value="120" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="250" waitEvent="updateComplete" waitTarget="list1"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" numColorVariances="5" ignoreMaxColorVariance="true"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="List_scroll2_nonVirtual" keywords="[List, scroll,dataProvider]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="useVirtualLayout" value="false" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createNullDupAC()" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="200" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="150" waitEvent="updateComplete" waitTarget="list1"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="list1.scroller.verticalScrollBar.thumb" type="rollOver" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseDown" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="50" target="list1.scroller.verticalScrollBar.track" waitEvent="mouseMove" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="100" target="list1.scroller.verticalScrollBar.track" waitEvent="mouseMove" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="160" target="list1.scroller.verticalScrollBar.track" waitEvent="mouseMove" /> |
| <DispatchMouseEvent type="mouseUp" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" waitEvent="mouseUp" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=new ArrayList([1,2,3])" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <SetProperty target="list1" propertyName="width" value="50" waitEvent="updateComplete" waitTarget="list1"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="List_scroll3_nonVirtual" keywords="[List, scroll,dataProvider]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="useVirtualLayout" value="false" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC()" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="220" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="150" waitEvent="updateComplete" waitTarget="list1"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="list1.scroller.verticalScrollBar.thumb" type="rollOver" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseDown" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="5" localY="70" target="list1.scroller.verticalScrollBar.track" waitEvent="mouseMove" waitTarget="list1" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="4" localY="160" target="list1.scroller.verticalScrollBar.track" waitEvent="mouseMove" waitTarget="list1"/> |
| <DispatchMouseEvent type="mouseUp" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" waitEvent="mouseUp" /> |
| <SetProperty target="list1" propertyName="height" value="210" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="160" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createPlayersAC()" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <RunCode code="application.list1.itemRenderer=new ClassFactory(comps.PlayerRenderer);" /> |
| <SetProperty target="list1" propertyName="height" value="120" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="100" waitEvent="updateComplete" waitTarget="list1"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" numColorVariances="5" ignoreMaxColorVariance="true"/> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="List_scroll4_nonVirtual" keywords="[List, scroll,dataProvider]" description=""> |
| <setup> |
| <ResetComponent target="list1" className="spark.components.List" waitEvent="updateComplete" /> |
| <SetProperty target="list1" propertyName="useVirtualLayout" value="false" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=application.createAC()" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="height" value="200" waitEvent="updateComplete" waitTarget="list1"/> |
| <SetProperty target="list1" propertyName="width" value="150" waitEvent="updateComplete" waitTarget="list1"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="list1.scroller.verticalScrollBar.thumb" type="rollOver" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseDown" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" /> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="4" localY="50" target="list1.scroller.verticalScrollBar.track" waitEvent="mouseMove" waitTarget="list1"/> |
| <DispatchMouseEvent type="mouseMove" buttonDown="true" localX="4" localY="160" target="list1.scroller.verticalScrollBar.track" waitEvent="mouseMove" waitTarget="list1"/> |
| <DispatchMouseEvent type="mouseUp" target="list1.scroller.verticalScrollBar.thumb" localX="3" localY="3" waitEvent="mouseUp" /> |
| <SetProperty target="list1" propertyName="dataProvider" valueExpression="value=new ArrayList([1,2,3,4,5,6,7,8,9])" waitEvent="updateComplete" waitTarget="list1.dataGroup"/> |
| <SetProperty target="list1" propertyName="width" value="50" waitEvent="updateComplete" waitTarget="list1"/> |
| <CompareBitmap url="../properties/baselines/$testID.png" target="list1" numColorVariances="5" maxColorVariance="1"/> |
| </body> |
| </TestCase> |
| |
| </testCases> |
| </UnitTester> |