| <?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/WindowedApplication/styles/" |
| xmlns:mx="http://www.adobe.com/2006/mxml" |
| xmlns="*" |
| testSWF="wa_mirroring.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.TextArea; |
| |
| ]]> |
| </mx:Script> |
| |
| <testCases> |
| <!-- |
| ======================================================== |
| Test styles set via setStyle(). |
| ======================================================== |
| --> |
| |
| <!-- |
| ================================ |
| Mac |
| ================================ |
| --> |
| |
| <!-- SDK-25881 --> |
| <TestCase testID="styles_mirroring_mac_test1" keywords="[WindowedApplication,Mirroring]" description="Check position of all SparkChromeWindowedApplicationSkin components when rtl."> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <CompareBitmap target="" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="styles_mirroring_mac_test2" keywords="[WindowedApplication,Mirroring]" description="Change to ltr and check."> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="direction" value="ltr" /> |
| <SetStyle target="" styleName="layoutDirection" value="ltr" waitEvent="updateComplete" /> |
| <CompareBitmap target="" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="styles_mirroring_mac_test3" keywords="[WindowedApplication,Mirroring]" description="Change to rtl and check again."> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="direction" value="ltr" /> |
| <SetStyle target="" styleName="layoutDirection" value="ltr" waitEvent="updateComplete" /> |
| <SetStyle target="" styleName="direction" value="rtl" /> |
| <SetStyle target="" styleName="layoutDirection" value="rtl" waitEvent="updateComplete" /> |
| <CompareBitmap target="" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="styles_mirroring_mac_test4" keywords="[WindowedApplication,Mirroring]" description="Change layoutDirection and direction with states."> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetProperty target="" propertyName="currentState" value="state2" waitEvent="updateComplete" /> |
| <CompareBitmap target="" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="styles_mirroring_mac_test5" keywords="[WindowedApplication,Mirroring]" description="Resize smaller"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetProperty target="nativeWindow" propertyName="width" value="700" /> |
| <SetProperty target="nativeWindow" propertyName="height" value="400" waitTarget="" waitEvent="resize" /> |
| <CompareBitmap target="" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="styles_mirroring_mac_test6" keywords="[WindowedApplication,Mirroring]" description="Resize larger"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetProperty target="nativeWindow" propertyName="width" value="900" /> |
| <SetProperty target="nativeWindow" propertyName="height" value="700" waitTarget="" waitEvent="resize" /> |
| <CompareBitmap target="" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <!-- |
| ================================ |
| Win |
| ================================ |
| --> |
| |
| <TestCase testID="styles_mirroring_win_test1" keywords="[WindowedApplication,Mirroring]" description="Check position of all SparkChromeWindowedApplicationSkin components when rtl."> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <CompareBitmap target="" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="styles_mirroring_win_test2" keywords="[WindowedApplication,Mirroring]" description="Change to ltr and check."> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="direction" value="ltr" /> |
| <SetStyle target="" styleName="layoutDirection" value="ltr" waitEvent="updateComplete" /> |
| <CompareBitmap target="" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="styles_mirroring_win_test3" keywords="[WindowedApplication,Mirroring]" description="Change to rtl and check again."> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="direction" value="ltr" /> |
| <SetStyle target="" styleName="layoutDirection" value="ltr" waitEvent="updateComplete" /> |
| <SetStyle target="" styleName="direction" value="rtl" /> |
| <SetStyle target="" styleName="layoutDirection" value="rtl" waitEvent="updateComplete" /> |
| <CompareBitmap target="" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="styles_mirroring_win_test4" keywords="[WindowedApplication,Mirroring]" description="Change layoutDirection and direction with states."> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetProperty target="" propertyName="currentState" value="state2" waitEvent="updateComplete" /> |
| <CompareBitmap target="" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="styles_mirroring_win_test5" keywords="[WindowedApplication,Mirroring]" description="Resize smaller"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetProperty target="nativeWindow" propertyName="width" value="700" /> |
| <SetProperty target="nativeWindow" propertyName="height" value="400" waitTarget="" waitEvent="resize" /> |
| <CompareBitmap target="" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="styles_mirroring_win_test6" keywords="[WindowedApplication,Mirroring]" description="Resize larger"> |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetProperty target="nativeWindow" propertyName="width" value="900" /> |
| <SetProperty target="nativeWindow" propertyName="height" value="700" waitTarget="" waitEvent="resize" /> |
| <CompareBitmap target="" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| </testCases> |
| |
| </UnitTester> |