You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2012/08/07 19:13:35 UTC
svn commit: r1370370 [18/43] - in /incubator/flex/trunk/mustella/tests/mx:
./ binding/ binding/utils/ binding/utils/BindingUtils/
binding/utils/BindingUtils/SWFs/ binding/utils/BindingUtils/SWFs/assets/
binding/utils/BindingUtils/method/ binding/utils/...
Added: incubator/flex/trunk/mustella/tests/mx/effects/Glow/object/Glow_object.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/Glow/object/Glow_object.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/effects/Glow/object/Glow_object.mxml (added)
+++ incubator/flex/trunk/mustella/tests/mx/effects/Glow/object/Glow_object.mxml Tue Aug 7 17:13:06 2012
@@ -0,0 +1,357 @@
+<?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
+ testSWF="../SWFs/Glow_main.mxml"
+ testDir="mx/effects/Glow/object/"
+ xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*">
+ <mx:Script>
+ <![CDATA[
+ import mx.core.Application;
+
+ public static function init(o:DisplayObject):void{}
+
+ ]]>
+ </mx:Script>
+ <mx:Metadata><![CDATA[[Mixin]]]></mx:Metadata>
+ <testCases>
+
+ <TestCase testID="Glow_Button" keywords="[Glow, object, Button]" description="Test Glow on a Button.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="2000"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('Button', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_ButtonBar" keywords="[Glow, object, ButtonBar]" description="Test Glow on a ButtonBar.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="2000"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('ButtonBar', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_CheckBox" keywords="[Glow, object, CheckBox]" description="Test Glow on a CheckBox.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('CheckBox', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_ColorPicker" keywords="[Glow, object, ColorPicker]" description="Test Glow on a ColorPicker.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('ColorPicker', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_ComboBox" keywords="[Glow, object, ComboBox]" description="Test Glow on a ComboBox.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('ComboBox', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_DataGrid" keywords="[Glow, object, DataGrid]" description="Test Glow on a DataGrid.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('DataGrid', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_DateChooser" keywords="[Glow, object, DateChooser]" description="Test Glow on a DateChooser.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('DateChooser', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_DateField" keywords="[Glow, object, DateField]" description="Test Glow on a DateField.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('DateField', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_HorizontalList" keywords="[Glow, object, HorizontalList]" description="Test Glow on a HorizontalList.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('HorizontalList', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_HRule" keywords="[Glow, object, HRule]" description="Test Glow on a HRule.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('HRule', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_HScrollBar" keywords="[Glow, object, HScrollBar]" description="Test Glow on a HScrollBar.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('HScrollBar', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_HSlider" keywords="[Glow, object, HSlider]" description="Test Glow on a HSlider.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('HSlider', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_Image" keywords="[Glow, object, Image]" description="Test Glow on a Image.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('Image', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_Label" keywords="[Glow, object, Label]" description="Test Glow on a Label.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('Label', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_List" keywords="[Glow, object, List]" description="Test Glow on a List.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('List', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_MenuBar" keywords="[Glow, object, MenuBar]" description="Test Glow on a MenuBar.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('MenuBar', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_NumericStepper" keywords="[Glow, object, NumericStepper]" description="Test Glow on a NumericStepper.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('NumericStepper', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_PopUpButton" keywords="[Glow, object, PopUpButton]" description="Test Glow on a PopUpButton.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('PopUpButton', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_PopUpMenuButton" keywords="[Glow, object, PopUpMenuButton]" description="Test Glow on a PopUpMenuButton.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('PopUpMenuButton', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_ProgressBar" keywords="[Glow, object, ProgressBar]" description="Test Glow on a ProgressBar.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('ProgressBar', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_RadioButton" keywords="[Glow, object, RadioButton]" description="Test Glow on a RadioButton.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('RadioButton', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_RichTextEditor" keywords="[Glow, object, RichTextEditor]" description="Test Glow on a RichTextEditor.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('RichTextEditor', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_TabBar" keywords="[Glow, object, TabBar]" description="Test Glow on a TabBar.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('TabBar', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_Text" keywords="[Glow, object, Text]" description="Test Glow on a Text.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('Text', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_TextArea" keywords="[Glow, object, TextArea]" description="Test Glow on a TextArea.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('TextArea', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_TextInput" keywords="[Glow, object, TextInput]" description="Test Glow on a TextInput.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('TextInput', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_TileList" keywords="[Glow, object, TileList]" description="Test Glow on a TileList.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('TileList', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_ToggleButtonBar" keywords="[Glow, object, ToggleButtonBar]" description="Test Glow on a ToggleButtonBar.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="2000"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('ToggleButtonBar', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_Tree" keywords="[Glow, object, Tree]" description="Test Glow on a Tree.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('Tree', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_VRule" keywords="[Glow, object, VRule]" description="Test Glow on a VRule.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('VRule', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_VScrollBar" keywords="[Glow, object, VScrollBar]" description="Test Glow on a VScrollBar.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('VScrollBar', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+ <TestCase testID="Glow_VSlider" keywords="[Glow, object, VSlider]" description="Test Glow on a VSlider.">
+ <setup>
+ <RunCode code="application.Reset()" />
+ <Pause timeout="1500"/>
+ </setup>
+ <body>
+ <RunCode code="application.SeekControl('VSlider', application.eff_Glow_AXY, 1000, 0, 1, 0, 500)" waitTarget="timer" waitEvent="timerComplete" />
+ <CompareBitmap target="currentCanvas" url="../object/Baselines/$testID.png" />
+ </body>
+ </TestCase>
+
+ </testCases>
+</UnitTester>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/mx/effects/Glow/variable/Glow_variable.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/Glow/variable/Glow_variable.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/effects/Glow/variable/Glow_variable.mxml (added)
+++ incubator/flex/trunk/mustella/tests/mx/effects/Glow/variable/Glow_variable.mxml Tue Aug 7 17:13:06 2012
@@ -0,0 +1,56 @@
+<UnitTester
+ testSWF="../SWFs/Glow_main.mxml"
+ testDir="mx/effects/Glow/variable/"
+ xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*">
+ <mx:Script>
+ <![CDATA[
+ import mx.effects.Glow;
+
+ public static function init(o:DisplayObject):void{}
+
+ ]]>
+ </mx:Script>
+ <mx:Metadata><![CDATA[
+
+[Mixin]
+
+]]></mx:Metadata>
+ <testCases>
+
+ <!-- suspendBackgroundProcessing -->
+ <TestCase testID="Glow_suspendBackgroundProcessing_Default" keywords="[Glow, variable, suspendBackgroundProcessing]" description="Test the default value of the suspendBackgroundProcessing variable.">
+ <body>
+ <AssertMethodValue method="value=(new Glow()).suspendBackgroundProcessing" value="false"/>
+ </body>
+ </TestCase>
+
+ <!-- instanceClass -->
+ <TestCase testID="Glow_instanceClass_Default" keywords="[Glow, variable, instanceClass]" description="Test the default value of the instanceClass variable.">
+ <body>
+ <AssertMethodValue method="value=(new Glow()).instanceClass.toString().replace('[class ', '').replace(']','')" value="GlowInstance"/>
+ </body>
+ </TestCase>
+
+ <!-- repeatDelay -->
+ <TestCase testID="Glow_repeatDelay_Default" keywords="[Glow, variable, repeatDelay]" description="Test the default value of the repeatDelay variable.">
+ <body>
+ <AssertMethodValue method="value=(new Glow()).repeatDelay" value="0"/>
+ </body>
+ </TestCase>
+
+ <!-- startDelay -->
+ <TestCase testID="Glow_startDelay_Default" keywords="[Glow, variable, startDelay]" description="Test the default value of the startDelay variable.">
+ <body>
+ <AssertMethodValue method="value=(new Glow()).startDelay" value="0"/>
+ </body>
+ </TestCase>
+
+ <!-- repeatCount -->
+ <TestCase testID="Glow_repeatCount_Default" keywords="[Glow, variable, repeatCount]" description="Test the default value of the repeatCount variable.">
+ <body>
+ <AssertMethodValue method="value=(new Glow()).repeatCount" value="1"/>
+ </body>
+ </TestCase>
+
+ </testCases>
+</UnitTester>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Events/MaskEffect_Events.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Events/MaskEffect_Events.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Events/MaskEffect_Events.mxml (added)
+++ incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Events/MaskEffect_Events.mxml Tue Aug 7 17:13:06 2012
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<UnitTester
+ testDir="mx/effects/MaskEffect/Events/"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns="*"
+ testSWF="../SWFs/MaskEffect_Main.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 -->
+
+
+ <testCases>
+
+ <TestCase testID="MaskEffect_Events_EffectStart" keywords="[MaskEffect, Events, EffectStart]" description="Verify effectStart is raised during the play() of an effect.">
+ <setup>
+ <RunCode code="application.ResetEffect()"/>
+ <RunCode code="application.ResetImage()"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play([application.testImage], false)" waitTarget="testEffect" waitEvent="effectStart" />
+ <AssertEvent target="testEffect" eventName="effectStart" eventClass="mx.events::EffectEvent" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_Events_TweenStart" keywords="[MaskEffect, Events, TweenStart]" description="Verify tweenStart is NOT raised during the play() of an effect.">
+ <setup>
+ <RunCode code="application.ResetEffect()"/>
+ <RunCode code="application.ResetImage()"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play([application.testImage], false)" waitTarget="testEffect" waitEvent="effectEnd" />
+ <AssertEvent target="testEffect" eventName="tweenStart" eventClass="mx.events::TweenEvent" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_Events_TweenUpdate" keywords="[MaskEffect, Events, TweenUpdate]" description="Verify tweenUpdate is NOT raised during the play() of an effect.">
+ <setup>
+ <RunCode code="application.ResetEffect()"/>
+ <RunCode code="application.ResetImage()"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play([application.testImage], false)" waitTarget="testEffect" waitEvent="effectEnd" />
+ <AssertEvent target="testEffect" eventName="tweenUpdate" eventClass="mx.events::TweenEvent" numExpectedEvents="-1" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_Events_TweenEnd" keywords="[MaskEffect, Events, TweenEnd]" description="Verify tweenEnd is NOT raised during the play() of an effect.">
+ <setup>
+ <RunCode code="application.ResetEffect()"/>
+ <RunCode code="application.ResetImage()"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play([application.testImage], false)" waitTarget="testEffect" waitEvent="effectEnd" />
+ <AssertEvent target="testEffect" eventName="tweenEnd" eventClass="mx.events::TweenEvent" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_Events_EffectEnd" keywords="[MaskEffect, Events, EffectEnd]" description="Verify effectEnd is raised during the play() of an effect.">
+ <setup>
+ <RunCode code="application.ResetEffect()"/>
+ <RunCode code="application.ResetImage()"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play([application.testImage], false)" waitTarget="testEffect" waitEvent="effectEnd" />
+ <AssertEvent target="testEffect" eventName="effectEnd" eventClass="mx.events::EffectEvent" />
+ </body>
+ </TestCase>
+
+ </testCases>
+
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Methods/MaskEffect_Methods.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Methods/MaskEffect_Methods.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Methods/MaskEffect_Methods.mxml (added)
+++ incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Methods/MaskEffect_Methods.mxml Tue Aug 7 17:13:06 2012
@@ -0,0 +1,152 @@
+<?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="mx/effects/MaskEffect/Methods/"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns="*"
+ testSWF="../SWFs/MaskEffect_Main.mxml">
+
+ <!-- this set of lines form a template that must be in each unit test -->
+ <mx:Script>
+ <![CDATA[
+ import mx.effects.MaskEffect;
+ import mx.events.TweenEvent;
+
+ 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 -->
+
+ <testCases>
+
+ <!-- Construtor -->
+ <TestCase testID="MaskEffect_Constructor_Empty" keywords="[MaskEffect, method, constructor]" description="Try to initialize the constructor with an empty arg.">
+ <body>
+ <RunCode code="application.testEffect = new MaskEffect();"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_Constructor_Null" keywords="[MaskEffect, method, constructor]" description="Try to initialize the constructor with the null arg.">
+ <body>
+ <RunCode code="application.testEffect = new MaskEffect(null);"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_Constructor_Object" keywords="[MaskEffect, method, constructor]" description="Try to initialize the constructor with an object.">
+ <body>
+ <RunCode code="application.testEffect = new MaskEffect(application.testImage);" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_resume" keywords="[MaskEffect, Methods, resume]" description="Test the resume() method.">
+ <setup>
+ <RunCode code="application.ResetImage()"/>
+ <RunCode code="application.ResetEffectScale(0, 1, 0, 1)"/>
+ <SetProperty target="testEffect" propertyName="duration" value="1000"/>
+ <RunCode code="application.testEffect.play()"/>
+ <Pause timeout="500"/>
+ <RunCode code="application.testEffect.pause()"/>
+ <Pause timeout="1000"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.resume()" waitTarget="testEffect" waitEvent="effectEnd"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_pause" keywords="[MaskEffect, Methods, pause]" description="Test the pause() method.">
+ <setup>
+ <RunCode code="application.ResetImage()"/>
+ <RunCode code="application.ResetEffectScale(0, 1, 0, 1)"/>
+ <SetProperty target="testEffect" propertyName="duration" value="1000"/>
+ <RunCode code="application.testEffect.play()"/>
+ <Pause timeout="500"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.pause()"/>
+ <Pause timeout="700"/>
+ <AssertNoEvent target="testEffect" eventName="effectEnd" eventClass="mx.effects.EffectEvent"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_play" keywords="[MaskEffect, Methods, play]" description="Test the play() method.">
+ <setup>
+ <RunCode code="application.ResetImage()"/>
+ <RunCode code="application.ResetEffectScale(0, 1, 0, 1)"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play()" waitTarget="testEffect" waitEvent="effectEnd"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_stop" keywords="[MaskEffect, Methods, stop]" description="Test the stop() method. Start, wait 500ms, then stop in mid-effect. Verify effectEnd">
+ <setup>
+ <RunCode code="application.ResetImage()"/>
+ <RunCode code="application.ResetEffectScale(0, 1, 0, 1)"/>
+ <SetProperty target="testEffect" propertyName="duration" value="1000"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play()"/>
+ <Pause timeout="500"/>
+ <RunCode code="application.testEffect.stop()" waitTarget="testEffect" waitEvent="effectEnd"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_reverse" keywords="[MaskEffect, Methods, reverse]" description="Test the reverse() method. Start, wait 500ms, then reverse in mid-effect.">
+ <setup>
+ <RunCode code="application.ResetImage()"/>
+ <RunCode code="application.ResetEffectScale(0, 1, 0, 1)"/>
+ <SetProperty target="testEffect" propertyName="duration" value="1000"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play()"/>
+ <Pause timeout="500"/>
+ <RunCode code="application.testEffect.reverse()" waitTarget="testEffect" waitEvent="effectEnd"/>
+ <AssertPixelValue x="50" y="50" value="0xFFFFFF"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_toString" keywords="[MaskEffect, Methods, toString]" description="Test the toString() method.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertMethodValue method="value=application.testEffect.toString().replace('[', '').replace(']', '')" value="object MaskEffect"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_hasEventListener_NoListener" keywords="[MaskEffect, Methods, hasEventListener]" description="Test the hasEventListener() method. Verify false is returned for no event.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertMethodValue method="value=application.testEffect.hasEventListener('RANDOM');" value="false"/>
+ </body>
+ </TestCase>
+
+
+ </testCases>
+
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_scaleXTo_Play.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_scaleXTo_Play.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_scaleXTo_Play.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_scaleYFrom_Play.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_scaleYFrom_Play.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_scaleYFrom_Play.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_scaleYTo_Play.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_scaleYTo_Play.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_scaleYTo_Play.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_startDelay_Play.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_startDelay_Play.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_startDelay_Play.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_xFrom_Play.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_xFrom_Play.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_xFrom_Play.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_xTo_Play.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_xTo_Play.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_xTo_Play.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_yTo_Play.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_yTo_Play.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/Baselines/MaskEffect_yTo_Play.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/MaskEffect_Properties.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/MaskEffect_Properties.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/MaskEffect_Properties.mxml (added)
+++ incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/Props/MaskEffect_Properties.mxml Tue Aug 7 17:13:06 2012
@@ -0,0 +1,408 @@
+<?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="mx/effects/MaskEffect/Props/"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns="*"
+ testSWF="../SWFs/MaskEffect_Main.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 -->
+
+ <testCases>
+
+ <TestCase testID="MaskEffect_scaleXTo_Default" keywords="[MaskEffect, Properties, scaleXTo]" description="Test the default value of the scaleXTo property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="scaleXTo" value="NaN"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_scaleXTo" keywords="[MaskEffect, Properties, scaleXTo]" description="Test the setting of the scaleXTo property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="scaleXTo" value=".5"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="scaleXTo" value=".5"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_scaleXTo_Play" keywords="[MaskEffect, Properties, scaleXTo]" description="Test the output look of the scaleXTo property.">
+ <setup>
+ <RunCode code="application.ResetImage()"/>
+ <RunCode code="application.ResetEffectScale(0, .7, 0, 1)"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play()" waitTarget="testEffect" waitEvent="effectEnd"/>
+ <CompareBitmap target="testImage" url="../Props/Baselines/MaskEffect_scaleXTo_Play.png" />
+ </body>
+ </TestCase>
+
+
+ <TestCase testID="MaskEffect_scaleEasingFunction_Default" keywords="[MaskEffect, Properties, scaleEasingFunction]" description="Test the default value of the scaleEasingFunction property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="scaleEasingFunction" value="{null}"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_scaleEasingFunction" keywords="[MaskEffect, Properties, scaleEasingFunction]" description="Test the setting of the scaleEasingFunction property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="scaleEasingFunction" value="{application.MyScaleEasing}"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="scaleEasingFunction" value="{application.MyScaleEasing}"/>
+ </body>
+ </TestCase>
+
+
+ <TestCase testID="MaskEffect_moveEasingFunction_Default" keywords="[MaskEffect, Properties, moveEasingFunction]" description="Test the default value of the moveEasingFunction property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="moveEasingFunction" value="{null}"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_moveEasingFunction" keywords="[MaskEffect, Properties, moveEasingFunction]" description="Test the setting of the moveEasingFunction property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="moveEasingFunction" value="{application.MyMoveEasing}"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="moveEasingFunction" value="{application.MyMoveEasing}"/>
+ </body>
+ </TestCase>
+
+
+ <TestCase testID="MaskEffect_yTo_Default" keywords="[MaskEffect, Properties, yTo]" description="Test the default value of the yTo property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="yTo" value="NaN"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_yTo" keywords="[MaskEffect, Properties, yTo]" description="Test the setting of the yTo property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="yTo" value="50"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="yTo" value="50"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_yTo_Play" keywords="[MaskEffect, Properties, yTo]" description="Test the output look of the yTo property.">
+ <setup>
+ <RunCode code="application.ResetImage()"/>
+ <RunCode code="application.ResetEffectSize(0, 50, 0, 50)"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play()" waitTarget="testEffect" waitEvent="effectEnd"/>
+ <CompareBitmap target="testImage" url="../Props/Baselines/MaskEffect_yTo_Play.png" />
+ </body>
+ </TestCase>
+
+
+ <TestCase testID="MaskEffect_scaleYTo_Default" keywords="[MaskEffect, Properties, scaleYTo]" description="Test the default value of the scaleYTo property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="scaleYTo" value="NaN"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_scaleYTo" keywords="[MaskEffect, Properties, scaleYTo]" description="Test the setting of the scaleYTo property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="scaleYTo" value=".5"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="scaleYTo" value=".5"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_scaleYTo_Play" keywords="[MaskEffect, Properties, scaleYTo]" description="Test the output look of the scaleYTo property.">
+ <setup>
+ <RunCode code="application.ResetImage()"/>
+ <RunCode code="application.ResetEffectScale(0, 1, 0, .7)"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play()" waitTarget="testEffect" waitEvent="effectEnd"/>
+ <CompareBitmap target="testImage" url="../Props/Baselines/MaskEffect_scaleYTo_Play.png" />
+ </body>
+ </TestCase>
+
+
+ <TestCase testID="MaskEffect_scaleYFrom_Default" keywords="[MaskEffect, Properties, scaleYFrom]" description="Test the default value of the scaleYFrom property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="scaleYFrom" value="NaN"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_scaleYFrom" keywords="[MaskEffect, Properties, scaleYFrom]" description="Test the setting of the scaleYFrom property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="scaleYFrom" value=".5"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="scaleYFrom" value=".5"/>
+ </body>
+ </TestCase>
+
+
+ <TestCase testID="MaskEffect_xFrom_Default" keywords="[MaskEffect, Properties, xFrom]" description="Test the default value of the xFrom property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="xFrom" value="NaN"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_xFrom" keywords="[MaskEffect, Properties, xFrom]" description="Test the setting of the xFrom property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="xFrom" value="1"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="xFrom" value="1"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_xFrom_Play" keywords="[MaskEffect, Properties, xFrom]" description="Test the output look of the xFrom property.">
+ <setup>
+ <RunCode code="application.ResetImage()"/>
+ <RunCode code="application.ResetEffectSize(50, 200, 50, 150)"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play()" waitTarget="testEffect" waitEvent="tweenUpdate"/>
+ <AssertPixelValue target="testImage" x="40" y="40" value="0"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_createMaskFunction_Default" keywords="[MaskEffect, Properties, createMaskFunction]" description="Test the default value of the createMaskFunction property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="createMaskFunction" value="{null}"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_createMaskFunction" keywords="[MaskEffect, Properties, createMaskFunction]" description="Test the setting of the createMaskFunction property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="createMaskFunction" value="{application.MyMaskFunction}"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="createMaskFunction" value="{application.MyMaskFunction}"/>
+ </body>
+ </TestCase>
+
+
+ <TestCase testID="MaskEffect_xTo_Default" keywords="[MaskEffect, Properties, xTo]" description="Test the default value of the xTo property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="xTo" value="NaN"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_xTo" keywords="[MaskEffect, Properties, xTo]" description="Test the setting of the xTo property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="xTo" value="50"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="xTo" value="50"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_xTo_Play" keywords="[MaskEffect, Properties, xTo]" description="Test the output look of the xTo property.">
+ <setup>
+ <RunCode code="application.ResetImage()"/>
+ <RunCode code="application.ResetEffectSize(50, 100, 50, 150)"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play()" waitTarget="testEffect" waitEvent="effectEnd"/>
+ <CompareBitmap target="testImage" url="../Props/Baselines/MaskEffect_xTo_Play.png" />
+ </body>
+ </TestCase>
+
+
+ <TestCase testID="MaskEffect_scaleXFrom_Default" keywords="[MaskEffect, Properties, scaleXFrom]" description="Test the default value of the scaleXFrom property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="scaleXFrom" value="NaN"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_scaleXFrom" keywords="[MaskEffect, Properties, scaleXFrom]" description="Test the setting of the scaleXFrom property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="scaleXFrom" value=".5"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="scaleXFrom" value=".5"/>
+ </body>
+ </TestCase>
+
+
+ <TestCase testID="MaskEffect_yFrom_Default" keywords="[MaskEffect, Properties, yFrom]" description="Test the default value of the yFrom property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="yFrom" value="NaN"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_yFrom" keywords="[MaskEffect, Properties, yFrom]" description="Test the setting of the yFrom property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="yFrom" value="1"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="yFrom" value="1"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_repeatCount_Default" keywords="[MaskEffect, Properties, repeatCount]" description="Test the default value of the repeatCount property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="repeatCount" value="1"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_repeatCount" keywords="[MaskEffect, Properties, repeatCount]" description="Test the setting of the repeatCount property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="repeatCount" value="5"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="repeatCount" value="5"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_repeatCount_Play" keywords="[MaskEffect, Properties, repeatCount]" description="Verify the effect is played 'repeatCount' times.">
+ <setup>
+ <RunCode code="application.ResetImage()"/>
+ <RunCode code="application.ResetEffectSize(50, 100, 50, 100)"/>
+ <SetProperty target="testEffect" propertyName="repeatCount" value="3"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play()" waitTarget="testEffect" waitEvent="effectEnd"/>
+ <AssertPropertyValue propertyName="tweenCounter" value="3"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_suspendBackgroundProcessing_Default" keywords="[MaskEffect, Properties, suspendBackgroundProcessing]" description="Test the default value of the suspendBackgroundProcessing property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="suspendBackgroundProcessing" value="false"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_suspendBackgroundProcessing" keywords="[MaskEffect, Properties, suspendBackgroundProcessing]" description="Test the setting of the suspendBackgroundProcessing property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="suspendBackgroundProcessing" value="true"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="suspendBackgroundProcessing" value="true"/>
+ </body>
+ </TestCase>
+
+
+ <TestCase testID="MaskEffect_instanceClass" keywords="[MaskEffect, Properties, instanceClass]" description="Test the setting of the instanceClass property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="instanceClass" value="{application.myMaskEffectInstance}"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="instanceClass" value="{application.myMaskEffectInstance}"/>
+ </body>
+ </TestCase>
+
+
+ <TestCase testID="MaskEffect_startDelay_Default" keywords="[MaskEffect, Properties, startDelay]" description="Test the default value of the startDelay property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="startDelay" value="0"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_startDelay" keywords="[MaskEffect, Properties, startDelay]" description="Test the setting of the startDelay property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="startDelay" value="500"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="startDelay" value="500"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_startDelay_Play" keywords="[MaskEffect, Properties, startDelay]" description="Test the effect does not play during the startDelay.">
+ <setup>
+ <RunCode code="application.ResetEffectSize(50, 100, 50, 100)"/>
+ <SetProperty target="testEffect" propertyName="startDelay" value="1000"/>
+ <SetProperty target="testEffect" propertyName="duration" value="1000"/>
+ </setup>
+ <body>
+ <RunCode code="application.testEffect.play()" />
+ <Pause timeout="700"/>
+ <CompareBitmap target="testImage" url="../Props/Baselines/MaskEffect_startDelay_Play.png" />
+ </body>
+ </TestCase>
+
+ <TestCase testID="MaskEffect_repeatDelay_Default" keywords="[MaskEffect, Properties, repeatDelay]" description="Test the default value of the repeatDelay property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="repeatDelay" value="0"/>
+ </body>
+ </TestCase>
+ <TestCase testID="MaskEffect_repeatDelay" keywords="[MaskEffect, Properties, repeatDelay]" description="Test the setting of the repeatDelay property.">
+ <setup>
+ <RunCode code="application.ResetEffectDefault()"/>
+ <SetProperty target="testEffect" propertyName="repeatDelay" value="250"/>
+ </setup>
+ <body>
+ <AssertPropertyValue target="testEffect" propertyName="repeatDelay" value="250"/>
+ </body>
+ </TestCase>
+
+ </testCases>
+
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/SWFs/MaskEffect_Main.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/SWFs/MaskEffect_Main.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/SWFs/MaskEffect_Main.mxml (added)
+++ incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/SWFs/MaskEffect_Main.mxml Tue Aug 7 17:13:06 2012
@@ -0,0 +1,170 @@
+<?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.
+
+-->
+<mx:Application height="500" width="500"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns:trix="Assets.*"
+ xmlns="*"
+ backgroundColor="0xFFFFFF"
+
+ creationComplete="Init()"
+ layout="absolute">
+
+ <mx:Script>
+ <![CDATA[
+ import mx.controls.Image;
+ import mx.effects.MaskEffect;
+ import mx.events.StateChangeEvent;
+ import mx.effects.effectClasses.MaskEffectInstance;
+ import mx.core.mx_internal;
+ import mx.events.TweenEvent;
+
+ //Vars
+ public var myMaskEffectInstance:MaskEffectInstance = new MaskEffectInstance(null);
+ public var tweenCounter:int = 0;
+
+ //Init
+ public function Init():void
+ {
+ this.internalEffect.mx_internal::persistAfterEnd = true;
+ }
+
+ //Methods
+ public function ResetImage():void
+ {
+ }
+
+ //Various effect resets
+ public function ResetEffectDefault():void
+ {
+ this.testEffect.stop();
+ this.testImage.filters = null;
+ this.testEffect = new MaskEffect();
+
+ //Extra init
+ this.WireUpExtras();
+ }
+
+ public function ResetEffect():void
+ {
+ this.testEffect = new MaskEffect();
+
+ this.testEffect.scaleXFrom = 0;
+ this.testEffect.scaleXTo = 1;
+ this.testEffect.scaleYFrom = 0;
+ this.testEffect.scaleYTo = 1;
+
+ //Extra init
+ this.WireUpExtras();
+ }
+
+ public function ResetEffectScale(scaleXFrom:Number, scaleXTo:Number, scaleYFrom:Number, scaleYTo:Number):void
+ {
+ this.testEffect = new MaskEffect();
+
+ this.testEffect.scaleXFrom = scaleXFrom;
+ this.testEffect.scaleXTo = scaleXTo;
+ this.testEffect.scaleYFrom = scaleYFrom;
+ this.testEffect.scaleYTo = scaleYTo;
+
+ //Extra init
+ this.WireUpExtras();
+ }
+
+ public function ResetEffectSize(xFrom:Number, xTo:Number, yFrom:Number, yTo:Number):void
+ {
+ this.testEffect = new MaskEffect();
+
+ this.testEffect.xFrom = xFrom;
+ this.testEffect.xTo = xTo;
+ this.testEffect.yFrom = yFrom;
+ this.testEffect.yTo = yTo;
+
+ //Extra init
+ this.WireUpExtras();
+ }
+
+ public function WireUpExtras():void
+ {
+ //Reset the tween counter and attach the effect end handler
+ this.tweenCounter = 0;
+ this.testEffect.addEventListener(TweenEvent.TWEEN_START, function():void{application.tweenCounter++});
+
+ //Attach the target
+ this.testEffect.target = this.testImage;
+
+ //Keep the mask at effect end
+ this.testEffect.mx_internal::persistAfterEnd = true;
+ }
+
+ //Temp functions
+ public function MyScaleEasing():void
+ {
+ }
+
+ public function MyMoveEasing():void
+ {
+ }
+
+ public function MyMaskFunction():void
+ {
+ }
+
+ //State change helpers
+ public function doManualReset():void
+ {
+ if(currentState == "stateOne")
+ {
+ dispatchEvent(new Event("manualResetComplete"));
+ }
+ else
+ {
+ addEventListener("currentStateChange", handleCurrentStateChange);
+ currentState = "stateOne";
+ }
+ }
+
+ private function handleCurrentStateChange(e:StateChangeEvent):void
+ {
+ dispatchEvent(new Event("manualResetComplete"));
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:states>
+ <mx:State name="stateOne"/>
+ <mx:State name="stateTwo"/>
+ </mx:states>
+
+ <mx:transitions>
+ <mx:Transition fromState="stateOne" toState="stateTwo">
+ <mx:Sequence id="toStateTwo">
+ <mx:MaskEffect id="internalEffect" targets="{[testImage]}" scaleXFrom="0" scaleXTo=".7" scaleYFrom="0" scaleYTo=".7" duration="500"/>
+ </mx:Sequence>
+ </mx:Transition>
+ </mx:transitions>
+
+ <!-- Simple Effects -->
+ <mx:MaskEffect id="testEffect" />
+
+ <!-- UI Components -->
+ <mx:Image id="testImage" source="Assets/../../../../../../Assets/Images/bluerect.jpg"/>
+
+</mx:Application>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/States/Baselines/MaskEffect_TransitionToStateTwo.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/States/Baselines/MaskEffect_TransitionToStateTwo.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/States/Baselines/MaskEffect_TransitionToStateTwo.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/States/MaskEffect_States.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/States/MaskEffect_States.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/States/MaskEffect_States.mxml (added)
+++ incubator/flex/trunk/mustella/tests/mx/effects/MaskEffect/States/MaskEffect_States.mxml Tue Aug 7 17:13:06 2012
@@ -0,0 +1,61 @@
+<?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="mx/effects/MaskEffect/States/"
+ xmlns:mx="http://www.adobe.com/2006/mxml"
+ xmlns="*"
+ testSWF="../SWFs/MaskEffect_Main.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.Application;
+ ]]>
+ </mx:Script>
+
+ <testCases>
+
+ <TestCase testID="MaskEffect_TransitionToStateTwo" keywords="[MaskEffect, Transition, ChangeState]" description="Verify the MaskEffect effect works in a transition composite effect.">
+ <setup>
+ <RunCode code="application.doManualReset()" waitEvent="manualResetComplete" />
+ </setup>
+ <body>
+ <SetProperty target="{application}" propertyName="currentState" value="stateTwo" waitTarget="toStateTwo" waitEvent="effectEnd" />
+ <CompareBitmap target="testImage" url="../States/Baselines/MaskEffect_TransitionToStateTwo.png" />
+ </body>
+ </TestCase>
+
+
+ </testCases>
+
+</UnitTester>