flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r1369982 [10/19] - in /incubator/flex/trunk/mustella/tests/RuntimeLocalization: ./ RTL_HaloSkin/ RTL_HaloSkin/Integration/ RTL_HaloSkin/Integration/Baselines/ RTL_HaloSkin/SWFs/ RTL_HaloSkin/SWFs/Assets/ RTL_HaloSkin/SWFs/Assets/Modules/ RT...
Date Mon, 06 Aug 2012 20:25:38 GMT
Added: incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Integration_Modules.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Integration_Modules.mxml?rev=1369982&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Integration_Modules.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Integration_Modules.mxml
Mon Aug  6 20:25:24 2012
@@ -0,0 +1,254 @@
+<?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="RuntimeLocalization/RTL_SparkSkin/Integration/"  xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*" testSWF="RTL_Modules.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.events.ResourceEvent;
+        import mx.events.ModuleEvent;
+        import mx.resources.ResourceManager;
+        
+        private var monthIndex:int; 
+        private var frMonths:Array = ["fr_January","fr_February","fr_March","fr_April","fr_May","fr_June","fr_July","fr_August","fr_September","fr_October","fr_November","fr_December"];

+        private var enMonths:Array = ["January","February","March","April","May","June","July","August","September","October","November","December"];

+        
+        public var ed1:IEventDispatcher;
+        
+        /*
+        * Reset the localized resources to what they were when the app. started up.
+        * This means locale=en_US, and bundles=styles, containers, skins, effects, and core.
+        * We have to do this because loading a module will contribute its resources to the
+        * ResourceManager, which can taint further tests.
+        */
+        private function clearLocaleData():void{      
+            
+            var bundles:Array;
+            
+            for(var i:int = ResourceManager.getInstance().getLocales().length; i > 0;
--i){
+                if(ResourceManager.getInstance().getLocales()[i-1] != "en_US"){
+                    ResourceManager.getInstance().removeResourceBundlesForLocale(ResourceManager.getInstance().getLocales()[i-1]);
+                }
+                else{
+                    bundles = ResourceManager.getInstance().getBundleNamesForLocale("en_US");
+                    for(var j:int = 0; j < bundles.length; ++j){
+                        if( bundles[j] != "styles" &&
+                            bundles[j] != "containers" &&
+                            bundles[j] != "skins" &&
+                            bundles[j] != "effects" &&
+                            bundles[j] != "core" ){
+                            
+                            ResourceManager.getInstance().removeResourceBundle("en_US", bundles[j]);
+                        }
+                    }
+                }
+            }
+        }
+        
+        /*
+        * We may or may not have something to unload, so we can't blindly call unload() and
wait
+        * for an unload event.
+        */
+        private function handleUnload():void{
+            if(application.ml.child != null){
+                application.ml.unloadModule();            
+            }
+            else{
+                application.ml.dispatchEvent(new ModuleEvent("unload"));
+            }                
+        }
+        
+        // Event handlers
+        private function handleResourceErrorEvent(e:ResourceEvent):void{trace("Resource Error
Event: " + e.toString())}
+        private function handleResourceProgressEvent(e:ResourceEvent):void{trace("Resource
Progress Event: " + e.toString())}
+        private function handleResourceCompleteEvent(e:ResourceEvent):void{trace("Resource
Complete Event: " + e.toString())}
+        private function handleModuleErrorEvent(e:ModuleEvent):void{trace("Module Error Event:
" + e.toString())}
+        private function handleModuleProgressEvent(e:ModuleEvent):void{trace("Module Progress
Event: " + e.toString())}
+        private function handleModuleReadyEvent(e:ModuleEvent):void{trace("Module Ready Event:
" + e.toString())}
+        private function handleModuleUnloadEvent(e:ModuleEvent):void{trace("Module Unload
Event: " + e.toString())}    
+    
+    ]]></mx:Script> 
+
+<!-- 
+======================================================== 
+Notes: 
+It seems that a ModuleLoader automatically
+unloads a previously loaded module when you load a new
+one.  
+ModuleLoader does not let you reload a module.
+Start every test with a call to unloadModule() to be sure
+we can reload the module.
+======================================================== 
+--> 
+ 
+    <testCases> 
+
+<!-- 
+======================================================== 
+Parent: en_US
+Module: en_US
+Should work fine.
+======================================================== 
+-->     
+       <TestCase frequency="all" testID="RTL_Integration_FrameworkModule_ParentChildSameLocale"
description="Testing loading a module containing a framework component, when the parent and
module were compiled using the same locale." keywords="[Runtime Localization,Module,ModuleLoader]"
>
+            <setup>
+                <RunCode code="handleUnload()" />
+                <AssertEvent target="ml" eventName="unload" eventClass="mx.events::ModuleEvent"
/>
+				<RunCode code="trace('1a')" />
+                <RunCode code="clearLocaleData()" />
+				<RunCode code="trace('2a')" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('en_US').length"
value="5" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().length"
value="1" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales()[0]"
value="en_US" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().localeChain.length"
value="1" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().localeChain[0]"
value="en_US" />
+            </setup>
+            <body>
+                <SetProperty target="ml" propertyName="url" value="Assets/Modules/module_framework_enUS.swf"
/>
+				<RunCode code="trace('3a')" />
+                <RunCode code="application.ml.addEventListener(ModuleEvent.READY, handleModuleReadyEvent)"
/>
+                <RunCode code="application.ml.addEventListener(ModuleEvent.ERROR, handleModuleErrorEvent)"
/>
+				<RunCode code="trace('4a')" />
+                <AssertMethodValue method="value=application.ml.loadModule()" valueExpression="value=null"
/>
+				<AssertEvent target="ml" eventName="ready" eventClass="mx.events::ModuleEvent" />
+				<AssertEvent target="ml.child.dc1" eventName="updateComplete" eventClass="mx.events::FlexEvent"
/>
+                <AssertPropertyValue target="ml.child.dc1.mx_internal:monthDisplay" propertyName="text"
valueExpression="value=enMonths[application.ml.child.dc1.displayedMonth]" />
+            </body>
+        </TestCase>
+
+       <TestCase frequency="all" testID="RTL_Integration_NonFrameworkModule_ParentChildSameLocale"
description="Testing loading a module containing a nonframework component, when the parent
and module were compiled using the same locale." keywords="[Runtime Localization,Module,ModuleLoader]"
>
+            <setup>
+                <RunCode code="handleUnload()" />
+                <AssertEvent target="ml" eventName="unload" eventClass="mx.events::ModuleEvent"
/>
+				<RunCode code="trace('1b')" />
+                <RunCode code="clearLocaleData()" />
+				<RunCode code="trace('2b')" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('en_US').length"
value="5" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().length"
value="1" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales()[0]"
value="en_US" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().localeChain.length"
value="1" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().localeChain[0]"
value="en_US" />
+            </setup>
+            <body>
+                <SetProperty target="ml" propertyName="url" value="Assets/Modules/module_nonframework_enUS.swf"
/>
+				<RunCode code="trace('3b')" />
+                <RunCode code="application.ml.addEventListener(ModuleEvent.READY, handleModuleReadyEvent)"
/>
+                <RunCode code="application.ml.addEventListener(ModuleEvent.ERROR, handleModuleErrorEvent)"
/>
+                <AssertMethodValue method="value=application.ml.loadModule()" valueExpression="value=null"
/>
+                <AssertEvent target="ml" eventName="ready" eventClass="mx.events::ModuleEvent"
/>
+                <AssertEvent target="ml.child.lbl1" eventName="updateComplete" eventClass="mx.events::FlexEvent"
/>
+				<RunCode code="trace('4b')" />
+                <AssertPropertyValue target="ml.child.lbl1" propertyName="text" value="Shut
down" />
+            </body>
+        </TestCase>
+
+<!-- 
+======================================================== 
+Parent: en_US
+Module: ja_JP
+Should fail because the en_US resources for the control
+in the module are not present anywhere.
+Not testing for now.  We cannot catch this RTE unless
+we write a custom component, since the RTE occurs
+as the component is loading.  It is a lower priority
+to test this when we know it is the wrong thing to do.
+======================================================== 
+--> 
+
+<!-- 
+======================================================== 
+Parent: en_US, and using loadResourceModule() to load
+additional resources which the module will need.
+Module: ja_JP
+Should pass because we are loading the necessary
+localization resources first.
+======================================================== 
+--> 
+       
+       <TestCase frequency="all" testID="RTL_Integration_FrameworkModule_ParentLoadsNecessaryResources"
description="Testing loading a module containing a framework component, when the parent and
module were compiled using different locales, and the parent late-loads the resources the
module needs." keywords="[Runtime Localization,Module,ModuleLoader]" >
+            <setup>
+                <RunCode code="clearLocaleData()" />
+				<RunCode code="trace('1c')" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('en_US').length"
value="5" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().length"
value="1" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales()[0]"
value="en_US" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().localeChain.length"
value="1" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().localeChain[0]"
value="en_US" />
+            </setup>
+            <body>
+                <RunCode code="ed1=ResourceManager.getInstance().loadResourceModule('Assets/bundles/framework/resMod_framework_enUS_004.swf')"
/>
+                <RunCode code="ed1.addEventListener(ResourceEvent.ERROR, handleResourceErrorEvent)"
/>
+                <RunCode code="ed1.addEventListener(ResourceEvent.COMPLETE, handleResourceCompleteEvent)"
/>
+                <RunCode code="trace('2c')" />
+				<AssertEvent target="script:ed1" eventName="complete" eventClass="mx.events::ResourceEvent"
/>
+                <SetProperty target="ml" propertyName="url" value="Assets/Modules/module_framework_jaJP.swf"
/>
+                <RunCode code="application.ml.addEventListener(ModuleEvent.READY, handleModuleReadyEvent)"
/>
+                <RunCode code="application.ml.addEventListener(ModuleEvent.ERROR, handleModuleErrorEvent)"
/>
+                <RunCode code="trace('3c')" />
+				<AssertMethodValue method="value=application.ml.loadModule()" valueExpression="value=null"
/>
+                <AssertEvent target="ml" eventName="ready" eventClass="mx.events::ModuleEvent"
/>
+                <AssertEvent target="ml.child.dc1" eventName="updateComplete" eventClass="mx.events::FlexEvent"
/>
+                <RunCode code="trace('4c')" />
+				<AssertPropertyValue target="ml.child.dc1.mx_internal:monthDisplay" propertyName="text"
valueExpression="value=enMonths[application.ml.child.dc1.displayedMonth]" />
+            </body>
+        </TestCase>
+
+        <!-- Exclude this due to bug 204163.  The combination of this test case and the
one above it will cause an RTE to occur. -->
+        <TestCase frequency="all" testID="RTL_Integration_NonFrameworkModule_ParentLoadsNecessaryResources"
description="Testing loading a module containing a framework component, when the parent and
module were compiled using different locales, and the parent late-loads the resources the
module needs." keywords="[Runtime Localization,Module,ModuleLoader]" >
+            <setup>
+                <RunCode code="handleUnload()" />
+                <AssertEvent target="ml" eventName="unload" eventClass="mx.events::ModuleEvent"
/>
+				<RunCode code="trace('1d')" />
+                <RunCode code="clearLocaleData()" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().getBundleNamesForLocale('en_US').length"
value="5" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales().length"
value="1" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().getLocales()[0]"
value="en_US" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().localeChain.length"
value="1" />
+                <AssertMethodValue method="value=ResourceManager.getInstance().localeChain[0]"
value="en_US" />
+            </setup>
+            <body>
+                <RunCode code="trace('2d')" />
+				<RunCode code="ed1=ResourceManager.getInstance().loadResourceModule('Assets/bundles/custom/resMod_enUS_bundle1_010.swf')"
/>
+                <RunCode code="ed1.addEventListener(ResourceEvent.ERROR, handleResourceErrorEvent)"
/>
+                <RunCode code="ed1.addEventListener(ResourceEvent.COMPLETE, handleResourceCompleteEvent)"
/>
+                <AssertEvent target="script:ed1" eventName="complete" eventClass="mx.events::ResourceEvent"
/>
+				<RunCode code="trace('3d')" />
+                <SetProperty target="ml" propertyName="url" value="Assets/Modules/module_nonframework_jaJP.swf"
/>
+                <RunCode code="application.ml.addEventListener(ModuleEvent.READY, handleModuleReadyEvent)"
/>
+                <RunCode code="application.ml.addEventListener(ModuleEvent.ERROR, handleModuleErrorEvent)"
/>
+                <AssertMethodValue method="value=application.ml.loadModule()" valueExpression="value=null"
/>
+                <AssertEvent target="ml" eventName="ready" eventClass="mx.events::ModuleEvent"
/>
+                <AssertEvent target="ml.child.lbl1" eventName="updateComplete" eventClass="mx.events::FlexEvent"
/>
+                <RunCode code="trace('4d')" />
+				<AssertPropertyValue target="ml.child.lbl1" propertyName="text" value="Shut down"
/>
+            </body>
+        </TestCase>
+    </testCases> 
+</UnitTester> 
+

Added: incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Integration_ResourceBundleMetadata_1Locale.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Integration_ResourceBundleMetadata_1Locale.mxml?rev=1369982&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Integration_ResourceBundleMetadata_1Locale.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Integration_ResourceBundleMetadata_1Locale.mxml
Mon Aug  6 20:25:24 2012
@@ -0,0 +1,274 @@
+<?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="RuntimeLocalization/RTL_SparkSkin/Integration/"  xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="*" testSWF="RTL_ResourceBundleMetadata_frFR_Read.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.controls.sliderClasses.SliderDataTip;
+        import mx.managers.SystemManager;
+
+        private var monthIndex:int;
+        private var frMonths:Array = ["fr_January","fr_February","fr_March","fr_April","fr_May","fr_June","fr_July","fr_August","fr_September","fr_October","fr_November","fr_December"];
+    ]]></mx:Script>
+
+    <testCases>
+
+<!-- 
+======================================================== 
+The associated swf launches in the fr_FR locale. 
+======================================================== 
+--> 
+    
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_String_Framework_Property_en"
description="Test that resourceManager.getXX() can be used to specify a framework resource
as a String in a property." keywords="[Runtime Localization,ResourceBundleMetadata,String,Property]"
> 
+            <setup>
+                <ResetComponent target="lbl1" className="Components.CLabelTextGetStringFramework"
waitEvent="updateComplete" />
+            </setup>
+            <body> 
+                <AssertPropertyValue target="lbl1" propertyName="text" value="French View
Source" />              
+            </body> 
+        </TestCase> 
+ 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_String_Bundle1_Property_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a String in a property." keywords="[Runtime Localization,ResourceBundleMetadata,String,Property]"
> 
+            <setup>
+                <ResetComponent target="lbl2" className="Components.CLabelTextGetStringCustom"
waitEvent="updateComplete" />
+            </setup>
+            <body> 
+                <AssertPropertyValue target="lbl2" propertyName="text" value="Vérifiez
les mises à jour" />                 
+            </body> 
+        </TestCase> 
+ 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Number_Bundle1_Property_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a Number in a property." keywords="[Runtime Localization,ResourceBundleMetadata,Number]" >

+            <setup>
+                <ResetComponent target="ti1" className="Components.CTextInputAlphaGetNumber"
waitEvent="updateComplete" />
+            </setup>
+            <body> 
+                <AssertPixelValue target="ti1" x="10" y="10" value="0x4BAB4B" />  
              
+            </body> 
+        </TestCase> 
+ 
+        <!-- Don't test that maxChars works...just check the property. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Int_Bundle1_Property_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
an int in a property." keywords="[Runtime Localization,ResourceBundleMetadata,int]" > 
+            <setup>
+                <ResetComponent target="ti2" className="Components.CTextInputMaxCharsGetInt"
waitEvent="updateComplete" />
+            </setup>
+            <body> 
+                <AssertPropertyValue target="ti2" propertyName="maxChars" value="7" />
                
+            </body> 
+        </TestCase> 
+ 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Uint_Bundle1_Property_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a uint in a property." keywords="[Runtime Localization,ResourceBundleMetadata,uint]" >

+            <setup>
+                <ResetComponent target="cp1" className="Components.CColorPickerSelectedColorGetUint"
waitEvent="updateComplete" />
+            </setup>
+            <body> 
+                <AssertPixelValue target="cp1" x="10" y="10" value="0x0000FF" />  
              
+            </body> 
+        </TestCase> 
+ 
+        <!-- This checks a horizontal line through the checkbox, where the checkmark should
not be. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Boolean_Bundle1_Property_False_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a Boolean in a property." keywords="[Runtime Localization,ResourceBundleMetadata,Boolean]"
> 
+            <setup>
+                <ResetComponent target="ck1" className="Components.CCheckBoxSelectedGetBooleanLeft"
waitEvent="updateComplete" />
+                <DispatchMouseEvent target="ck1" localX="10" localY="10" type="rollOver"
waitEvent="updateComplete" />
+            </setup>
+            <body> 
+                <CompareBitmap target="ck1" url="../Integration/Baselines/$testID.png"
 />
+            </body> 
+        </TestCase> 
+ 
+        <!-- This checks a horizontal line through the checkbox, where the checkmark should
be. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Boolean_Bundle1_Property_True_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a Boolean in a property." keywords="[Runtime Localization,ResourceBundleMetadata,Boolean]"
> 
+            <setup>
+                <ResetComponent target="ck2" className="Components.CCheckBoxSelectedGetBooleanRight"
waitEvent="updateComplete" />
+                <DispatchMouseEvent target="ck2" localX="10" localY="10" type="rollOver"
waitEvent="updateComplete" />
+            </setup> 
+            <body> 
+                <CompareBitmap target="ck2" url="../Integration/Baselines/$testID.png"
 />
+            </body> 
+        </TestCase> 
+ 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_StringArray_Bundle1_Property_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a StringArray in a property." keywords="[Runtime Localization,ResourceBundleMetadata,StringArray]"
> 
+            <setup>
+                <ResetComponent target="dc1" className="Components.CDateChooserMonthNamesGetStringArray"
waitEvent="updateComplete" />
+                <SetProperty target="dc1" propertyName="displayedMonth" valueExpression="value
= monthIndex = (application.dc1.displayedMonth == 11 ? 0 : application.dc1.displayedMonth
+ 1);" waitEvent="updateComplete" waitTarget="dc1" />
+            </setup> 
+            <body> 
+                <AssertPropertyValue target="dc1.mx_internal:monthDisplay" propertyName="text"
valueExpression="value=frMonths[monthIndex]" />                 
+            </body> 
+        </TestCase> 
+ 
+        <!-- This checks a horizontal line through the French flag image. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Class_Bundle1_Property_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a Class in a property." keywords="[Runtime Localization,ResourceBundleMetadata,Class]" >

+            <setup>
+                <ResetComponent target="img1" className="Components.CImageSourceGetClass"
waitEvent="updateComplete" />
+            </setup>
+            <body>
+                <AssertPixelValue target="img1" x="14" y="25" value="0x000063" />
+                <AssertPixelValue target="img1" x="15" y="25" value="0x000063" />
+                <AssertPixelValue target="img1" x="17" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="18" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="19" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="20" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="21" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="22" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="23" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="24" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="25" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="26" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="27" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="28" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="29" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="30" y="25" value="0xFFFFFF" />
+                <AssertPixelValue target="img1" x="32" y="25" value="0xD60818" />
+                <AssertPixelValue target="img1" x="33" y="25" value="0xD60818" />
+                <AssertPixelValue target="img1" x="34" y="25" value="0xD60818" /> 
              
+            </body> 
+        </TestCase> 
+         
+        <!-- Just check the style. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_String_Bundle1_Style_fr_1"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a String in a style." keywords="[Runtime Localization,ResourceBundleMetadata,String,Style]"
> 
+            <setup>
+                <ResetComponent target="lbl3" className="Components.CLabelFontStyleGetStringLeft"
waitEvent="updateComplete" />
+           </setup>
+           <body>
+               <AssertStyleValue target="lbl3" styleName="fontStyle" value="normal" />
     
+           </body>
+        </TestCase> 
+
+        <!-- Just check the style. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_String_Bundle1_Style_fr_2"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a String in a style." keywords="[Runtime Localization,ResourceBundleMetadata,String,Style]"
> 
+            <setup>
+                <ResetComponent target="lbl4" className="Components.CLabelFontStyleGetStringRight"
waitEvent="updateComplete" />
+           </setup>
+           <body>
+               <AssertStyleValue target="lbl4" styleName="fontStyle" value="italic" />
              
+           </body>
+        </TestCase> 
+ 
+        <!-- Just check the style. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Number_Bundle1_Style_fr_1"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a Number in a style." keywords="[Runtime Localization,ResourceBundleMetadata,Number,Style]"
> 
+            <setup>
+                <ResetComponent target="lbl5" className="Components.CLabelFontSizeGetNumberLeft"
waitEvent="updateComplete" />
+           </setup>
+            <body>
+                <AssertStyleValue target="lbl5" styleName="fontSize" value="12" />
              
+            </body>         
+    </TestCase> 
+
+        <!-- Just check the style. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Number_Bundle1_Style_fr_2"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a Number in a style." keywords="[Runtime Localization,ResourceBundleMetadata,Number,Style]"
> 
+            <setup>
+                <ResetComponent target="lbl6" className="Components.CLabelFontSizeGetNumberRight"
waitEvent="updateComplete" />
+           </setup>
+            <body>
+                <AssertStyleValue target="lbl6" styleName="fontSize" value="3" /> 
              
+            </body>         
+    </TestCase> 
+ 
+        <!-- Check the precision of the HSlider. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Int_Bundle1_Style_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
an Int in a style." keywords="[Runtime Localization,ResourceBundleMetadata,Int,Style]" >

+            <setup>
+                <ResetComponent target="slider1" className="Components.CSliderPrecisionGetInt"
waitEvent="updateComplete" />
+            </setup>
+            <body>
+                <DispatchMouseEvent type="mouseDown" target="slider1" localX="50" localY="15"
/>
+                <WaitForEffectsToEnd />
+                <DispatchMouseEvent type="mouseDown" target="slider1" localX="50" localY="15"
/>
+                <WaitForEffectsToEnd />
+                <AssertMethodValue method="value=SliderDataTip(application.systemManager.toolTipChildren.getChildAt(0)).text"
valueExpression="value='1,000'" />
+            </body>
+            <cleanup>
+                <DispatchMouseEvent type="mouseUp" target="slider1" localX="50" localY="15"
/>
+                <WaitForEffectsToEnd />            
+            </cleanup>
+        </TestCase> 
+ 
+        <!-- Check the vertical line of the letter R and make sure it's red.. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Number_Bundle1_Style_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a Number in a style." keywords="[Runtime Localization,ResourceBundleMetadata,Number,Style]"
> 
+            <setup>
+                <ResetComponent target="lbl7" className="Components.CLabelColorGetUint"
waitEvent="updateComplete" />
+            </setup>
+            <body> 
+                <CompareBitmap target="lbl7" url="../Integration/Baselines/$testID.png"
/>
+            </body> 
+        </TestCase> 
+ 
+         <!-- Left's lineThrough is false, right's lineThrough is true, for French. -->
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Boolean_Bundle1_Style_fr_1"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a Boolean in a style." keywords="[Runtime Localization,ResourceBundleMetadata,Boolean,Style]"
> 
+            <setup> 
+                <ResetComponent target="btn1" className="Components.CFxButtonLineThroughGetBooleanLeft"
waitEvent="updateComplete" />
+           </setup>
+           <body> 
+               <CompareBitmap target="btn1" url="../Integration/Baselines/$testID.png"
/>
+           </body> 
+        </TestCase> 
+ 
+        <!-- Left's lineThrough is false, right's lineThrough is true, for French. -->
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Boolean_Bundle1_Style_fr_2"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a Boolean in a style." keywords="[Runtime Localization,ResourceBundleMetadata,Boolean,Style]"
> 
+            <setup> 
+                <ResetComponent target="btn2" className="Components.CFxButtonLineThroughGetBooleanRight"
waitEvent="updateComplete" />
+           </setup>
+           <body> 
+               <CompareBitmap target="btn2" url="../Integration/Baselines/$testID.png"
/>
+           </body> 
+        </TestCase> 
+
+        <!-- Check that alternatingColors are green and blue. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_StringArray_Bundle1_Style_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a StringArray in a style." keywords="[Runtime Localization,ResourceBundleMetadata,StringArray,Style]"
> 
+            <setup>
+                <ResetComponent target="list1" className="Components.CListAlternatingColorsGetStringArray"
waitEvent="updateComplete" />
+            </setup> 
+            <body> 
+                <CompareBitmap target="list1" url="../Integration/Baselines/$testID.png"
numColorVariances="20" maxColorVariance="20" />
+            </body> 
+        </TestCase> 
+ 
+        <!-- French flag. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Class_Embed_Bundle1_Style_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a Class in a style, using Embed." keywords="[Runtime Localization,ResourceBundleMetadata,Class,Style,Embed]"
> 
+            <setup>
+                <ResetComponent target="btn3" className="Components.CButtonOverSkinGetClass"
waitEvent="updateComplete" />
+            </setup>
+            <body> 
+                <CompareBitmap target="btn3" url="../Integration/Baselines/$testID.png"
/>
+            </body> 
+        </TestCase> 
+ 
+        <!-- Verify the backwards checkmark by examining a line across the upper half
of the check box.  The tail of the check should be on the left. --> 
+        <TestCase frequency="all" testID="RTL_ResourceBundleMetadata_Class_ClassReference_Bundle1_Style_fr"
description="Test that resourceManager.getXX() can be used to specify a custom resource as
a Class in a style, using ClassReference." keywords="[Runtime Localization,ResourceBundleMetadata,Class,Style,ClassReference]"
> 
+            <setup>
+                <ResetComponent target="ck3" className="Components.CCheckBoxSelectedIconsGetClass"
waitEvent="updateComplete" />
+                <DispatchMouseEvent target="ck3" localX="10" localY="10" type="rollOver"
waitEvent="updateComplete" />
+            </setup> 
+            <body> 
+                <CompareBitmap target="ck3" url="../Integration/Baselines/$testID.png"
 />
+            </body> 
+        </TestCase> 
+
+    </testCases>
+</UnitTester>



Mime
View raw message