| <?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="PerModuleStyles/api/" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns="*" testSWF="StyleDeclarationTestApp.mxml"> |
| |
| <!-- this set of lines form a template that must be in each unit test --> |
| <fx:Script> |
| <![CDATA[ |
| public static function init(o:DisplayObject):void |
| { |
| } |
| ]]> |
| </fx:Script> |
| |
| <fx:Metadata> |
| <![CDATA[ |
| [Mixin] |
| ]]> |
| </fx:Metadata> |
| <!-- end of set of lines that must be in each unit test --> |
| |
| <testCases> |
| <TestCase testID="perModuleStyle" keywords="[Styles,Module]" description="Test to make sure getStyleDeclaration return local only styles" > |
| <body> |
| <RunCode code="application.iniit();" waitTarget="mod_loader" waitEvent="ready" /> |
| <Pause timeout="1000" /> |
| |
| <SetProperty target="mod_loader.child.selector" propertyName="text" value="spark.components.List" /> |
| <SetProperty target="mod_loader.child.styleName" propertyName="text" value="color" /> |
| <DispatchMouseClickEvent target="mod_loader.child.localButton" waitEvent="click" waitTarget="mod_loader.child.localButton" /> |
| |
| <AssertPropertyValue target="mod_loader.child.localStyle" propertyName="text" value="16711680" /> |
| |
| <SetProperty target="mod_loader.child.selector" propertyName="text" value="spark.components.List" /> |
| <SetProperty target="mod_loader.child.styleName" propertyName="text" value="borderColor" /> |
| <DispatchMouseClickEvent target="mod_loader.child.localButton" waitEvent="click" waitTarget="mod_loader.child.localButton" /> |
| |
| <AssertPropertyValue target="mod_loader.child.localStyle" propertyName="text" value="" /> |
| |
| <SetProperty target="mod_loader.child.selector" propertyName="text" value="spark.components.List" /> |
| <SetProperty target="mod_loader.child.styleName" propertyName="text" value="fontSize" /> |
| <DispatchMouseClickEvent target="mod_loader.child.localButton" waitEvent="click" waitTarget="mod_loader.child.localButton" /> |
| |
| <AssertPropertyValue target="mod_loader.child.localStyle" propertyName="text" value="" /> |
| |
| <SetProperty target="mod_loader.child.selector" propertyName="text" value="spark.components.List" /> |
| <SetProperty target="mod_loader.child.styleName" propertyName="text" value="fontStyle" /> |
| <DispatchMouseClickEvent target="mod_loader.child.localButton" waitEvent="click" waitTarget="mod_loader.child.localButton" /> |
| |
| <AssertPropertyValue target="mod_loader.child.localStyle" propertyName="text" value="italic" /> |
| |
| <SetProperty target="mod_loader.child.selector" propertyName="text" value="spark.components.List" /> |
| <SetProperty target="mod_loader.child.styleName" propertyName="text" value="color" /> |
| <DispatchMouseClickEvent target="mod_loader.child.mergedButton" waitEvent="click" waitTarget="mod_loader.child.mergedButton" /> |
| |
| <AssertPropertyValue target="mod_loader.child.mergedStyle" propertyName="text" value="16711680" /> |
| |
| <SetProperty target="mod_loader.child.selector" propertyName="text" value="spark.components.List" /> |
| <SetProperty target="mod_loader.child.styleName" propertyName="text" value="borderColor" /> |
| <DispatchMouseClickEvent target="mod_loader.child.mergedButton" waitEvent="click" waitTarget="mod_loader.child.mergedButton" /> |
| |
| <AssertPropertyValue target="mod_loader.child.mergedStyle" propertyName="text" value="255" /> |
| |
| <SetProperty target="mod_loader.child.selector" propertyName="text" value="spark.components.List" /> |
| <SetProperty target="mod_loader.child.styleName" propertyName="text" value="fontSize" /> |
| <DispatchMouseClickEvent target="mod_loader.child.mergedButton" waitEvent="click" waitTarget="mod_loader.child.mergedButton" /> |
| |
| <AssertPropertyValue target="mod_loader.child.mergedStyle" propertyName="text" value="16" /> |
| |
| <SetProperty target="mod_loader.child.selector" propertyName="text" value="spark.components.List" /> |
| <SetProperty target="mod_loader.child.styleName" propertyName="text" value="fontStyle" /> |
| <DispatchMouseClickEvent target="mod_loader.child.mergedButton" waitEvent="click" waitTarget="mod_loader.child.mergedButton" /> |
| |
| <AssertPropertyValue target="mod_loader.child.mergedStyle" propertyName="text" value="italic" /> |
| |
| </body> |
| </TestCase> |
| </testCases> |
| |
| </UnitTester> |