You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2013/05/15 21:00:34 UTC

[14/17] git commit: [flex-sdk] [refs/heads/develop] - adjust test now that localeChain throws if locale not loaded

adjust test now that localeChain throws if locale not loaded


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/909d8824
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/909d8824
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/909d8824

Branch: refs/heads/develop
Commit: 909d88241b312396f0b870dd8cdbb420d282effe
Parents: 38709d3
Author: Alex Harui <ah...@apache.org>
Authored: Tue May 14 23:41:09 2013 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Wed May 15 11:57:35 2013 -0700

----------------------------------------------------------------------
 .../Methods/RTL_Methods_1Locale_ReadWrite.mxml     |   33 +++++++++++++-
 1 files changed, 30 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/909d8824/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Methods/RTL_Methods_1Locale_ReadWrite.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Methods/RTL_Methods_1Locale_ReadWrite.mxml b/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Methods/RTL_Methods_1Locale_ReadWrite.mxml
index 36361ef..815490c 100644
--- a/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Methods/RTL_Methods_1Locale_ReadWrite.mxml
+++ b/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Methods/RTL_Methods_1Locale_ReadWrite.mxml
@@ -44,6 +44,9 @@
         public var ed1:IEventDispatcher;
         public var ed2:IEventDispatcher;
         public var ed3:IEventDispatcher;
+        public var ed4:IEventDispatcher;
+        public var ed5:IEventDispatcher;
+        public var ed6:IEventDispatcher;
 
         private function clearAllNonFrenchData():void{            
             
@@ -76,6 +79,21 @@
                     ed3.addEventListener(ResourceEvent.ERROR, handleErrorEvent);
                     ed3.addEventListener(ResourceEvent.COMPLETE, handleCompleteEvent);
                     break;
+                case 4:
+                    ed4 = ResourceManager.getInstance().loadResourceModule('Assets/bundles/custom/resMod_enUS_bundle1_001.swf');
+                    ed4.addEventListener(ResourceEvent.ERROR, handleErrorEvent);
+                    ed4.addEventListener(ResourceEvent.COMPLETE, handleCompleteEvent);
+                    break;
+                case 5:
+                    ed5 = ResourceManager.getInstance().loadResourceModule('Assets/bundles/custom/resMod_enUS_bundle1_002.swf');
+                    ed5.addEventListener(ResourceEvent.ERROR, handleErrorEvent);
+                    ed5.addEventListener(ResourceEvent.COMPLETE, handleCompleteEvent);
+                    break;
+                case 6:
+                    ed6 = ResourceManager.getInstance().loadResourceModule('Assets/bundles/custom/resMod_enUS_bundle1_003.swf');
+                    ed6.addEventListener(ResourceEvent.ERROR, handleErrorEvent);
+                    ed6.addEventListener(ResourceEvent.COMPLETE, handleCompleteEvent);
+                    break;
             }
         }
 
@@ -95,10 +113,13 @@
                 <AssertMethodValue method="value=ResourceManager.getInstance().getLocales()[0]" value="fr_FR" />
                 <AssertMethodValue method="value=ResourceManager.getInstance().localeChain.length" value="1" />
                 <AssertMethodValue method="value=ResourceManager.getInstance().localeChain[0]" value="fr_FR" />
-                <RunCode code="ResourceManager.getInstance().localeChain=['en_US','fr_FR']" /> 
                 <AssertPropertyValue target="lbl1" propertyName="text" value="French View Source" />
             </setup>
             <body>
+                <!-- load a single en_US bundle so we can add en_US to the locale chain -->
+                <RunCode code="setUpEventDispatchers(4)" />
+                <AssertEvent target="script:ed4" eventName="complete" eventClass="mx.events::ResourceEvent" />
+                <RunCode code="ResourceManager.getInstance().localeChain=['en_US','fr_FR']" /> 
                 <RunCode code="setUpEventDispatchers(1)" />
                 <AssertEvent target="script:ed1" eventName="complete" eventClass="mx.events::ResourceEvent" />
                 <AssertPropertyValue target="lbl1" propertyName="text" value="View Source" />
@@ -112,10 +133,13 @@
                 <AssertMethodValue method="value=ResourceManager.getInstance().getLocales()[0]" value="fr_FR" />
                 <AssertMethodValue method="value=ResourceManager.getInstance().localeChain.length" value="1" />
                 <AssertMethodValue method="value=ResourceManager.getInstance().localeChain[0]" value="fr_FR" />
-                <RunCode code="ResourceManager.getInstance().localeChain=['en_US','fr_FR']" /> 
                 <AssertPropertyValue target="lbl1" propertyName="text" value="French View Source" />
             </setup>
             <body>
+                <!-- load a single en_US bundle so we can add en_US to the locale chain -->
+                <RunCode code="setUpEventDispatchers(5)" />
+                <AssertEvent target="script:ed5" eventName="complete" eventClass="mx.events::ResourceEvent" />
+                <RunCode code="ResourceManager.getInstance().localeChain=['en_US','fr_FR']" /> 
                 <RunCode code="setUpEventDispatchers(2)" />
                 <AssertEvent target="script:ed2" eventName="complete" eventClass="mx.events::ResourceEvent" />
                 <AssertPropertyValue target="lbl1" propertyName="text" value="View Source" />
@@ -129,10 +153,13 @@
                 <AssertMethodValue method="value=ResourceManager.getInstance().getLocales()[0]" value="fr_FR" />
                 <AssertMethodValue method="value=ResourceManager.getInstance().localeChain.length" value="1" />
                 <AssertMethodValue method="value=ResourceManager.getInstance().localeChain[0]" value="fr_FR" />
-                <RunCode code="ResourceManager.getInstance().localeChain=['en_US','fr_FR']" /> 
                 <AssertPropertyValue target="lbl1" propertyName="text" value="French View Source" />
             </setup>
             <body>
+                <!-- load a single en_US bundle so we can add en_US to the locale chain -->
+                <RunCode code="setUpEventDispatchers(6)" />
+                <AssertEvent target="script:ed6" eventName="complete" eventClass="mx.events::ResourceEvent" />
+                <RunCode code="ResourceManager.getInstance().localeChain=['en_US','fr_FR']" /> 
                 <RunCode code="setUpEventDispatchers(3)" />
                 <AssertEvent target="script:ed3" eventName="complete" eventClass="mx.events::ResourceEvent" />
                 <AssertPropertyValue target="lbl1" propertyName="text" value="French View Source" />