| <?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:custom="assets.*" |
| xmlns="*" |
| testSWF="wa_styles_mxml.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.*; |
| import spark.components.Window; |
| import spark.components.TextArea; |
| |
| ]]> |
| </mx:Script> |
| |
| <testCases> |
| |
| <!-- |
| Normally we do not use ResetComponent with MXML-only tests. |
| However, we are calling ResetComponent on a component in the |
| app, not on the object being tested. |
| --> |
| |
| <TestCase testID="style_baseColor_mxml_test1" keywords="[WindowedApplication,style,baseColor]" description="Set baseColor with setStyle()."> |
| <body> |
| <CompareBitmap target="group1.btn1" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="style_contentBackgroundColor_mxml_test1" keywords="[WindowedApplication,style,contentBackgroundColor]" description="Set contentBackgroundColor with setStyle()."> |
| <body> |
| <CompareBitmap target="group1.ta1" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="style_focusColor_mxml_test1" keywords="[WindowedApplication,style,focusColor]" description="Set focusColor with setStyle()."> |
| <body> |
| <RunCode code="FlexGlobals.topLevelApplication.group1.btn1.focusManager.setFocus(FlexGlobals.topLevelApplication.group1.btn1); FlexGlobals.topLevelApplication.group1.btn1.focusManager.showFocus()" /> |
| <WaitForLayoutManager /> |
| <WaitForEvent target="stage" eventName="enterFrame" numExpectedEvents="2"/> |
| <CompareBitmap target="group1" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="style_rollOverColor_mxml_test1" keywords="[WindowedApplication,style,rollOverColor]" description="Set rollOverColor with setStyle()."> |
| <body> |
| <DispatchMouseEvent type="rollOver" target="group1.dg1.mx_internal:rendererArray.2.0" localX="2" localY="2" /> |
| <DispatchMouseEvent type="mouseMove" target="group1.dg1.mx_internal:rendererArray.2.0" localX="2" localY="2" /> |
| <WaitForEffectsToEnd /> |
| <CompareBitmap target="group1.dg1" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| |
| <TestCase testID="style_symbolColor_mxml_test1" keywords="[WindowedApplication,style,symbolColor]" description="Set symbolColor with setStyle()."> |
| <body> |
| <CompareBitmap target="group1.ck1" url="../styles/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| </testCases> |
| |
| </UnitTester> |