blob: 854d3aaea2f11cecf9c008637b9431f2d3b1f893 [file] [log] [blame]
<?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/Image/integration/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="Image_BlendModes_Main.mxml">
<mx:Script>
<![CDATA[
import comps.*;
public static function init(o:DisplayObject):void
{
}
]]>
</mx:Script>
<mx:Metadata>
<![CDATA[
[Mixin]
]]>
</mx:Metadata>
<testCases>
<TestCase testID="Image_blendMode_onGroup_default" description="Test that the default blendMode is auto." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target" className="comps.ImageRectBlendMode" waitTarget="blendMode_target" waitEvent="updateComplete" />
</setup>
<body>
<AssertPropertyValue value="normal" propertyName="blendMode" target="blendMode_target.image1" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onGroup_color" description="Test blendMode=color set on Image." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_2" className="comps.ImageRectBlendModeNormal" waitTarget="blendMode_target_2" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_2.group_image" propertyName="blendMode" value="color" waitTarget="blendMode_target_2.group_image" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_2" timeout="2500" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onGroup_colordodge" description="Test blendMode=colordodge set on Image." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_2" className="comps.ImageRectBlendModeNormal" waitTarget="blendMode_target_2" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_2.group_image" propertyName="blendMode" value="colordodge" waitTarget="blendMode_target_2.group_image" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_2" timeout="2500" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onGroup_colorburn" description="Test blendMode=colorburn set on Image." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_2" className="comps.ImageRectBlendModeNormal" waitTarget="blendMode_target_2" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_2.group_image" propertyName="blendMode" value="colorburn" waitTarget="blendMode_target_2.group_image" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_2" timeout="2500" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onGroup_softlight" description="Test blendMode=softlight set on Image." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_2" className="comps.ImageRectBlendModeNormal" waitTarget="blendMode_target_2" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_2.group_image" propertyName="blendMode" value="softlight" waitTarget="blendMode_target_2.group_image" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_2" timeout="2500" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onGroup_exclusion" description="Test blendMode=exclusion set on Image." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_2" className="comps.ImageRectBlendModeNormal" waitTarget="blendMode_target_2" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_2.group_image" propertyName="blendMode" value="exclusion" waitTarget="blendMode_target_2.group_image" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_2" timeout="2500" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onGroup_hue" description="Test blendMode=hue set on Image." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_2" className="comps.ImageRectBlendModeNormal" waitTarget="blendMode_target_2" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_2.group_image" propertyName="blendMode" value="hue" waitTarget="blendMode_target_2.group_image" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_2" timeout="2500" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onGroup_saturation" description="Test blendMode=saturation set on Image." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_2" className="comps.ImageRectBlendModeNormal" waitTarget="blendMode_target_2" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_2.group_image" propertyName="blendMode" value="saturation" waitTarget="blendMode_target_2.group_image" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_2" timeout="2500" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onGroup_luminosity" description="Test blendMode=luminosity set on Image." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_2" className="comps.ImageRectBlendModeNormal" waitTarget="blendMode_target_2" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_2.group_image" propertyName="blendMode" value="luminosity" waitTarget="blendMode_target_2.group_image" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_2" timeout="2500" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onImage_exclusion" description="Test blendMode=exclusion set on Image." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_3" className="comps.ImageRectBlendModeNormal2" waitTarget="blendMode_target_3" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_3.image1" propertyName="blendMode" value="exclusion" waitTarget="blendMode_target_3.image1" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_3" timeout="2500" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onImage_hue" description="Test blendMode=hue set on Image." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_3" className="comps.ImageRectBlendModeNormal2" waitTarget="blendMode_target_3" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_3.image1" propertyName="blendMode" value="hue" waitTarget="blendMode_target_3.image1" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_3" timeout="2500" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onImage_saturation" description="Test blendMode=saturation set on Image." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_3" className="comps.ImageRectBlendModeNormal2" waitTarget="blendMode_target_3" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_3.image1" propertyName="blendMode" value="saturation" waitTarget="blendMode_target_3.image1" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_3" timeout="2500" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onImage_luminosity" description="Test blendMode=luminosity set on Image." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_3" className="comps.ImageRectBlendModeNormal2" waitTarget="blendMode_target_3" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_3.image1" propertyName="blendMode" value="luminosity" waitTarget="blendMode_target_3.image1" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_3" timeout="2500" />
</body>
</TestCase>
<TestCase testID="Image_blendMode_onGroup_saturation_addMask" description="Test blendMode=saturation set on Image. Then, add a mask and check that the correct display objects are created." keywords="[blendMode, normal, Graphic]">
<setup>
<ResetComponent target="blendMode_target_2" className="comps.ImageRectBlendModeNormal" waitTarget="blendMode_target_2" waitEvent="updateComplete" />
</setup>
<body>
<SetProperty target="blendMode_target_2.group_image" propertyName="blendMode" value="saturation" waitTarget="blendMode_target_2.group_image" waitEvent="updateComplete" />
<SetProperty target="blendMode_target_2.group_image" propertyName="mask" valueExpression="value=application.group2" waitTarget="blendMode_target_2.group_image" waitEvent="updateComplete" />
<CompareBitmap url="../integration/baselines/$testID.png" target="blendMode_target_2" timeout="2500" />
</body>
</TestCase>
</testCases>
</UnitTester>