| <?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="MarshallPlan/Spark/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="MP_SparkControls_Main_2.mxml"> |
| |
| <mx:Script> |
| <![CDATA[ |
| |
| import mx.core.IFlexDisplayObject; |
| import mx.events.FlexEvent; |
| import flash.utils.*; |
| import mx.core.FlexSprite; |
| |
| public static function init(o:DisplayObject):void |
| { |
| |
| } |
| |
| |
| |
| ]]> |
| </mx:Script> |
| |
| <mx:Metadata> |
| <![CDATA[ |
| [Mixin] |
| ]]> |
| </mx:Metadata> |
| |
| <testCases> |
| <TestCase testID="MP_Spark_Component_DropDownList_untrusted" description="Test that you can use a DropDownList in a untrusted child." keywords="[DropDownList, Spark, Marshall Plan, ToolTip]"> |
| <setup> |
| <ResetComponent target="control1" className="spark.components.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../Assets/Images/smallpurplerect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="http://localhost:{portNumber}/MarshallPlan/SWFs/assets/MP_SparkControls_Child.swf?227_40?227_40?227_40" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="applicationComplete"/> |
| <Pause timeout="1000" /> |
| <DispatchMouseEvent type="rollOver" target="swf1.content.document.comboBox1.skin" localX="5" localY="10" waitEvent="rollOver" |
| waitTarget="swf1.content.document.comboBox1"/> |
| <DispatchMouseEvent type="mouseDown" target="swf1.content.document.comboBox1.skin" localX="5" localY="10" waitEvent="open" waitTarget="swf1.content.document.comboBox1"/> |
| <WaitForEffectsToEnd /> |
| <DispatchMouseEvent type="mouseUp" target="swf1.content.document.comboBox1.skin" localX="5" localY="10" /> |
| <WaitForEffectsToEnd /> |
| <DispatchKeyEvent keys="[DOWN, DOWN, ENTER]" /> |
| <AssertEvent eventName="change" eventClass="spark.events::IndexChangeEvent" target="swf1.content.document.comboBox1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MP_Spark_Component_Effects_trusted" description="Test that you can use an Effect in a trusted child." keywords="[Effect, Spark, Marshall Plan, ToolTip]"> |
| <setup> |
| <ResetComponent target="control1" className="spark.components.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf2" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf2" propertyName="source" value="../../../Assets/Images/smallpurplerect.jpg" waitTarget="swf2" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf2" propertyName="loadForCompatibility" value="false" /> |
| <SetProperty target="swf2" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf2" propertyName="source" value="assets/MP_SparkControls_Child.swf" /> |
| <SetProperty target="swf2" propertyName="autoLoad" value="true" waitTarget="swf2" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf2.content" waitEvent="applicationComplete"/> |
| <DispatchMouseClickEvent target="swf2.content.document.button1" localX="8" localY="8"/> |
| <AssertEvent eventName="effectEnd" eventClass="mx.events::EffectEvent" target="swf2.content.document.button1" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MP_Spark_Component_Effects_untrusted" description="Test that you can use an Effect in a untrusted child." keywords="[Effect, Spark, Marshall Plan, ToolTip]"> |
| <setup> |
| <ResetComponent target="control1" className="spark.components.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf2" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf2" propertyName="source" value="../../../Assets/Images/smallpurplerect.jpg" waitTarget="swf2" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf2" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf2" propertyName="source" value="http://localhost:{portNumber}/MarshallPlan/SWFs/assets/MP_SparkControls_Child.swf?286_40?286_40?286_40" /> |
| <SetProperty target="swf2" propertyName="autoLoad" value="true" waitTarget="swf2" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf2.content" waitEvent="applicationComplete"/> |
| <DispatchMouseClickEvent target="swf2.content.document.button1" localX="8" localY="8"/> |
| <AssertEvent eventName="effectEnd" eventClass="mx.events::EffectEvent" target="swf2.content.document.button1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="MP_Spark_Component_DropDownList_trusted" description="Test that you can use a DropDownList in a trusted child." keywords="[DropDownList, Spark, Marshall Plan, ToolTip]"> |
| <setup> |
| <ResetComponent target="control1" className="spark.components.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../Assets/Images/smallpurplerect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="false" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="assets/MP_SparkControls_Child.swf" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="applicationComplete"/> |
| <DispatchMouseEvent type="rollOver" target="swf1.content.document.comboBox1.skin" localX="5" localY="10" waitEvent="rollOver" |
| waitTarget="swf1.content.document.comboBox1"/> |
| <DispatchMouseEvent type="mouseDown" target="swf1.content.document.comboBox1.skin" localX="5" localY="10" waitEvent="open" waitTarget="swf1.content.document.comboBox1"/> |
| <WaitForEffectsToEnd /> |
| <DispatchMouseEvent type="mouseUp" target="swf1.content.document.comboBox1.skin" localX="5" localY="10" /> |
| <DispatchMouseClickEvent target="swf1.content.document.comboBox1.skin.popUp" localX="18" localY="38" |
| waitEvent="change" waitTarget="swf1.content.document.comboBox1" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="MP_Spark_Component_Effects_compatible" description="Test that you can use an Effect in a trusted child." keywords="[Effect, Spark, Marshall Plan, ToolTip]"> |
| <setup> |
| <ResetComponent target="control1" className="spark.components.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../../../Assets/Images/smallpurplerect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="true" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="assets/MP_SparkControls_Child.swf" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="applicationComplete"/> |
| <DispatchMouseClickEvent target="swf1.content.document.button1" localX="8" localY="8"/> |
| <AssertEvent eventName="effectEnd" eventClass="mx.events::EffectEvent" target="swf1.content.document.button1" /> |
| </body> |
| </TestCase> |
| |
| |
| </testCases> |
| </UnitTester> |