blob: ee30090a79c798f15ab0495cfd846c844761ff93 [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="apollo/spark/components/WindowedApplication/properties/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="wa_app2.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.FlexGlobals;
import spark.skins.spark.*;
]]>
</mx:Script>
<testCases>
<!--
========================================================
Test title
========================================================
-->
<TestCase testID="title_test1_mac" keywords="[WindowedApplication,title]" description="Set to something." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="The quick, brown fox" waitEvent="updateComplete" />
<CompareBitmap target="titleBar" url="../properties/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="title_test1_win" keywords="[WindowedApplication,title]" description="Set to something." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="The quick, brown fox" waitEvent="updateComplete" />
<CompareBitmap target="titleBar" numColorVariances="10" ignoreMaxColorVariance="true" url="../properties/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="title_test2_mac" keywords="[WindowedApplication,title]" description="Clear it." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="The brown, quick fox" waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="" waitEvent="updateComplete" />
<CompareBitmap target="titleBar" numColorVariances="10" ignoreMaxColorVariance="true" url="../properties/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="title_test2_win" keywords="[WindowedApplication,title]" description="Clear it." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="The brown, quick fox" waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="" waitEvent="updateComplete" />
<CompareBitmap target="titleBar" url="../properties/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="title_test3_mac" keywords="[WindowedApplication,title]" description="Change it." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="The quick, brown fox" waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="The brown, quick fox" waitEvent="updateComplete" />
<CompareBitmap target="titleBar" url="../properties/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="title_test3_win" keywords="[WindowedApplication,title]" description="Change it." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="The quick, brown fox" waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="The brown, quick fox" waitEvent="updateComplete" />
<CompareBitmap target="titleBar" url="../properties/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="title_test4" keywords="[WindowedApplication,title]" description="Bindable." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="The slow, red fox" waitEvent="updateComplete" />
<AssertPropertyValue target="bindingTarget" propertyName="theTitle" value="The slow, red fox" />
</body>
</TestCase>
<TestCase testID="title_test5_mac" keywords="[WindowedApplication,title]" description="Longer." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="a" waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="a aa aaa aaaa aaaaa aaaaaa" waitEvent="updateComplete" />
<CompareBitmap target="titleBar" url="../properties/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="title_test5_win" keywords="[WindowedApplication,title]" description="Longer." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="a" waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="a aa aaa aaaa aaaaa aaaaaa" waitEvent="updateComplete" />
<CompareBitmap target="titleBar" url="../properties/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="title_test6_mac" keywords="[WindowedApplication,title]" description="Shorter." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="a aa aaa aaaa aaaaa aaaaaa" waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="a" waitEvent="updateComplete" />
<CompareBitmap target="titleBar" url="../properties/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="title_test6_win" keywords="[WindowedApplication,title]" description="Shorter." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="a aa aaa aaaa aaaaa aaaaaa" waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="a" waitEvent="updateComplete" />
<CompareBitmap target="titleBar" url="../properties/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="title_test7_mac" keywords="[WindowedApplication,title]" description="Check truncation." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="width" value="200" waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="I am the very model of a modern major general. I've information vegetable animal and mineral." waitEvent="updateComplete" />
<CompareBitmap target="titleBar" url="../properties/baselines/$testID.png" />
</body>
</TestCase>
<TestCase testID="title_test7_win" keywords="[WindowedApplication,title]" description="Check truncation." >
<setup>
<RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" />
</setup>
<body>
<SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" />
<SetProperty target="" propertyName="width" value="200" waitEvent="updateComplete" />
<SetProperty target="" propertyName="title" value="I am the very model of a modern major general. I've information vegetable animal and mineral." waitEvent="updateComplete" />
<CompareBitmap target="titleBar" url="../properties/baselines/$testID.png" />
</body>
</TestCase>
</testCases>
</UnitTester>