| <?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/Window/Properties/" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testSWF="Window_main.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[ |
| |
| |
| |
| [Bindable] |
| |
| [Embed(source="../../../../Assets/Images/smallredrect.jpg")] |
| |
| public var kb:Class; |
| |
| |
| |
| ]]> |
| |
| </mx:Script> |
| |
| |
| |
| <testCases> |
| |
| <TestCase testID="Window_properties_default_alwaysInFront" keywords="[Window, properties, alwaysInFront]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="alwaysInFront" value="false" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_default_height" keywords="[Window, properties, height]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="height" value="100" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <!-- |
| |
| <TestCase testID="Window_properties_height_500" keywords="[Window, properties, height]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="height" value="500" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| |
| |
| </setup> |
| |
| <body> |
| |
| <CompareBitmap url="../Properties/baselines/Window_properties_height_500.png" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_height_250_postOpen" keywords="[Window, properties, height]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| <SetProperty propertyName="height" value="250" target="aw" waitTarget="aw" waitEvent="updateComplete"/> |
| |
| </setup> |
| |
| <body> |
| |
| <CompareBitmap url="../Properties/baselines/Window_properties_height_250_postOpen.png" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_width_500" keywords="[Window, properties, width]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="width" value="500" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| |
| |
| </setup> |
| |
| <body> |
| |
| <CompareBitmap url="../Properties/baselines/Window_width_500.png" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_width_250_postOpen" keywords="[Window, properties, width]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| <SetProperty propertyName="width" value="250" target="aw" waitTarget="aw" waitEvent="updateComplete"/> |
| |
| </setup> |
| |
| <body> |
| |
| <CompareBitmap url="../Properties/baselines/Window_width_250_postOpen.png" target="aw"/> |
| |
| </body> |
| |
| </TestCase>--> |
| |
| <TestCase testID="Window_properties_maxHeight_default" keywords="[Window, properties, maxHeight]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="maxHeight" value="107374182" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_maxHeight_500_height_600" keywords="[Window, properties, maxHeight]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="maxHeight" value="500" target="aw"/> |
| |
| <SetProperty propertyName="height" value="600" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="height" value="500" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_maxHeight_500_height_600_postOpen" keywords="[Window, properties, maxHeight]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="maxHeight" value="500" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| <SetProperty propertyName="height" value="600" target="aw" waitEvent="updateComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="height" value="500" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_maxHeight_500_height_300" keywords="[Window, properties, maxHeight]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="maxHeight" value="600" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| <SetProperty propertyName="height" value="300" target="aw" waitEvent="updateComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="height" value="300" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_maxWidth_default" keywords="[Window, properties, maxWidth]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="maxWidth" value="107374182" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_maxWidth_500_width_600" keywords="[Window, properties, maxHeight]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="maxWidth" value="500" target="aw"/> |
| |
| <SetProperty propertyName="width" value="600" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="width" value="500" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_maxWidth_500_width_600_postOpen" keywords="[Window, properties, maxWidth]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="maxWidth" value="500" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| <SetProperty propertyName="width" value="600" target="aw" waitEvent="updateComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="width" value="500" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_maxWidth_500_width_300" keywords="[Window, properties, maxWidth]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="maxWidth" value="600" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| <SetProperty propertyName="width" value="300" target="aw" waitEvent="updateComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="width" value="300" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_minWidth_300_width_200" keywords="[Window, properties, minWidth]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="minWidth" value="300" target="aw"/> |
| |
| <SetProperty propertyName="width" value="200" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="width" value="300" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_minWidth_300_width_200_postOpen" keywords="[Window, properties, minWidth]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="minWidth" value="300" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| <SetProperty propertyName="width" value="200" target="aw" waitEvent="updateComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="width" value="300" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_minWidth_200_width_400" keywords="[Window, properties, minWidth]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="minWidth" value="200" target="aw"/> |
| |
| <SetProperty propertyName="width" value="400" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="width" value="400" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_minHeight_default_mac" keywords="[Window, properties, minHeight]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <RunCode code="application.aw.open()"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="minHeight" value="34" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| <TestCase testID="Window_properties_minHeight_default_win" keywords="[Window, properties, minHeight]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <RunCode code="application.aw.open()"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="minHeight" value="34" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| |
| <TestCase testID="Window_properties_minHeight_300_height_200" keywords="[Window, properties, minHeight]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="minHeight" value="300" target="aw"/> |
| |
| <SetProperty propertyName="height" value="200" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="height" value="300" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_minHeight_300_height_200_postOpen" keywords="[Window, properties, minHeight]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="minHeight" value="300" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| <SetProperty propertyName="height" value="200" target="aw" waitEvent="updateComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="height" value="300" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_minHeight_200_height_400" keywords="[Window, properties, minHeight]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="minHeight" value="200" target="aw"/> |
| |
| <SetProperty propertyName="height" value="400" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="height" value="400" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_showStatusBar_default" keywords="[Window, properties, showStatusBar]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="showStatusBar" value="true" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <!--<TestCase testID="Window_properties_showStatusBar_false" keywords="[Window, properties, showStatusBar]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="showStatusBar" value="false" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <CompareBitmap url="../Properties/baselines/Window_properties_showStatusBar_false.png" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_showStatusBar_true" keywords="[Window, properties, showStatusBar]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="showStatusBar" value="true" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <CompareBitmap url="../Properties/baselines/Window_properties_showStatusBar_true.png" target="aw.statusBar"/> |
| |
| </body> |
| |
| </TestCase>--> |
| |
| <TestCase testID="Window_properties_title_default" keywords="[Window, properties, title]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue value="" propertyName="title" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| |
| |
| <!-- <TestCase testID="Window_properties_title" keywords="[Window, properties, title]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="title" value="Hello World!" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <CompareBitmap url="../Properties/baselines/Window_properties_title.png" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_title_long" keywords="[Window, properties, title]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="title" value="0123456789012345678901234567890123456789012345678901234567890123456789" target="aw"/> |
| |
| <SetProperty propertyName="width" value="400" target="aw"/> |
| |
| <SetProperty propertyName="height" value="400" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <CompareBitmap url="../Properties/baselines/Window_properties_title_long.png" target="aw"/> |
| |
| </body> |
| |
| </TestCase>--> |
| |
| <TestCase testID="Window_properties_status_default" keywords="[Window, properties, status]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="status" value="" target="aw.statusBar"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <!--<TestCase testID="Window_properties_status" keywords="[Window, properties, status]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="status" value="Hello Status!" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <CompareBitmap url="../Properties/baselines/Window_properties_status.png" target="aw.statusBar"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_status_long" keywords="[Window, properties, status]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="status" value="0123456789012345678901234567890123456789012345678901234567890123456789!" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <CompareBitmap url="../Properties/baselines/Window_properties_status_long.png" target="aw.statusBar"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_titleIcon" keywords="[Window,properties, titleIcon]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty target="aw" propertyName="titleIcon" valueExpression="value=kb" /> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <CompareBitmap url="../Properties/baselines/Window_properties_titleIcon.png" target="aw"/> |
| |
| </body> |
| |
| </TestCase>--> |
| |
| <TestCase testID="Window_properties_visible_default" keywords="[Window, properties, visible]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="visible" value="true" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| |
| <TestCase testID="Window_properties_visible_false" keywords="[Window, properties, visible]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="visible" value="false" target="aw"/> |
| |
| <RunCode code="application.aw.open()" /> |
| |
| </setup> |
| |
| <body> |
| |
| <AssertPropertyValue propertyName="visible" value="false" target="aw"/> |
| |
| </body> |
| |
| </TestCase> |
| <TestCase testID="Window_properties_new_window_focus_systemChrome_none" keywords="[Window, properties, newWindow, focus, systemChrome, none]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="title" value="Hello World!" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| <AssertMethodValue value="true" method="value=String(application.aw.nativeWindow.active)" /> |
| |
| </body> |
| |
| </TestCase> |
| <TestCase testID="Window_properties_new_window_focus" keywords="[Window, properties, newWindow, focus]"> |
| |
| <setup> |
| |
| <RunCode code="application.resetWindow()"/> |
| |
| <SetProperty propertyName="title" value="Hello World!" target="aw"/> |
| <SetProperty propertyName="systemChrome" value="standard" target="aw"/> |
| |
| <RunCode code="application.aw.open()" waitEvent="windowComplete" waitTarget="aw"/> |
| |
| </setup> |
| |
| <body> |
| <AssertMethodValue value="true" method="value=String(application.aw.nativeWindow.active)" /> |
| |
| </body> |
| |
| </TestCase> |
| |
| </testCases> |
| |
| </UnitTester> |