| <?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="containers/Panel/Integration/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="Panel_Integration_Basic_Spark.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.containers.* |
| import mx.controls.* |
| [Bindable] |
| public var smallArray:Array |
| public function performanceTest():void |
| { |
| |
| for(var i:uint=0;i<200;i++) |
| { |
| var btn:Button=new Button() |
| btn.label="test" |
| application.tn.myPanel4.addChild(btn) |
| } |
| } |
| |
| public function initPanel():void{ |
| application.tn.myPanel2.setStyle("shadowEnabled",true); |
| application.tn.myPanel2.setStyle("shadowDirection","right"); |
| application.tn.myPanel2.setStyle("shadowDistance",20); |
| application.tn.myPanel2.setStyle("borderThicknessBottom",40); |
| application.tn.myPanel2.setStyle("borderThicknessTop",40); |
| application.tn.myPanel2.setStyle("borderThicknessRight",40); |
| application.tn.myPanel2.setStyle("borderThicknessLeft",40); |
| } |
| |
| public function setDP():void { |
| smallArray= |
| [ |
| { Artist:'Pavement', Album:'Slanted and Enchanted', Price:11.99, Rating:'Excellent' }, |
| { Artist:'Pavement', Album:'Crooked Rain, Crooked Rain', Price:10.99, Rating:'Excellent' }, |
| { Artist:'Pavement', Album:'Wowee Zowee', Price:12.99, Rating:'Excellent' }, |
| { Artist:'Pavement', Album:'Brighten the Corners', Price:11.99, Rating:'Good' }, |
| { Artist:'Pavement', Album:'Terror Twilight', Price:11.99, Rating:'Good' }, |
| { Artist:'Other', Album:'Other', Price:5.99, Rating:'Bad' } |
| ]; |
| application.tn.myDG.dataProvider=smallArray; |
| } |
| |
| ]]> |
| </mx:Script> |
| |
| <testCases> |
| <TestCase testID="Spark_Panel_Integration_Keyboard_Navigation" keywords="[TextInput, Panel]"> |
| <setup> |
| <ResetComponent target="tn" className="TNComp" waitEvent="updateComplete" waitTarget="tn"/> |
| |
| </setup> |
| <body> |
| <CompareBitmap target="tn.int1" url="../Integration/baselines/Layout_Integration_Spark.png" timeout="5000" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="Spark_Panel_Integration_ControlBar" keywords="[ControlBar, Panel]"> |
| <setup> |
| <ResetComponent target="tn" className="TNComp" waitEvent="updateComplete" waitTarget="tn"/> |
| <RunCode code="initPanel()"/> |
| <SetProperty target="tn.tabn" propertyName="selectedIndex" value="1" waitTarget="tn.tabn" waitEvent="updateComplete" /> |
| |
| </setup> |
| <body> |
| <CompareBitmap target="tn.int2" url="../Integration/baselines/Integration_ControlBar_Spark.png" timeout="5000" /> |
| </body> |
| </TestCase> |
| </testCases> |
| </UnitTester> |