| <?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/Scroller/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:m="http://ns.adobe.com/mxml/2009" xmlns="*" testSWF="ScrollerBasic.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 spark.layouts.*; |
| |
| |
| |
| ]]> |
| |
| </fx:Script> |
| |
| <testCases> |
| |
| <TestCase testID="Scroller_property_horizontalScrollPolicy_auto" keywords="[Scroller, property,horizontalScrollPolicy]" description=""> |
| |
| |
| |
| <body> |
| |
| <SetProperty target="sc1" propertyName="width" value="350" waitEvent="updateComplete"/> |
| |
| <SetProperty target="sc2" propertyName="width" value="300" waitEvent="updateComplete"/> |
| |
| <SetProperty target="group1" propertyName="layout" valueExpression="value=new HorizontalLayout()" waitEvent="updateComplete"/> |
| |
| <SetProperty target="dg2" propertyName="layout" valueExpression="value=new HorizontalLayout()" waitEvent="updateComplete"/> |
| |
| <RunCode code="application.dg2.dataProvider=application.createAC()" waitEvent="updateComplete" waitTarget="dg2"/> |
| |
| <AssertPropertyValue target = "sc2.horizontalScrollBar" propertyName="visible" value="true" /> |
| |
| <RunCode code="application.addElements(application.group1,0xFFFF00)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <RunCode code="application.addElements(application.group1,0xFF0000)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <AssertPropertyValue target = "sc1.horizontalScrollBar" propertyName="visible" value="false" /> |
| |
| <RunCode code="application.addElements(application.group1,0x00FF00)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <RunCode code="application.addElements(application.group1,0xFFFF00,20,50)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <RunCode code="application.addElements(application.group1,0xFF0000,50,60)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <AssertPropertyValue target = "sc1.horizontalScrollBar" propertyName="visible" value="true" /> |
| |
| <RunCode code="application.removeAllElementsCustom()" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| |
| |
| </body> |
| |
| </TestCase> |
| |
| |
| |
| <TestCase testID="Scroller_property_horizontalScrollPolicy_off" keywords="[Scroller, property,horizontalScrollPolicy]" description=""> |
| |
| |
| |
| <body> |
| |
| <SetProperty target="sc1" propertyName="width" value="300" /> |
| |
| <SetProperty target="sc2" propertyName="width" value="350" /> |
| |
| <SetStyle target="sc1" styleName="horizontalScrollPolicy" value="off" waitEvent="updateComplete"/> |
| |
| <SetStyle target="sc2" styleName="horizontalScrollPolicy" value="off" waitEvent="updateComplete"/> |
| |
| <SetProperty target="group1" propertyName="layout" valueExpression="value=new HorizontalLayout()" waitEvent="updateComplete"/> |
| |
| <SetProperty target="dg2" propertyName="layout" valueExpression="value=new HorizontalLayout()" waitEvent="updateComplete"/> |
| |
| <RunCode code="application.dg2.dataProvider=application.createAC()" waitEvent="updateComplete" waitTarget="dg2"/> |
| |
| <AssertPropertyValue target = "sc2.horizontalScrollBar" propertyName="visible" value="false" /> |
| |
| <RunCode code="application.addElements(application.group1,0xFFFF00)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <RunCode code="application.addElements(application.group1,0xFF0000)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <AssertPropertyValue target = "sc1.horizontalScrollBar" propertyName="visible" value="false" /> |
| |
| <RunCode code="application.addElements(application.group1,0x00FF00)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <RunCode code="application.addElements(application.group1,0xFFFF00,20,50)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <RunCode code="application.addElements(application.group1,0xFF0000,50,60)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <AssertPropertyValue target = "sc1.horizontalScrollBar" propertyName="visible" value="false" /> |
| |
| <RunCode code="application.removeAllElementsCustom()" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Scroller_property_horizontalScrollPolicy_on" keywords="[Scroller, property,horizontalScrollPolicy]" description=""> |
| |
| <body> |
| |
| |
| |
| <SetProperty target="sc1" propertyName="width" value="450" /> |
| |
| <SetProperty target="sc2" propertyName="width" value="450" /> |
| |
| <SetStyle target="sc1" styleName="horizontalScrollPolicy" value="on" waitEvent="updateComplete"/> |
| |
| <SetStyle target="sc2" styleName="horizontalScrollPolicy" value="on" waitEvent="updateComplete"/> |
| |
| <SetProperty target="group1" propertyName="layout" valueExpression="value=new HorizontalLayout()" waitEvent="updateComplete"/> |
| |
| <SetProperty target="dg2" propertyName="layout" valueExpression="value=new HorizontalLayout()" waitEvent="updateComplete"/> |
| |
| <RunCode code="application.dg2.dataProvider=application.createAC()" waitEvent="updateComplete" waitTarget="dg2"/> |
| |
| <AssertPropertyValue target = "sc2.horizontalScrollBar" propertyName="visible" value="true" /> |
| |
| <RunCode code="application.addElements(application.group1,0xFFFF00)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <RunCode code="application.addElements(application.group1,0xFF0000)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <AssertPropertyValue target = "sc1.horizontalScrollBar" propertyName="visible" value="true" /> |
| |
| <RunCode code="application.addElements(application.group1,0x00FF00)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <RunCode code="application.addElements(application.group1,0xFFFF00,20,50)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <RunCode code="application.addElements(application.group1,0xFF0000,50,60)" waitEvent="updateComplete" waitTarget="group1"/> |
| |
| <AssertPropertyValue target = "sc1.horizontalScrollBar" propertyName="visible" value="true" /> |
| |
| |
| |
| </body> |
| |
| </TestCase> |
| |
| |
| |
| </testCases> |
| |
| |
| |
| |
| |
| </UnitTester> |
| |