| <?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/skin/" 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 flash.system.Capabilities; |
| import mx.core.FlexGlobals; |
| import spark.components.*; |
| import spark.skins.spark.*; |
| |
| ]]> |
| </mx:Script> |
| |
| <testCases> |
| |
| <!-- |
| ======================================================== |
| Test the minimize/maximize/close buttons. |
| Tests which click the minimize/maximize buttons to |
| minimize/maximize, and tests verifying that they are |
| enabled/disabled appropriately, are covered in: |
| |
| wa_properties_maximizable_false.mxml and |
| wa_properties_maximizable_true.mxml. |
| wa_properties_minimizable_false.mxml |
| wa_properties_minimizable_true.mxml |
| |
| ======================================================== |
| --> |
| |
| <TestCase testID="titleBar_test1_SparkChromeWindowedApplicationSkin_mac" keywords="[WindowedApplication,titleBar]" description="Verify the appearance of the buttons when the application is disabled." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <SetProperty target="" propertyName="enabled" value="false" waitEvent="updateComplete"/> |
| <CompareBitmap target="skin.titleBar" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test1_SparkChromeWindowedApplicationSkin_win" keywords="[WindowedApplication,titleBar]" description="Verify the appearance of the buttons when the application is disabled." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <SetProperty target="" propertyName="enabled" value="false" waitEvent="updateComplete"/> |
| <CompareBitmap target="skin.titleBar" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test2_SparkChromeWindowedApplicationSkin_mac" keywords="[WindowedApplication,titleBar]" description="Verify the appearance of the buttons when the application is enabled." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test2_SparkChromeWindowedApplicationSkin_win" keywords="[WindowedApplication,titleBar]" description="Verify the appearance of the buttons when the application is enabled." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test3_SparkChromeWindowedApplicationSkin_mac" keywords="[WindowedApplication,titleBar]" description="Mouse over the maximize button and verify its appearance." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.maximizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test3_SparkChromeWindowedApplicationSkin_win" keywords="[WindowedApplication,titleBar]" description="Mouse over the maximize button and verify its appearance." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.maximizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test4_SparkChromeWindowedApplicationSkin_mac" keywords="[WindowedApplication,titleBar]" description="Mouse over the minimize button and verify its appearance." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.minimizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.minimizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test4_SparkChromeWindowedApplicationSkin_win" keywords="[WindowedApplication,titleBar]" description="Mouse over the minimize button and verify its appearance." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.minimizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.minimizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test5_SparkChromeWindowedApplicationSkin_mac" keywords="[WindowedApplication,titleBar]" description="Mouse over the close button and verify its appearance." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.closeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.closeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test5_SparkChromeWindowedApplicationSkin_win" keywords="[WindowedApplication,titleBar]" description="Mouse over the close button and verify its appearance." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.closeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.closeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test6_SparkChromeWindowedApplicationSkin_mac" keywords="[WindowedApplication,titleBar]" description="Mouse down on the maximize button and verify its appearance." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.maximizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test6_SparkChromeWindowedApplicationSkin_win" keywords="[WindowedApplication,titleBar]" description="Mouse down on the maximize button and verify its appearance." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.maximizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test7_SparkChromeWindowedApplicationSkin_mac" keywords="[WindowedApplication,titleBar]" description="Mouse down on the minimize button and verify its appearance." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.minimizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.minimizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.minimizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test7_SparkChromeWindowedApplicationSkin_win" keywords="[WindowedApplication,titleBar]" description="Mouse down on the minimize button and verify its appearance." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.minimizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.minimizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.minimizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test8_SparkChromeWindowedApplicationSkin_mac" keywords="[WindowedApplication,titleBar]" description="Mouse down on the close button and verify its appearance." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.closeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.closeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.closeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test8_SparkChromeWindowedApplicationSkin_win" keywords="[WindowedApplication,titleBar]" description="Mouse down on the close button and verify its appearance." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.closeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.closeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.closeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test9_SparkChromeWindowedApplicationSkin_mac" keywords="[WindowedApplication,titleBar]" description="Verify the appearance of the maximize button after clicking on it to maximize." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseClickEvent target="skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="" waitEvent="displayStateChange" /> |
| <CompareBitmap target="skin.titleBar.maximizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test9a_SparkChromeWindowedApplicationSkin_win" keywords="[WindowedApplication,titleBar]" description="Verify the appearance of the maximize button after clicking on it to maximize." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseClickEvent target="skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="" waitEvent="displayStateChange" /> |
| <CompareBitmap target="skin.titleBar.maximizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test9b_SparkChromeWindowedApplicationSkin_win" keywords="[WindowedApplication,titleBar]" description="Verify the appearance of the maximize button, when maximized, on rollOver, in Windows." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseClickEvent target="skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="" waitEvent="displayStateChange" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.maximizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test9c_SparkChromeWindowedApplicationSkin_win" keywords="[WindowedApplication,titleBar]" description="Verify the appearance of the maximize button, when maximized, on mouseDown, in Windows." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseClickEvent target="skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="" waitEvent="displayStateChange" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" /> |
| <CompareBitmap target="skin.titleBar.maximizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test10_SparkChromeWindowedApplicationSkin_mac" keywords="[WindowedApplication,titleBar]" description="Be sure the maximize button is no longer in the over state after clicking on it to restore from maximize." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseClickEvent target="skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="" waitEvent="displayStateChange" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseClickEvent target="skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="" waitEvent="displayStateChange" /> |
| <CompareBitmap target="skin.titleBar.maximizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="titleBar_test10_SparkChromeWindowedApplicationSkin_win" keywords="[WindowedApplication,titleBar]" description="Be sure the maximize button is no longer in the over state after clicking on it to restore from maximize." > |
| <setup> |
| <RunCode code="FlexGlobals.topLevelApplication.doReset()" waitTarget="" waitEvent="resetComplete" /> |
| </setup> |
| <body> |
| <SetStyle target="" styleName="skinClass" valueExpression="value = SparkChromeWindowedApplicationSkin " waitEvent="updateComplete" /> |
| <DispatchMouseClickEvent target="skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="" waitEvent="displayStateChange" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="rollOver" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseEvent target="skin.titleBar.maximizeButton" type="mouseDown" localX="5" localY="5" waitEvent="updateComplete" /> |
| <DispatchMouseClickEvent target="skin.titleBar.maximizeButton" localX="5" localY="5" waitTarget="" waitEvent="displayStateChange" /> |
| <CompareBitmap target="skin.titleBar.maximizeButton" url="../skin/baselines/$testID.png" /> |
| </body> |
| </TestCase> |
| |
| </testCases> |
| </UnitTester> |