blob: 43a02320f7e63d0f26beb55b45af5ed8a40c0d7a [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/DataGrid/DataGrid_HaloSkin/Styles/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="DataGridMain2_halo.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 comps.dataGridInCanvasComp;
import mx.styles.StyleManager;
import mx.managers.SystemManager;
import RedFocusRect;
import flash.display.BlendMode;
]]>
</mx:Script>
<testCases>
<TestCase testID="styleName_multiple_halo" description="Test multiple styleNames for DataGrid. This test will only work with Flex 4 and newer."
keywords="[DataGrid, styleName, CSS]" >
<setup>
<ResetComponent target="gridInCanvas" className="comps.dataGridInCanvasComp" waitEvent="updateComplete" waitTarget="gridInCanvas" />
<SetProperty propertyName="width" value="200" target="gridInCanvas" waitEvent="updateComplete" waitTarget="gridInCanvas" />
<SetProperty propertyName="height" value="200" target="gridInCanvas" waitEvent="updateComplete" waitTarget="gridInCanvas" />
<SetProperty propertyName="dataProvider" target="gridInCanvas.getChildAt(0)" valueExpression="value=application.myDP"
waitEvent="updateComplete" waitTarget="gridInCanvas.getChildAt(0)" />
</setup>
<body>
<SetStyle target="gridInCanvas" value="redText italicText" styleName="styleName" waitEvent="updateComplete" waitTarget="gridInCanvas" />
<CompareBitmap target="gridInCanvas.getChildAt(0).mx_internal:rendererArray.1.0" url="../Styles/baselines/multiple_styleName.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="styleName_multiple_precedence_halo" description="Test multiple styleNames for DataGrid. This test will only work with Flex 4 and newer."
keywords="[DataGrid, styleName, CSS]" >
<setup>
<ResetComponent target="gridInCanvas" className="comps.dataGridInCanvasComp" waitEvent="updateComplete" waitTarget="gridInCanvas" />
<SetProperty propertyName="width" value="200" target="gridInCanvas" waitEvent="updateComplete" waitTarget="gridInCanvas" />
<SetProperty propertyName="height" value="200" target="gridInCanvas" waitEvent="updateComplete" waitTarget="gridInCanvas" />
<SetProperty propertyName="dataProvider" target="gridInCanvas.getChildAt(0)" valueExpression="value=application.myDP"
waitEvent="updateComplete" waitTarget="gridInCanvas.getChildAt(0)" />
</setup>
<body>
<SetStyle target="gridInCanvas" value="redText italicText boldBig" styleName="styleName" waitEvent="updateComplete" waitTarget="gridInCanvas" />
<CompareBitmap target="gridInCanvas.getChildAt(0).mx_internal:rendererArray.1.0" url="../Styles/baselines/$testID.png" numColorVariances="5" ignoreMaxColorVariance="true"/>
</body>
</TestCase>
<TestCase testID="styleName_multiple_setStyle_halo" description="Test multiple styleNames for DataGrid used with setStyle. This test will only work with Flex 4 and newer."
keywords="[DataGrid, styleName, CSS]" >
<setup>
<ResetComponent target="gridInCanvas" className="comps.dataGridInCanvasComp" waitEvent="updateComplete" waitTarget="gridInCanvas" />
<SetProperty propertyName="width" value="200" target="gridInCanvas" waitEvent="updateComplete" waitTarget="gridInCanvas" />
<SetProperty propertyName="height" value="200" target="gridInCanvas" waitEvent="updateComplete" waitTarget="gridInCanvas" />
<SetProperty propertyName="dataProvider" target="gridInCanvas.getChildAt(0)" valueExpression="value=application.myDP"
waitEvent="updateComplete" waitTarget="gridInCanvas.getChildAt(0)" />
</setup>
<body>
<SetStyle target="gridInCanvas.getChildAt(0)" value="redText italicText" styleName="styleName" waitEvent="updateComplete" waitTarget="gridInCanvas.getChildAt(0)" />
<SetStyle target="gridInCanvas.getChildAt(0)" value="#22DD22" styleName="color" waitEvent="updateComplete" waitTarget="gridInCanvas.getChildAt(0)" />
<CompareBitmap target="gridInCanvas.getChildAt(0).mx_internal:rendererArray.1.0" url="../Styles/baselines/multiple_styleName_setStyle.png" timeout="5000" />
</body>
</TestCase>
</testCases>
</UnitTester>