| <?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 xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="NSMain.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[ |
| ]]> |
| </mx:Script> |
| |
| <testCases> |
| <TestCase testID="myProp1"> |
| <body> |
| <DispatchMouseEvent target="lb" type="mouseOver" localX="10" localY="30" /> |
| <DispatchMouseEvent target="lb" type="mouseDown" localX="10" localY="30" /> |
| <DispatchMouseEvent target="lb" type="mouseMove" buttonDown="true" localX="2" localY="30" waitTarget="lb" waitEvent="dragStart" /> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="228" stageY="57" |
| waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="208" stageY="77" |
| waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="208" stageY="107" |
| waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="218" stageY="157" |
| waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="228" stageY="217" |
| waitTarget="mx.managers::DragManager.mx_internal:dragProxy" waitEvent="move"/> |
| <DispatchMouseEvent target="stage" type="mouseMove" buttonDown="true" stageX="238" stageY="237" waitTarget="lb1" waitEvent="dragEnter"/> |
| <DispatchMouseEvent target="stage" type="mouseUp" stageX="238" stageY="237" waitTarget="lb1" waitEvent="dragDrop" /> |
| <AssertEvent target="lb" eventName="dragComplete" eventClass="mx.events::DragEvent" /> |
| <AssertPropertyValue target="lb.dataProvider" propertyName="length" value="3" /> |
| <AssertPropertyValue target="lb1.dataProvider" propertyName="length" value="2" /> |
| </body> |
| </TestCase> |
| </testCases> |
| </UnitTester> |