| <?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/MenuBar/Spark/Integration/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="MenuBar_Filters_spark.mxml"> |
| |
| <!-- this set of lines form a template that must be in each unit test --> |
| <mx:Script> |
| <![CDATA[ |
| |
| import mx.controls.MenuBar; |
| |
| public static function init(o:DisplayObject):void |
| { |
| |
| } |
| |
| public function addData(mb:MenuBar):void |
| { |
| mb.dataProvider = myDP; |
| mb.showRoot = false; |
| mb.labelField = "@label"; |
| } |
| |
| ]]> |
| </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.controls.MenuBar; |
| |
| [Bindable] |
| private var myDP:XML = |
| <topnode> |
| <node label="Europe" data="EUROPE"> |
| <nodeitem type="check" label="Italy" enabled="false" data="ITALY" /> |
| <nodeitem type="check" label="England" data="ENGLAND" toggled="true"/> |
| <nodeitem type="check" label="Slovenia" data="SLOVENIA" /> |
| </node> |
| <node label="Asia" enabled="true" data="ASIA"> |
| <nodeitem type="radio" groupName="group1" label="Phillipines" enabled="false" data="PHILIPPINES"/> |
| <nodeitem type="radio" groupName="group1" label="Japan" data="JAPAN"/> |
| <nodeitem type="radio" groupName="group1" label="China" data="CHINA"/> |
| </node> |
| <node label="Africa" data="AFRICA"> |
| <nodeitem label="Uganda" enabled="false" data="UGANDA"/> |
| <nodeitem label="South Africa" data="SOUTH AFRICA"/> |
| <nodeitem label="Nigeria" data="NIGERIA"/> |
| </node> |
| </topnode>; |
| ]]> |
| </mx:Script> |
| |
| <testCases> |
| <TestCase testID="MenuBar_DropShadowFilter" description="MenuBar with a DropShadow filter." keywords="[DropShadowFilter, MenuBar]" > |
| <body> |
| <RunCode code="addData(application.mb)" waitTarget="mb" waitEvent="updateComplete" /> |
| <CompareBitmap url="../Integration/baselines/$testID.png" target="box1" timeout="2000" /> |
| </body> |
| </TestCase> |
| <TestCase testID="BevelFilter" description="MenuBar with a BevelFilter." keywords="[BevelFilter, MenuBar]" > |
| <body> |
| <RunCode code="addData(application.mb2)" waitTarget="mb2" waitEvent="updateComplete" /> |
| <CompareBitmap url="../Integration/baselines/$testID.png" target="box2" timeout="2000" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MenuBar_BlurFilter" description="MenuBar with a BlurFilter." keywords="[BlurFilter, MenuBar]" > |
| <body> |
| <RunCode code="addData(application.mb3)" waitTarget="mb3" waitEvent="updateComplete" /> |
| <CompareBitmap url="../Integration/baselines/mb_blurFilter.png" target="mb3.menuBarItems.1" timeout="2000" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MenuBar_ColorMatrixFilter" description="MenuBar with a ColorMatrixFilter." keywords="[ColorMatrixFilter, MenuBar]" > |
| <body> |
| <RunCode code="addData(application.mb4)" waitTarget="mb4" waitEvent="updateComplete" /> |
| <CompareBitmap url="../Integration/baselines/$testID.png" target="mb4.menuBarItems.1" timeout="2000" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MenuBar_ConvolutionFilter" description="MenuBar with a ConvolutionFilter." keywords="[ConvolutionFilter, MenuBar]" > |
| <body> |
| <RunCode code="addData(application.mb5)" waitTarget="mb5" waitEvent="updateComplete" /> |
| <CompareBitmap url="../Integration/baselines/$testID.png" target="mb5.menuBarItems.1" timeout="2000" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MenuBar_GlowFilter" description="MenuBar with a GlowFilter." keywords="[GlowFilter, MenuBar]" > |
| <body> |
| <RunCode code="addData(application.mb7)" waitTarget="mb7" waitEvent="updateComplete" /> |
| <CompareBitmap url="../Integration/baselines/$testID.png" target="mb7.menuBarItems.1" timeout="2000" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MenuBar_GradientBevelFilter" description="MenuBar with a GradientBevelFilter." keywords="[GradientBevelFilter, MenuBar]" > |
| <body> |
| <RunCode code="addData(application.mb8)" waitTarget="mb8" waitEvent="updateComplete" /> |
| <CompareBitmap url="../Integration/baselines/mb_gradientBevelFilter.png" target="mb8.menuBarItems.1" timeout="2000" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MenuBar_GradientGlowFilter" description="MenuBar with a GradientGlowFilter." keywords="[GradientGlowFilter, MenuBar]" > |
| <body> |
| <RunCode code="addData(application.mb9)" waitTarget="mb9" waitEvent="updateComplete" /> |
| <Pause timeout="1000"/> |
| <CompareBitmap url="../Integration/baselines/mb_gradientGlowFilter.png" target="mb9.menuBarItems.1" timeout="2000" /> |
| </body> |
| </TestCase> |
| </testCases> |
| </UnitTester> |