| <?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="components/LinkBar/Integration/" 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="LinkBar_Mirroring.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[ |
| ]]> |
| </fx:Script> |
| <testCases> |
| |
| |
| <TestCase testID="LinkBar_Integration_mirroring_default" keywords="[LinkBar,Mirroring]" description="default values"> |
| <setup> |
| <ResetComponent target="mirrorRoot" className="comps.MirroringGroup" waitEvent="updateComplete" /> |
| </setup> |
| <body> |
| <AssertPropertyValue target="mirrorRoot.target" propertyName="layoutDirection" value="ltr" /> |
| <AssertStyleValue target="mirrorRoot.target" styleName="layoutDirection" value="ltr" /> |
| <AssertStyleValue target="mirrorRoot.target" styleName="direction" value="ltr" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="LinkBar_Integration_mirroring_rtl" keywords="[LinkBar,Mirroring]" description="set rtl on parent"> |
| <setup> |
| <ResetComponent target="mirrorRoot" className="comps.MirroringGroup" waitEvent="updateComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="mirrorRoot" styleName="layoutDirection" value="rtl" waitEvent="updateComplete" /> |
| <SetStyle target="mirrorRoot" styleName="direction" value="rtl" waitEvent="updateComplete" /> |
| <AssertStyleValue target="mirrorRoot.target" styleName="layoutDirection" value="rtl" /> |
| <CompareBitmap numColorVariances="10" ignoreMaxColorVariance="true" url="../Integration/baselines/$testID.png" target="mirrorRoot.target" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="LinkBar_Integration_mirroring_vertical_rtl" keywords="[LinkBar,Mirroring]" description="set rtl on parent when vertical"> |
| <setup> |
| <ResetComponent target="mirrorRoot" className="comps.MirroringGroup" waitEvent="updateComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="mirrorRoot" styleName="layoutDirection" value="rtl" waitEvent="updateComplete" /> |
| <SetStyle target="mirrorRoot" styleName="direction" value="rtl" waitEvent="updateComplete" /> |
| <AssertStyleValue target="mirrorRoot.target" styleName="layoutDirection" value="rtl" /> |
| <SetProperty target="mirrorRoot.target" propertyName="direction" value="vertical" waitEvent="updateComplete" /> |
| <AssertPropertyValue target="mirrorRoot.target" propertyName="direction" value="vertical" /> |
| <CompareBitmap numColorVariances="10" ignoreMaxColorVariance="true" url="../Integration/baselines/$testID.png" target="mirrorRoot.target" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="LinkBar_Integration_mirroring_swapDataProvider_rtl" keywords="[LinkBar,Mirroring]" description="swap dataProvider after setting rtl"> |
| <setup> |
| <ResetComponent target="mirrorRoot" className="comps.MirroringGroup" waitEvent="updateComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="mirrorRoot" styleName="layoutDirection" value="rtl" waitEvent="updateComplete" /> |
| <SetStyle target="mirrorRoot" styleName="direction" value="rtl" waitEvent="updateComplete" /> |
| <AssertStyleValue target="mirrorRoot.target" styleName="layoutDirection" value="rtl" /> |
| <SetProperty target="mirrorRoot.target" propertyName="dataProvider" valueExpression="value=application.mirrorRoot.dp2" waitEvent="updateComplete" /> |
| <CompareBitmap numColorVariances="10" ignoreMaxColorVariance="true" url="../Integration/baselines/$testID.png" target="mirrorRoot.target" /> |
| </body> |
| </TestCase> |
| |
| |
| |
| </testCases> |
| </UnitTester> |