| <?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 xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" testDir="Managers/StyleManager/Versioning/" testSWF="MP_SimpleLoader.mxml"> |
| |
| <mx:Script> |
| <![CDATA[ |
| |
| public static function init(o:DisplayObject):void |
| { |
| |
| } |
| |
| public function cleanUpPopUps(): void |
| { |
| if(application.parent.numChildren > 1) |
| { |
| var popups:int = application.parent.popUpChildren.numChildren; |
| if(popups > 0) |
| { |
| for (var i:int=0; i<popups; i++) |
| { |
| application.parent.removeChild(application.parent.popUpChildren.getChildAt(i)); |
| } |
| } |
| } |
| } |
| ]]> |
| </mx:Script> |
| |
| <mx:Metadata> |
| <![CDATA[ |
| [Mixin] |
| ]]> |
| </mx:Metadata> |
| |
| <testCases> |
| <TestCase testID="MP_RuntimeCSS_ClassSelector_png_trusted" description="Test that a class selector using a png works in a trusted child app." keywords="[Runtime CSS, Marshall Plan, Class Selector]"> |
| <setup> |
| <ResetComponent target="control1" className="mx.controls.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../../Assets/Images/redrect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="false" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="assets/MP_customStyles_embeddedImages.swf?port={portNumber}" waitTarget="swf1" waitEvent="updateComplete"/> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="applicationComplete"/> |
| <!--AssertEvent eventName="updateComplete" eventClass="mx.events::FlexEvent" target="swf1.content.document.acb" /--> |
| <Pause timeout="400" /> |
| <CompareBitmap target="swf1.content.document.acb" url="../Versioning/baselines/mp_classSelector_png.png" timeout="2500" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MP_RuntimeCSS_TypeSelector_png_trusted" description="Test that a type selector using a png works in a trusted child app." keywords="[Runtime CSS, Marshall Plan, Type Selector]"> |
| <setup> |
| <ResetComponent target="control1" className="mx.controls.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../../Assets/Images/redrect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="false" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="assets/MP_customStyles_embeddedImages.swf?port={portNumber}" waitTarget="swf1" waitEvent="updateComplete"/> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="applicationComplete"/> |
| <!--AssertEvent eventName="updateComplete" eventClass="mx.events::FlexEvent" target="swf1.content.document.acb2" /--> |
| <Pause timeout="400" /> |
| <CompareBitmap target="swf1.content.document.acb2" url="../Versioning/baselines/mp_typeSelector_png_trusted.png" timeout="2500" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MP_RuntimeCSS_ClassSelector_gif_trusted" description="Test that a class selector using a gif works in a trusted child app." keywords="[Runtime CSS, Marshall Plan, Class Selector]"> |
| <setup> |
| <ResetComponent target="control1" className="mx.controls.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../../Assets/Images/redrect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="false" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="assets/MP_customStyles_embeddedImages.swf?port={portNumber}" waitTarget="swf1" waitEvent="updateComplete"/> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="applicationComplete"/> |
| <WaitForEvent eventName="updateComplete" target="swf1.content.document.map1" /> |
| <CompareBitmap target="swf1.content.document.acb3" url="../Versioning/baselines/mp_classSelector_gif.png" timeout="2500" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MP_RuntimeCSS_TypeSelector_gif_trusted" description="Test that a type selector using a gif works in a trusted child app." keywords="[Runtime CSS, Marshall Plan, Type Selector]"> |
| <setup> |
| <ResetComponent target="control1" className="mx.controls.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../../Assets/Images/redrect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="false" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="assets/MP_customStyles_embeddedImages.swf?port={portNumber}" waitTarget="swf1" waitEvent="updateComplete"/> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="applicationComplete"/> |
| <!--AssertEvent eventName="updateComplete" eventClass="mx.events::FlexEvent" target="swf1.content.document.acb4" /--> |
| <Pause timeout="400" /> |
| <CompareBitmap target="swf1.content.document.acb4" url="../Versioning/baselines/mp_typeSelector_gif.png" timeout="2500" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MP_RuntimeCSS_ClassSelector_png_compatible" description="Test that a class selector using a png works in a compatible child app." keywords="[Runtime CSS, Marshall Plan, Class Selector]"> |
| <setup> |
| <ResetComponent target="control1" className="mx.controls.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../../Assets/Images/redrect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="true" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="assets/MP_customStyles_embeddedImages.swf?port={portNumber}" waitTarget="swf1" waitEvent="updateComplete"/> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="applicationComplete"/> |
| <!--AssertEvent eventName="updateComplete" eventClass="mx.events::FlexEvent" target="swf1.content.document.acb" /--> |
| <CompareBitmap target="swf1.content.document.acb" url="../Versioning/baselines/mp_classSelector_png.png" timeout="2500" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MP_RuntimeCSS_TypeSelector_png_compatible" description="Test that a type selector using a png works in a compatible child app." keywords="[Runtime CSS, Marshall Plan, Type Selector]"> |
| <setup> |
| <ResetComponent target="control1" className="mx.controls.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../../Assets/Images/redrect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="true" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="assets/MP_customStyles_embeddedImages.swf?port={portNumber}" waitTarget="swf1" waitEvent="updateComplete"/> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="applicationComplete"/> |
| <!--AssertEvent eventName="updateComplete" eventClass="mx.events::FlexEvent" target="swf1.content.document.acb2" /--> |
| <CompareBitmap target="swf1.content.document.acb2" url="../Versioning/baselines/mp_typeSelector_png.png" timeout="2500" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MP_RuntimeCSS_ClassSelector_gif_compatible" description="Test that a class selector using a gif works in a compatible child app." keywords="[Runtime CSS, Marshall Plan, Class Selector]"> |
| <setup> |
| <ResetComponent target="control1" className="mx.controls.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../../Assets/Images/redrect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="true" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="assets/MP_customStyles_embeddedImages.swf?port={portNumber}" waitTarget="swf1" waitEvent="updateComplete"/> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="applicationComplete"/> |
| <!--AssertEvent eventName="updateComplete" eventClass="mx.events::FlexEvent" target="swf1.content.document.acb3" /--> |
| <CompareBitmap target="swf1.content.document.acb3" url="../Versioning/baselines/mp_classSelector_gif.png" timeout="2500" /> |
| </body> |
| </TestCase> |
| <TestCase testID="MP_RuntimeCSS_TypeSelector_gif_compatible" description="Test that a type selector using a gif works in a compatible child app." keywords="[Runtime CSS, Marshall Plan, Type Selector]"> |
| <setup> |
| <ResetComponent target="control1" className="mx.controls.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../../Assets/Images/redrect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="true" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="assets/MP_customStyles_embeddedImages.swf?port={portNumber}" waitTarget="swf1" waitEvent="updateComplete"/> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="applicationComplete"/> |
| <!--AssertEvent eventName="updateComplete" eventClass="mx.events::FlexEvent" target="swf1.content.document.acb4" /--> |
| <CompareBitmap target="swf1.content.document.acb4" url="../Versioning/baselines/mp_typeSelector_gif.png" timeout="2500" /> |
| </body> |
| </TestCase> |
| |
| <TestCase testID="MP_RuntimeCSS_TypeSelector_png_untrusted" description="Test that a type selector using a png works in a untrusted child app." keywords="[Runtime CSS, Marshall Plan, Type Selector]"> |
| <setup> |
| <ResetComponent target="control1" className="mx.controls.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../../Assets/Images/redrect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="false" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="http://localhost:{portNumber}/Managers/StyleManager/SWFs/assets/MP_customStyles_embeddedImages.swf?port={portNumber}" waitTarget="swf1" waitEvent="updateComplete"/> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <WaitForSandboxApp target="swf1" /> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="added"/> |
| <CompareBitmap target="swf1.content.document.acb2" url="../Versioning/baselines/mp_typeSelector_png.png" timeout="2500" numColorVariances="10" ignoreMaxColorVariance="true" /> |
| </body> |
| </TestCase> |
| <!-- browser or AIR required |
| <TestCase testID="MP_RuntimeCSS_ClassSelector_gif_untrusted" description="Test that a class selector using a gif works in a untrusted child app." keywords="[Runtime CSS, Marshall Plan, Class Selector]"> |
| <setup> |
| <ResetComponent target="control1" className="mx.controls.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../../Assets/Images/redrect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="false" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="http://localhost:{portNumber}/Managers/StyleManager/SWFs/assets/MP_customStyles_embeddedImages.swf?port={portNumber}" waitTarget="swf1" waitEvent="updateComplete"/> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <WaitForSandboxApp target="swf1" /> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="added"/> |
| <WaitForEvent eventName="complete" target="swf1.content.document.acb3.border" /> |
| |
| <CompareBitmap target="swf1.content.document.acb3" url="../Versioning/baselines/mp_classSelector_gif_untrusted.png" timeout="2500" /> |
| </body> |
| </TestCase> |
| --> |
| <TestCase testID="MP_RuntimeCSS_TypeSelector_gif_untrusted" description="Test that a type selector using a gif works in a untrusted child app." keywords="[Runtime CSS, Marshall Plan, Type Selector]"> |
| <setup> |
| <ResetComponent target="control1" className="mx.controls.TextInput" waitTarget="control1" |
| waitEvent="updateComplete" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" /> |
| <SetProperty target="swf1" propertyName="source" value="../../../../Assets/Images/redrect.jpg" waitTarget="swf1" waitEvent="updateComplete"/> |
| <Pause timeout="100" /> |
| <SetProperty target="swf1" propertyName="loadForCompatibility" value="false" /> |
| <SetProperty target="swf1" propertyName="autoLoad" value="false" /> |
| <SetProperty target="swf1" propertyName="source" value="http://localhost:{portNumber}/Managers/StyleManager/SWFs/assets/MP_customStyles_embeddedImages.swf?port={portNumber}" waitTarget="swf1" waitEvent="updateComplete"/> |
| <SetProperty target="swf1" propertyName="autoLoad" value="true" waitTarget="swf1" waitEvent="complete"/> |
| </setup> |
| <body> |
| <WaitForSandboxApp target="swf1" /> |
| <DispatchMouseEvent target="" type="mouseMove" localX="12" localY="55" waitTarget="swf1.content" waitEvent="added"/> |
| <CompareBitmap target="swf1.content.document.acb4" url="../Versioning/baselines/mp_typeSelector_gif.png" timeout="2500" /> |
| </body> |
| </TestCase> |
| </testCases> |
| </UnitTester> |