blob: cf5c3415a7a684a5056143ae39c377f67f269d72 [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/TabBar/Styles/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="TabBar_Basic_Spark.mxml">
<!-- this set of lines form a template that must be in each unit test -->
<mx:Script>
<![CDATA[
import flash.events.*;
import mx.controls.*;
import mx.core.*;
public static function init(o:DisplayObject):void
{
}
public function addData(bool:int):void
{
application.tb.dataProvider = myDP;
}
[Bindable]
private var myDP:Array=[{label:"Italy", data:"ITALY"},{label:"England", data:"ENGLAND"},{label:"Slovenia", data:"SLOVENIA"}];
]]>
</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.containers.* ;
import mx.controls.*;
import mx.styles.StyleManager;
import mx.managers.SystemManager;
]]>
</mx:Script>
<mx:Style>
@namespace "library://ns.adobe.com/flex/mx";
.myTabBarJPG
{
skin: ClassReference("comps.button_jpg_embeded");
}
.myTabBarGIF
{
skin: ClassReference("comps.button_gif_embeded");
}
.myTabBarPNG
{
skin: ClassReference("comps.button_png_embeded");
}
.myTabBarSWF
{
skin: ClassReference("comps.button_swf_embeded");
}
.myTabBarJPGRunTime
{
skin: ClassReference("comps.button_jpg_runtime");
}
.myTabBarGIFRunTime
{
skin: ClassReference("comps.button_gif_runtime");
}
.myTabBarPNGRunTime
{
skin: ClassReference("comps.button_png_runtime");
}
.myTabBarSWFRunTime
{
skin: ClassReference("comps.button_swf_runtime");
}
</mx:Style>
<testCases>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_JPG" keywords="[enabled, SkinStates,EmbedJPG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarJPG" waitEvent="updateComplete" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_JPG.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_JPG_mouseOver_selectedTab" keywords="[enabled, SkinStates,EmbedJPG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarJPG" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_JPG_mouseOver_selectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_JPG_mouseOver_NonselectedTab" keywords="[enabled, SkinStates,EmbedJPG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarJPG" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_JPG_mouseOver_NonselectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_JPG_mouseDown_selectedTab" keywords="[enabled, SkinStates,EmbedJPG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarJPG" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<DispatchMouseEvent type="mouseDown" localX="10" localY="10" target="tb" waitEvent="mouseDown" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_JPG_mouseDown_selectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_JPG_mouseDown_NonselectedTab" keywords="[enabled, SkinStates,EmbedJPG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarJPG" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<DispatchMouseEvent type="mouseDown" localX="109" localY="10" target="tb" waitEvent="mouseDown" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_JPG_mouseDown_NonselectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_JPG_Disabled" keywords="[disabled, SkinStates,EmbedJPG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarJPG" waitEvent="updateComplete" waitTarget="tb" />
<SetProperty target="tb" propertyName="enabled" value="false" waitEvent="updateComplete" waitTarget="tb"/>
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_Disabled_JPG.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_PNG" keywords="[enabled, SkinStates,EmbedPNG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarPNG" waitEvent="updateComplete" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_PNG.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_PNG_mouseOver_selectedTab" keywords="[enabled, SkinStates,EmbedPNG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarPNG" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_PNG_mouseOver_selectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_PNG_mouseOver_NonselectedTab" keywords="[enabled, SkinStates,EmbedPNG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarPNG" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_PNG_mouseOver_NonselectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_PNG_mouseDown_selectedTab" keywords="[enabled, SkinStates,EmbedPNG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarPNG" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<DispatchMouseEvent type="mouseDown" localX="10" localY="10" target="tb" waitEvent="mouseDown" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_PNG_mouseDown_selectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_PNG_mouseDown_NonselectedTab" keywords="[enabled, SkinStates,EmbedPNG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarPNG" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<DispatchMouseEvent type="mouseDown" localX="109" localY="10" target="tb" waitEvent="mouseDown" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_PNG_mouseDown_NonselectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_PNG_Disabled" keywords="[disabled, SkinStates,EmbedPNG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarPNG" waitEvent="updateComplete" waitTarget="tb" />
<SetProperty target="tb" propertyName="enabled" value="false" waitEvent="updateComplete" waitTarget="tb"/>
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_Disabled_PNG.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_GIF" keywords="[enabled, SkinStates,EmbedGIF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarGIF" waitEvent="updateComplete" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_GIF.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_GIF_mouseOver_selectedTab" keywords="[enabled, SkinStates,EmbedGIF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarGIF" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_GIF_mouseOver_selectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_GIF_mouseOver_NonselectedTab" keywords="[enabled, SkinStates,EmbedGIF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarGIF" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_GIF_mouseOver_NonselectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_GIF_mouseDown_selectedTab" keywords="[enabled, SkinStates,EmbedGIF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarGIF" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<DispatchMouseEvent type="mouseDown" localX="10" localY="10" target="tb" waitEvent="mouseDown" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_GIF_mouseDown_selectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_GIF_mouseDown_NonselectedTab" keywords="[enabled, SkinStates,EmbedGIF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarGIF" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<DispatchMouseEvent type="mouseDown" localX="109" localY="10" target="tb" waitEvent="mouseDown" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_GIF_mouseDown_NonselectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_GIF_Disabled" keywords="[disabled, SkinStates,EmbedGIF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarGIF" waitEvent="updateComplete" waitTarget="tb" />
<SetProperty target="tb" propertyName="enabled" value="false" waitEvent="updateComplete" waitTarget="tb"/>
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_Disabled_GIF.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_SWF" keywords="[enabled, SkinStates,EmbedSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWF" waitEvent="updateComplete" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_SWF.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_SWF_mouseOver_selectedTab" keywords="[enabled, SkinStates,EmbedSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWF" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_SWF_mouseOver_selectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_SWF_mouseOver_NonselectedTab" keywords="[enabled, SkinStates,EmbedSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWF" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_SWF_mouseOver_NonselectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_SWF_mouseDown_selectedTab" keywords="[enabled, SkinStates,EmbedSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWF" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<DispatchMouseEvent type="mouseDown" localX="10" localY="10" target="tb" waitEvent="mouseDown" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_SWF_mouseDown_selectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_SWF_mouseDown_NonselectedTab" keywords="[enabled, SkinStates,EmbedSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWF" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<DispatchMouseEvent type="mouseDown" localX="109" localY="10" target="tb" waitEvent="mouseDown" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_SWF_mouseDown_NonselectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_SWF_Disabled" keywords="[disabled, SkinStates,EmbedSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWF" waitEvent="updateComplete" waitTarget="tb" />
<SetProperty target="tb" propertyName="enabled" value="false" waitEvent="updateComplete" waitTarget="tb"/>
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_Disabled_SWF.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_runtime_JPG" keywords="[enabled, SkinStates,runtimeJPG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarJPGRunTime" waitEvent="updateComplete" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_runtime_JPG.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_runtime_PNG" keywords="[enabled, SkinStates,runtimePNG, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarPNGRunTime" waitEvent="updateComplete" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_runtime_PNG.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_runtime_GIF" keywords="[enabled, SkinStates,runtimeGIF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarGIFRunTime" waitEvent="updateComplete" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_runtime_GIF.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_runtime_SWF" keywords="[enabled, SkinStates,runtimeSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" waitEvent="updateComplete" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_runtime_SWF.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_runtime_SWF_mouseOver_selectedTab" keywords="[enabled, SkinStates,runtimeSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" />
<WaitForEvent eventName="complete" target="tb.getChildAt(0).currentSkin.overImage" timeout="10000"/>
<WaitForEffectsToEnd />
<WaitForLayoutManager />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_runtime_SWF_mouseOver_selectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_runtime_SWF_mouseOver_NonselectedTab" keywords="[enabled, SkinStates,runtimeSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" />
<WaitForEvent eventName="complete" target="tb.getChildAt(2).currentSkin.overImage" />
<WaitForEffectsToEnd />
<WaitForLayoutManager />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_runtime_SWF_mouseOver_NonselectedTab.png" timeout="5000" />
</body>
</TestCase>
<!-- TabBars select the tab on mouse down instead of click. -->
<TestCase testID="TabBar_Styles_SkinStates_runtime_SWF_mouseDown_selectedTab" keywords="[enabled, SkinStates,runtimeSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetProperty target="tb" propertyName="selectedIndex" value="0" waitEvent="updateComplete" waitTarget="tb" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" />
<WaitForEvent eventName="complete" target="tb.getChildAt(0).currentSkin.selectedUpImage" timeout="5000" />
<DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<DispatchMouseEvent type="mouseDown" localX="10" localY="10" target="tb" waitEvent="mouseDown" waitTarget="tb" />
<WaitForLayoutManager />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_runtime_SWF_mouseDown_selectedTab.png" timeout="5000" />
</body>
</TestCase>
<!-- TabBars select the tab on mouse down instead of click. -->
<TestCase testID="TabBar_Styles_SkinStates_runtime_SWF_mouseDown_NonselectedTab" keywords="[enabled, SkinStates,runtimeSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="85" localY="7" target="tb" waitEvent="rollOver" waitTarget="tb" />
<DispatchMouseEvent type="mouseDown" localX="85" localY="7" target="tb" />
<WaitForEvent eventName="complete" target="tb.getChildAt(1).currentSkin.selectedUpImage" timeout="5000" />
<WaitForLayoutManager />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_runtime_SWF_mouseDown_NonselectedTab.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_runtime_SWF_Disabled" keywords="[disabled, SkinStates,runtimeSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWFRunTime" waitEvent="updateComplete" waitTarget="tb" />
<!-- don't wait for the updateComplete event so we don't miss the complete event for the load of the first tab -->
<SetProperty target="tb" propertyName="enabled" value="false"/>
<WaitForEvent eventName="complete" target="tb.getChildAt(0).getChildAt(0).disabledImage" />
<!-- need to wait for all three tabs to load the disabledImage -->
<WaitForEffectsToEnd />
<WaitForLayoutManager />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_runtime_Disabled_SWF.png" timeout="5000" />
</body>
</TestCase>
<!-- AIR specific tests -->
<TestCase testID="TabBar_Styles_SkinStates_Embeding_SWF_airOnly" keywords="[enabled, SkinStates,EmbedSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWF" waitEvent="updateComplete" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_SWF_air.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_SWF_mouseOver_selectedTab_airOnly" keywords="[enabled, SkinStates,EmbedSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWF" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_SWF_mouseOver_selectedTab_air.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_SWF_mouseOver_NonselectedTab_airOnly" keywords="[enabled, SkinStates,EmbedSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWF" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_SWF_mouseOver_NonselectedTab_air.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_SWF_mouseDown_selectedTab_airOnly" keywords="[enabled, SkinStates,EmbedSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWF" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="10" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<DispatchMouseEvent type="mouseDown" localX="10" localY="10" target="tb" waitEvent="mouseDown" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_SWF_mouseDown_selectedTab_air.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_SWF_mouseDown_NonselectedTab_airOnly" keywords="[enabled, SkinStates,EmbedSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWF" waitEvent="updateComplete" waitTarget="tb" />
<DispatchMouseEvent type="rollOver" localX="109" localY="10" target="tb" waitEvent="rollOver" waitTarget="tb" />
<DispatchMouseEvent type="mouseDown" localX="109" localY="10" target="tb" waitEvent="mouseDown" waitTarget="tb" />
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_SWF_mouseDown_NonselectedTab_air.png" timeout="5000" />
</body>
</TestCase>
<TestCase testID="TabBar_Styles_SkinStates_Embeding_SWF_Disabled_airOnly" keywords="[disabled, SkinStates,EmbedSWF, TabBar]" >
<setup>
<ResetComponent target="tb" className="mx.controls.TabBar" waitEvent="updateComplete" waitTarget="tb"/>
<RunCode code="addData(0);" />
<SetStyle target="tb" styleName="tabStyleName" value="myTabBarSWF" waitEvent="updateComplete" waitTarget="tb" />
<SetProperty target="tb" propertyName="enabled" value="false" waitEvent="updateComplete" waitTarget="tb"/>
<WaitForEffectsToEnd />
</setup>
<body>
<CompareBitmap target="tb" url="../Styles/baselines/spark/TabBar_Styles_SkinStates_Embeding_Disabled_SWF_air.png" timeout="5000" />
</body>
</TestCase>
</testCases>
</UnitTester>