You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2012/08/06 22:41:58 UTC
svn commit: r1369996 [1/3] - in
/incubator/flex/trunk/mustella/tests/SparkModules: ./ Constraints/
Constraints/Properties/ Constraints/Properties/baselines/ Constraints/SWFs/
Constraints/SWFs/assets/ Events/ Events/SWFs/ Events/SWFs/assets/
Events/test...
Author: pent
Date: Mon Aug 6 20:41:55 2012
New Revision: 1369996
URL: http://svn.apache.org/viewvc?rev=1369996&view=rev
Log:
Mustella submission
Added:
incubator/flex/trunk/mustella/tests/SparkModules/
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester000.mxml
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester001.mxml
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester002.mxml
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/EmptyModuleTest001.png (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/FixedHLayoutModule000.png (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/MixedLayoutModule000.png (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/EmptyModuleLoader.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/FixedHLayoutModuleLoader.mxml
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/MixedLayoutModuleLoader.mxml
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/EmptyModuleComp.mxml
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/FixedHLayoutModuleComp.mxml
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/MixedLayoutModuleComp.mxml
incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/pre_compile.sh (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Events/
incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/
incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/EventModuleLoader.mxml
incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/
incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/CoverageDataModule.as
incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/ErrorModuleComp.mxml
incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/SimpleModuleComp.mxml
incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/bulletCheck.png (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/pre_compile.sh (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Events/tests/
incubator/flex/trunk/mustella/tests/SparkModules/Events/tests/Module_tester000.mxml
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/TLFAppUsingFontFromModule.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/TLFFontsApp.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/TLFEmbedTestFontModule.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/TLFEmbedTestModule.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/pre_compile.sh (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/fontsEmbedInSparkModule_after.png (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/fontsEmbedInSparkModule_before.png (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/useFontFromModule000_after.png (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/useFontFromModule000_before.png (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/switchFonts.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/useFonts.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/Integration/
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/Integration/baselines/
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/Integration/baselines/modulesRSL001_comboModule.png (with props)
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/Integration/checkModules.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/MainApp.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/assets/
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/assets/AnotherDataGridModule-config.xml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/assets/AnotherDataGridModule.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/assets/ComboModule-config.xml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/assets/ComboModule.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/assets/DataGridModule-config.xml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/assets/DataGridModule.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/pre_compile.sh (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/Integration/
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/Integration/subModules_tester001.mxml
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/Integration/subModules_tester002.mxml
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/Integration/subModules_tester003.mxml
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/SubModuleTest_basic1.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/SubModuleTest_basic2.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/SubModuleTest_basic3.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/Module1.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/Module2.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/Module3.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/Module4.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/Module5.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/Module6.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/ModuleLoadSubApp2.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/ModuleLoadSubApp3.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/SimpleASModuleTest.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/SimpleModule.as (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/SimpleModuleWithLabel.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/SimpleTitleWindow.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/SubApp1.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/SubApp2.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/SubApp3.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/SubApp4.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/assets/TitleWindowModule.mxml (with props)
incubator/flex/trunk/mustella/tests/SparkModules/SubModules/SWFs/pre_compile.sh (with props)
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester000.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester000.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester000.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester000.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,49 @@
+<?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="SparkModules/Constraints/Properties/"
+ xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns="*"
+ testSWF="EmptyModuleLoader.mxml">
+ <fx:Script>
+ <![CDATA[
+ import mx.core.FlexGlobals;
+ public static function init(o:DisplayObject):void
+ {
+ }
+ ]]>
+ </fx:Script>
+ <fx:Metadata>
+ <![CDATA[
+ [Mixin]
+ ]]>
+ </fx:Metadata>
+ <testCases>
+ <!-- Preferred Size Module Tests (with fixed size columns and rows) -->
+ <TestCase testID="EmptyModuleTest001" keywords="[layout, SparkModule]" description="">
+ <setup>
+ <RunCode code="FlexGlobals.topLevelApplication.resetModuleLoader()" />
+ </setup>
+ <body>
+ <DispatchMouseClickEvent target="btn1" waitEvent="moduleLoaded" waitTarget="" />
+ <CompareBitmap url="../Properties/baselines/$testID.png" target="mainModule" />
+ <RunCode code="FlexGlobals.topLevelApplication.doUnloadModule()"/>
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester001.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester001.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester001.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester001.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,49 @@
+<?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="SparkModules/Constraints/Properties/"
+ xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns="*" testSWF="FixedHLayoutModuleLoader.mxml">
+ <fx:Script>
+ <![CDATA[
+ import mx.core.FlexGlobals;
+ public static function init(o:DisplayObject):void
+ {}
+ ]]>
+ </fx:Script>
+
+ <fx:Metadata>
+ <![CDATA[
+ [Mixin]
+ ]]>
+ </fx:Metadata>
+
+ <testCases>
+ <!-- Preferred Size Module Tests (with fixed size columns and rows) -->
+ <TestCase testID="FixedHLayoutModule000" keywords="[layout, SparkModule]" description="">
+ <setup>
+ <RunCode code="FlexGlobals.topLevelApplication.resetModuleLoader()" />
+ </setup>
+ <body>
+ <DispatchMouseClickEvent target="btn1" waitEvent="moduleLoaded" waitTarget="" />
+ <CompareBitmap url="../Properties/baselines/$testID.png" target="mainModule" />
+ <RunCode code="FlexGlobals.topLevelApplication.doUnloadModule()"/>
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester002.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester002.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester002.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/Module_tester002.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,48 @@
+<?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="SparkModules/Constraints/Properties/"
+ xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns="*" testSWF="MixedLayoutModuleLoader.mxml">
+ <fx:Script>
+ <![CDATA[
+ import mx.core.FlexGlobals;
+ public static function init(o:DisplayObject):void
+ {}
+ ]]>
+ </fx:Script>
+
+ <fx:Metadata>
+ <![CDATA[
+ [Mixin]
+ ]]>
+ </fx:Metadata>
+
+ <testCases>
+ <!-- Mixed H and V layouts -->
+ <TestCase testID="MixedLayoutModule000" keywords="[layout, SparkModule]" description="">
+ <setup>
+ <Pause timeout="1000"/>
+ </setup>
+ <body>
+ <CompareBitmap url="../Properties/baselines/$testID.png" target="mainModule" />
+ <RunCode code="FlexGlobals.topLevelApplication.doUnloadModule()"/>
+ </body>
+ </TestCase>
+ </testCases>
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/EmptyModuleTest001.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/EmptyModuleTest001.png?rev=1369996&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/EmptyModuleTest001.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/FixedHLayoutModule000.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/FixedHLayoutModule000.png?rev=1369996&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/FixedHLayoutModule000.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/MixedLayoutModule000.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/MixedLayoutModule000.png?rev=1369996&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/Properties/baselines/MixedLayoutModule000.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/EmptyModuleLoader.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/EmptyModuleLoader.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/EmptyModuleLoader.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/EmptyModuleLoader.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,77 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ creationComplete="init()"
+ minWidth="955" minHeight="600">
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.FlexEvent;
+ import mx.events.ModuleEvent;
+ import mx.managers.PopUpManager;
+
+ import spark.modules.Module;
+ import spark.modules.ModuleLoader;
+
+ private function init():void
+ {
+ setModuleLoaderListeners();
+ }
+ public function setModuleLoaderListeners():void
+ {
+ mainModule.addEventListener(ModuleEvent.READY,readyModuleEventHandler);
+
+ }
+ public function resetModuleLoader():void
+ {
+
+ setModuleLoaderListeners();
+ }
+ public function readyModuleEventHandler(e:ModuleEvent):void
+ {
+ e.currentTarget.removeEventListener(ModuleEvent.READY, readyModuleEventHandler);
+ trace("READY");
+ dispatchEvent(new FlexEvent("moduleLoaded"));
+ }
+ private function loadModule(ml:ModuleLoader, moduleURL:String):void
+ {
+ trace(ml.url + "url**************");
+ if (ml.url==null)
+ ml.url = moduleURL;
+ else ml.loadModule();
+ }
+ public function doUnloadModule():void
+ {
+ trace("doUnloadModule");
+ mainModule.unloadModule();
+ mainModule.url=null;
+ }
+ ]]>
+ </fx:Script>
+ <fx:Style source="../../../../Assets/Fonts/myStyles.css" />
+
+ <s:Button id="btn1" label="load Module1" click="loadModule(mainModule,'assets/EmptyModuleComp.swf')" />
+ <s:ModuleLoader id="mainModule" />
+</s:Application>
\ No newline at end of file
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/EmptyModuleLoader.mxml
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/FixedHLayoutModuleLoader.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/FixedHLayoutModuleLoader.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/FixedHLayoutModuleLoader.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/FixedHLayoutModuleLoader.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,77 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ creationComplete="init()"
+ minWidth="955" minHeight="600">
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.FlexEvent;
+ import mx.events.ModuleEvent;
+ import mx.managers.PopUpManager;
+
+ import spark.modules.Module;
+ import spark.modules.ModuleLoader;
+
+ private function init():void
+ {
+ setModuleLoaderListeners();
+ }
+ public function setModuleLoaderListeners():void
+ {
+ mainModule.addEventListener(ModuleEvent.READY,readyModuleEventHandler);
+
+ }
+ public function resetModuleLoader():void
+ {
+
+ setModuleLoaderListeners();
+ }
+ public function readyModuleEventHandler(e:ModuleEvent):void
+ {
+ e.currentTarget.removeEventListener(ModuleEvent.READY, readyModuleEventHandler);
+ trace("READY");
+ dispatchEvent(new FlexEvent("moduleLoaded"));
+ }
+ private function loadModule(ml:ModuleLoader, moduleURL:String):void
+ {
+ trace(ml.url + "url**************");
+ if (ml.url==null)
+ ml.url = moduleURL;
+ else ml.loadModule();
+ }
+ public function doUnloadModule():void
+ {
+ trace("doUnloadModule");
+ mainModule.unloadModule();
+ mainModule.url=null;
+ }
+ ]]>
+ </fx:Script>
+ <fx:Style source="../../../../Assets/Fonts/myStyles.css" />
+
+ <s:Button id="btn1" label="load Module1" click="loadModule(mainModule,'assets/FixedHLayoutModuleComp.swf')" />
+ <s:ModuleLoader id="mainModule" />
+</s:Application>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/MixedLayoutModuleLoader.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/MixedLayoutModuleLoader.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/MixedLayoutModuleLoader.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/MixedLayoutModuleLoader.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,38 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+ <fx:Style source="../../../../Assets/Fonts/myStyles.css" />
+ <fx:Script>
+ <![CDATA[
+ public function doUnloadModule():void
+ {
+ trace("doUnloadModule");
+ mainModule.unloadModule();
+ mainModule.url=null;
+ }
+ ]]>
+ </fx:Script>
+ <s:ModuleLoader id="mainModule" url="assets/MixedLayoutModuleComp.swf"/>
+</s:Application>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/EmptyModuleComp.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/EmptyModuleComp.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/EmptyModuleComp.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/EmptyModuleComp.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+xmlns:s="library://ns.adobe.com/flex/spark"
+xmlns:mx="library://ns.adobe.com/flex/mx" width="300" height="300">
+</s:Module>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/FixedHLayoutModuleComp.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/FixedHLayoutModuleComp.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/FixedHLayoutModuleComp.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/FixedHLayoutModuleComp.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,31 @@
+<?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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="300" minHeight="300">
+ <s:layout>
+ <s:HorizontalLayout/>
+ </s:layout>
+
+ <s:Button label="Button 1"/>
+ <s:Button label="Button 2"/>
+ <s:Button label="Button 3"/>
+ <s:Button label="Button 4"/>
+</s:Module>
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/MixedLayoutModuleComp.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/MixedLayoutModuleComp.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/MixedLayoutModuleComp.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/assets/MixedLayoutModuleComp.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,72 @@
+<?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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="300" minHeight="300">
+ <s:layout>
+ <s:VerticalLayout/>
+ </s:layout>
+
+ <s:SkinnableContainer width="100%" height="100%">
+ <!-- Anchor the top of the form at the top of the canvas.
+ Anchor the form sides 20 pixels from the canvas sides. -->
+ <mx:Form id="myForm"
+ backgroundColor="#DDDDDD"
+ top="0"
+ left="20"
+ right="20">
+
+ <mx:FormItem label="Product:" width="100%">
+ <!-- Specify a fixed width to keep the ComboBox control from
+ resizing as you change the application size. -->
+ <mx:ComboBox width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="User" width="100%">
+ <mx:ComboBox width="200"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Date">
+ <mx:DateField/>
+ </mx:FormItem>
+
+ <mx:FormItem width="100%"
+ direction="horizontal"
+ label="Hours:">
+ <s:TextInput width="75"/>
+ <mx:Label text="Minutes" width="48"/>
+ <s:TextInput width="75"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ <!-- Anchor the box with the buttons 20 pixels from the canvas
+ right edge and 10 pixels from the bottom. -->
+ <s:SkinnableContainer id="okCancelBox"
+ right="20"
+ bottom="10">
+ <s:layout>
+ <s:HorizontalLayout/>
+ </s:layout>
+ <s:Button label="OK"/>
+ <s:Button label="Cancel"/>
+ </s:SkinnableContainer>
+ </s:SkinnableContainer>
+
+</s:Module>
Added: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/pre_compile.sh
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/pre_compile.sh?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/pre_compile.sh (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/pre_compile.sh Mon Aug 6 20:41:55 2012
@@ -0,0 +1,27 @@
+#!/bin/sh
+################################################################################
+##
+## 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.
+##
+################################################################################
+echo `pwd`
+cd ./assets
+echo "Removing previously compiled files..."
+rm -f `find . -name "*.swf"`
+echo "Compiling module SWFs..."
+$SDK_DIR/bin/mxmlc EmptyModuleComp.mxml -static-rsls=true
+$SDK_DIR/bin/mxmlc FixedHLayoutModuleComp.mxml -static-rsls=true
+$SDK_DIR/bin/mxmlc MixedLayoutModuleComp.mxml -static-rsls=true
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Constraints/SWFs/pre_compile.sh
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/EventModuleLoader.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/EventModuleLoader.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/EventModuleLoader.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/EventModuleLoader.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,188 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ creationComplete="init()"
+ minWidth="955" minHeight="600">
+ <fx:Style source="../../../../Assets/Fonts/myStyles.css" />
+ <fx:Style>
+ @namespace mx "library://ns.adobe.com/flex/mx";
+ @namespace s "library://ns.adobe.com/flex/spark";
+
+ s|Module,
+ mx|DataGrid{
+ fontFamily: MyVeraHalo;
+ fontLookup: embeddedCFF;
+ fontAntiAliasType: normal;
+ }
+ s|Label,
+ s|TitleWindow{
+ fontFamily: MyVeraSpark;
+ fontLookup: embeddedCFF;
+ fontAntiAliasType: normal;
+ }
+
+
+ </fx:Style>
+ <s:layout> <s:VerticalLayout/> </s:layout>
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayList;
+ import mx.controls.Alert;
+ import mx.controls.Image;
+ import mx.events.FlexEvent;
+ import mx.events.ModuleEvent;
+ import mx.managers.PopUpManager;
+
+ import spark.components.Image;
+ import spark.modules.Module;
+ import spark.modules.ModuleLoader;
+ PopUpManager;
+ public var moduleErrorMsg:String="";
+
+ public var moduleStateError:Boolean=false;
+ public var moduleStateLoading:Boolean=false;
+ public var moduleStateProgress:Boolean=false;
+ public var moduleStateReady:Boolean=false;
+ public var moduleStateSetup:Boolean=false;
+ public var moduleStateUnload:Boolean=false;
+ public var moduleStateUrlChanged:Boolean=false;
+ public var moduleStateIconChanged:Boolean=false;
+ public var img:Class;
+
+ [Embed(source="assets/bulletCheck.png")]
+ private static const ico:Class;
+
+ private var arr:Array = [ { moduleName: "assets/IDoNotExist.swf"},
+ { moduleName: "assets/SimpleModuleComp.swf"},
+ { moduleName: "assets/CoverageDataModule.swf"}
+
+ ];
+
+ private function init():void
+ {
+ dg.dataProvider = new ArrayList(arr);
+ //code coverage
+ var bool:Boolean = moduleLoader1.deferredContentCreated
+
+ setModuleLoaderListeners();
+
+ }
+ public function setModuleLoaderListeners():void
+ {
+ moduleLoader1.addEventListener(Event.CHANGE,propertyChangedModuleEventHandler);
+ moduleLoader1.addEventListener(ModuleEvent.ERROR,errorModuleEventHandler);
+ moduleLoader1.addEventListener(FlexEvent.LOADING,loadingModuleEventHandler);
+ moduleLoader1.addEventListener(ModuleEvent.PROGRESS,progressModuleEventHandler);
+ moduleLoader1.addEventListener(ModuleEvent.READY,readyModuleEventHandler);
+ moduleLoader1.addEventListener(ModuleEvent.SETUP,setupModuleEventHandler);
+ moduleLoader1.addEventListener(ModuleEvent.UNLOAD,unloadModuleEventHandler);
+ moduleLoader1.addEventListener(FlexEvent.URL_CHANGED,urlChangedModuleEventHandler);
+
+ var lbl:String=moduleLoader1.label;
+ moduleLoader1.label="moduleLoader1";
+ }
+
+ private function errorModuleEventHandler(e:ModuleEvent):void
+ {
+ e.currentTarget.removeEventListener(ModuleEvent.ERROR,errorModuleEventHandler);
+ moduleStateError=true;
+ moduleErrorMsg=e.errorText;
+ trace(e.errorText+" : errors");
+ dispatchEvent(new FlexEvent("moduleFailedToLoad"));
+ }
+ private function loadingModuleEventHandler(e:FlexEvent):void
+ {
+ e.currentTarget.removeEventListener(FlexEvent.LOADING,loadingModuleEventHandler);
+ moduleStateLoading=true;
+ trace("LOADING");
+ }
+ private function progressModuleEventHandler(e:ModuleEvent):void
+ {
+ e.currentTarget.removeEventListener(ModuleEvent.PROGRESS,progressModuleEventHandler);
+ moduleStateProgress=true;
+ trace("PROGRESS");
+ }
+ public function readyModuleEventHandler(e:ModuleEvent):void
+ {
+ e.currentTarget.removeEventListener(ModuleEvent.READY, readyModuleEventHandler);
+ moduleStateReady=true;
+ trace("READY");
+ dispatchEvent(new FlexEvent("moduleLoaded"));
+ }
+ public function setupModuleEventHandler(e:ModuleEvent):void
+ {
+ e.currentTarget.removeEventListener(ModuleEvent.SETUP, setupModuleEventHandler);
+ moduleStateSetup=true;
+ trace("SETUP");
+ }
+
+ public function unloadModuleEventHandler(e:ModuleEvent):void
+ {
+ e.currentTarget.removeEventListener(ModuleEvent.UNLOAD, unloadModuleEventHandler);
+ moduleStateUnload=true;
+ trace("UNLOAD");
+ dispatchEvent(new FlexEvent("moduleUnLoaded"));
+ }
+ public function urlChangedModuleEventHandler(e:FlexEvent):void
+ {
+ e.currentTarget.removeEventListener(FlexEvent.URL_CHANGED, urlChangedModuleEventHandler);
+ moduleStateUrlChanged=true;
+ trace("URL_CHANGED");
+ dispatchEvent(new FlexEvent("urlChanged"));
+ }
+ public function propertyChangedModuleEventHandler(e:Event):void
+ {
+ e.currentTarget.removeEventListener(Event.CHANGE, propertyChangedModuleEventHandler);
+ moduleStateIconChanged=true;
+ trace("ICON_CHANGED");
+ }
+ private function loadModule(ml:ModuleLoader, moduleURL:String):void
+ {
+ trace(ml.url + "url**************");
+ if (ml.url==null)
+ ml.url = moduleURL;
+ else ml.loadModule();
+ }
+
+ private function unloadModule(ml:ModuleLoader):void
+ {
+ ml.unloadModule();
+ ml.url=null;
+
+ }
+ public function resetModuleLoader():void
+ {
+
+ setModuleLoaderListeners();
+ }
+
+ ]]>
+ </fx:Script>
+
+ <mx:DataGrid id="dg" />
+ <s:Button id="btn1" label="load Module1" click="loadModule(moduleLoader1,dg.selectedItem.moduleName)" />
+ <s:Button id="btn2" label="unload Module1" click="unloadModule(moduleLoader1);" />
+ <s:Button id="btn3" label="trigger urlChanged" click="moduleLoader1.url=null;" />
+ <s:Button id="btn4" label="get icon" click="this.img=moduleLoader1.icon;" />
+ <s:ModuleLoader id="moduleLoader1" icon="{ico}" />
+</s:Application>
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/CoverageDataModule.as
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/CoverageDataModule.as?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/CoverageDataModule.as (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/CoverageDataModule.as Mon Aug 6 20:41:55 2012
@@ -0,0 +1,29 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ import mx.modules.ModuleBase;
+ public class CoverageDataModule extends ModuleBase
+ {
+ public function get data():Object
+ {
+ return { firstName:"Bill", lastName: "Sahlas" };
+ }
+ }
+}
\ No newline at end of file
Added: incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/ErrorModuleComp.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/ErrorModuleComp.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/ErrorModuleComp.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/ErrorModuleComp.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,97 @@
+<?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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300"
+ creationComplete="init()">
+<s:layout><s:VerticalLayout/></s:layout>
+ <fx:Script>
+ <![CDATA[
+ import mx.controls.Alert;
+ import mx.events.FlexEvent;
+ import mx.events.ModuleEvent;
+
+ private var errMsg:String="";
+
+ private function errorModuleHandler(e:ModuleEvent):void
+ {
+ e.currentTarget.removeEventListener(ModuleEvent.ERROR,errorModuleHandler);
+ errMsg=e.errorText;
+ }
+
+ public function loadModule1():void
+ {
+ trace("**************************************************");
+ trace(" : LOAD MODULE : loadModule1() ");
+ trace("**************************************************");
+ loadModule(subModuleLoader1, "assets/SimpleModuleWithLabel.swf");
+ }
+
+ private function loadModule(ml:spark.modules.ModuleLoader, moduleURL:String):void
+ {
+ this.lbl00.text="loading module...";
+ trace(' ************************************************** loading module...');
+ if (ml.url==null)
+ ml.url = moduleURL;
+ else ml.loadModule();
+ }
+
+ private function init():void
+ {
+ trace(' initializing subModuleLoader1 ...');
+ lbl00.text ' initializing subModuleLoader1 ...';
+ trace("*************************INIT*************************");
+ trace(" : " + info.url + " : ");
+
+ trace("*************************INIT*************************");
+ subModuleLoader1.addEventListener(ModuleEvent.READY,handleModuleLoaded);
+ subModuleLoader1.addEventListener(ModuleEvent.ERROR,errorModuleHandler);
+ subModuleLoader1.addEventListener(ModuleEvent.UNLOAD,removeModuleLoaded);
+ }
+
+ public function handleModuleLoaded(e:ModuleEvent):void
+ {
+ trace('*****TESTTESTTEST***** moduleLoaded *****TESTTESTTEST*****');
+ lbl00.text="ready? ";
+ e.currentTarget.removeEventListener(ModuleEvent.READY, handleModuleLoaded);
+ dispatchEvent(new FlexEvent("moduleLoaded"));
+ }
+
+ public function removeModuleLoaded(e:ModuleEvent):void
+ {
+ e.currentTarget.removeEventListener(ModuleEvent.UNLOAD, removeModuleLoaded);
+ dispatchEvent(new FlexEvent("moduleRemoved"));
+ }
+
+ public function runmdBtn1():void
+ {
+ trace('*****TESTTESTTEST***** runmdBtn1 *****TESTTESTTEST*****');
+ loadModule1()
+ }
+ ]]>
+ </fx:Script>
+
+ <s:Label text="Module1" id="lbl00" />
+ <s:Button id="mdBtn1" label="load SubModule1 Bill Sahlas" click="loadModule1()" />
+
+ <s:Button id="mdBtn2" label="unload SubModule1" click="{subModuleLoader1.unloadModule(); subModuleLoader1.url=null;}" />
+ <s:ModuleLoader id="subModuleLoader1" />
+</s:Module>
+
Added: incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/SimpleModuleComp.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/SimpleModuleComp.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/SimpleModuleComp.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/SimpleModuleComp.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,32 @@
+<?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.
+
+-->
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="300" minHeight="300">
+ <s:layout>
+ <s:HorizontalLayout/>
+ </s:layout>
+
+ <s:Button label="Button 1"/>
+ <s:Button label="Button 2"/>
+ <s:Button label="Button 3"/>
+ <s:Button label="Button 4"/>
+</s:Module>
+
Added: incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/bulletCheck.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/bulletCheck.png?rev=1369996&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/assets/bulletCheck.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/pre_compile.sh
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/pre_compile.sh?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/pre_compile.sh (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/pre_compile.sh Mon Aug 6 20:41:55 2012
@@ -0,0 +1,28 @@
+#!/bin/sh
+################################################################################
+##
+## 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.
+##
+################################################################################
+echo `pwd`
+cd ./assets
+echo "Removing previously compiled files..."
+rm -f `find . -name "*.swf"`
+echo "Compiling module SWFs..."
+$SDK_DIR/bin/mxmlc ErrorModuleComp.mxml -static-rsls=true
+$SDK_DIR/bin/mxmlc SimpleModuleComp.mxml -static-rsls=true
+$SDK_DIR/bin/mxmlc CoverageDataModule.as -static-rsls=true
+
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Events/SWFs/pre_compile.sh
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/flex/trunk/mustella/tests/SparkModules/Events/tests/Module_tester000.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Events/tests/Module_tester000.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Events/tests/Module_tester000.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Events/tests/Module_tester000.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,102 @@
+<?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="SparkModules/Events/tests/"
+ xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns="*"
+ testSWF="EventModuleLoader.mxml">
+ <fx:Script>
+ <![CDATA[
+ import mx.core.FlexGlobals;
+ public static function init(o:DisplayObject):void
+ {
+ }
+ ]]>
+ </fx:Script>
+ <fx:Metadata>
+ <![CDATA[
+ [Mixin]
+ ]]>
+ </fx:Metadata>
+ <testCases>
+ <TestCase testID="ModuleEventsTest" keywords="[event, loading, SparkModule]" description="ensure loading, progress, ready, setup, unload and urlChanged events are triggered as expected">
+ <setup>
+ <RunCode code="FlexGlobals.topLevelApplication.resetModuleLoader()" />
+ <SetProperty target="dg" propertyName="selectedIndex" value="1" waitEvent="valueCommit" />
+ </setup>
+ <body>
+ <DispatchMouseClickEvent target="btn1" waitEvent="moduleLoaded" waitTarget="" />
+ <AssertPropertyValue propertyName="moduleStateLoading" target="" value="true"/>
+ <AssertPropertyValue propertyName="moduleStateProgress" target="" value="true"/>
+ <AssertPropertyValue propertyName="moduleStateReady" target="" value="true"/>
+ <AssertPropertyValue propertyName="moduleStateSetup" target="" value="true"/>
+ <AssertPropertyValue propertyName="moduleStateUrlChanged" target="" value="true"/>
+ <DispatchMouseClickEvent target="btn2" waitEvent="moduleUnLoaded" waitTarget="" />
+ <AssertPropertyValue propertyName="moduleStateUnload" target="" value="true"/>
+ </body>
+ </TestCase>
+ <TestCase testID="URLChangedEventModuleTest" keywords="[event, urlChanged, removeEventListener, SparkModule]" description="extend code coverage">
+ <setup>
+ <RunCode code="FlexGlobals.topLevelApplication.resetModuleLoader()" />
+ <SetProperty target="dg" propertyName="selectedIndex" value="1" waitEvent="valueCommit" />
+ </setup>
+ <body>
+ <DispatchMouseClickEvent target="btn1" waitEvent="moduleLoaded" waitTarget="" />
+ <AssertPropertyValue propertyName="moduleStateUrlChanged" target="" value="true"/>
+ <DispatchMouseClickEvent target="btn2" waitEvent="moduleUnLoaded" waitTarget="" />
+ <AssertPropertyValue propertyName="moduleStateUnload" target="" value="true"/>
+ </body>
+ </TestCase>
+ <TestCase testID="CoverageDataModuleTest" keywords="[event, coverage, SparkModule]" description="extend code coverage">
+ <setup>
+ <RunCode code="FlexGlobals.topLevelApplication.resetModuleLoader()" />
+ <SetProperty target="dg" propertyName="selectedIndex" value="2" waitEvent="valueCommit" />
+ </setup>
+ <body>
+ <DispatchMouseClickEvent target="btn1" waitEvent="moduleLoaded" waitTarget="" />
+ <AssertPropertyValue propertyName="moduleStateReady" target="" value="true"/>
+ <DispatchMouseClickEvent target="btn2" waitEvent="moduleUnLoaded" waitTarget="" />
+ <AssertPropertyValue propertyName="moduleStateUnload" target="" value="true"/>
+ </body>
+ </TestCase>
+ <TestCase testID="IconPropertyModuleTest" keywords="[event, icon, SparkModule]" description="extend code coverage">
+ <setup>
+ <RunCode code="FlexGlobals.topLevelApplication.resetModuleLoader()" />
+ </setup>
+ <body>
+ <DispatchMouseClickEvent target="btn4" />
+ <DispatchMouseClickEvent target="btn1" waitEvent="moduleLoaded" waitTarget="" />
+ <AssertPropertyValue propertyName="moduleStateReady" target="" value="true"/>
+ <DispatchMouseClickEvent target="btn2" waitEvent="moduleUnLoaded" waitTarget="" />
+ <AssertPropertyValue propertyName="moduleStateUnload" target="" value="true"/>
+ </body>
+ </TestCase>
+
+ <TestCase testID="ErrorEventModuleTest" keywords="[event, error, SparkModule]" description="ensure error event is triggered as expected">
+ <setup>
+ <RunCode code="FlexGlobals.topLevelApplication.resetModuleLoader()" />
+ <SetProperty target="dg" propertyName="selectedIndex" value="0" waitEvent="valueCommit" />
+ </setup>
+ <body>
+ <DispatchMouseClickEvent target="btn1" waitEvent="moduleFailedToLoad" waitTarget=""/>
+ <AssertPropertyValue propertyName="moduleStateError" target="" value="true"/>
+ </body>
+ </TestCase>
+
+ </testCases>
+</UnitTester>
Added: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/TLFAppUsingFontFromModule.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/TLFAppUsingFontFromModule.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/TLFAppUsingFontFromModule.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/TLFAppUsingFontFromModule.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,61 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ creationComplete="loadFontModule()"
+ width="800" height="600">
+ <fx:Style source="../../../../Assets/Fonts/myStyles.css" />
+ <fx:Script>
+ <![CDATA[
+ import spark.layouts.*;
+ import mx.core.UIComponent;
+ import mx.core.UIFTETextField;
+ import mx.modules.IModuleInfo;
+ import mx.modules.ModuleManager;
+ import mx.events.ModuleEvent;
+ import flash.events.MouseEvent;
+ private var dp:Array = [{ first: 'Main', last: 'App'}, {first: 'Loads', last: 'Modules' }];
+ private var fontModuleInfo:IModuleInfo;
+ private function loadFontModule():void
+ {
+ fontModuleInfo = ModuleManager.getModule("assets/TLFEmbedTestFontModule.swf");
+ fontModuleInfo.addEventListener(ModuleEvent.READY, readyHandler);
+ fontModuleInfo.load();
+ }
+ private function readyHandler(event:Event):void
+ {
+ trace("create module now**********************");
+ fontModuleInfo.factory.create();
+ }
+ ]]>
+ </fx:Script>
+ <s:layout> <s:VerticalLayout/> </s:layout>
+ <s:Button id="changeFonts" label="Change Font" click="pnl.setStyle('fontFamily', 'myCourier')"/>
+ <s:Panel id="pnl" title="Gumbo Main Panel" height="300" rotation="-10">
+ <s:layout> <s:VerticalLayout/> </s:layout>
+ <s:TextArea id="gumbo_textArea" />
+ <s:Button id="gumbo_button" label="gumbo button" />
+ <mx:Button id="halo_button" label="halo button" textFieldClass="mx.core.UIFTETextField" />
+ <mx:DataGrid id="dg" initialize="dg.dataProvider=dp"
+ textFieldClass="mx.core.UIFTETextField"
+ itemRenderer="mx.controls.dataGridClasses.FTEDataGridItemRenderer"/>
+ </s:Panel>
+</s:Application>
\ No newline at end of file
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/TLFAppUsingFontFromModule.mxml
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/TLFFontsApp.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/TLFFontsApp.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/TLFFontsApp.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/TLFFontsApp.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,60 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ creationComplete="loadFontModule()"
+ width="800" height="600">
+ <fx:Style source="../../../../Assets/Fonts/myStyles.css" />
+ <fx:Script>
+ <![CDATA[
+ import spark.layouts.*;
+ import mx.core.UIComponent;
+ import mx.core.UIFTETextField;
+ import mx.modules.IModuleInfo;
+ import mx.modules.ModuleManager;
+ import mx.events.ModuleEvent;
+ import flash.events.MouseEvent;
+ private var dp:Array = [{ first: 'Main', last: 'App'}, {first: 'Loads', last: 'Modules' }];
+ private var fontModuleInfo:IModuleInfo;
+ public function loadFontModule():void
+ {
+ fontModuleInfo = ModuleManager.getModule("assets/TLFEmbedTestFontModule.swf");
+ fontModuleInfo.addEventListener(ModuleEvent.READY, readyHandler);
+ fontModuleInfo.load();
+ }
+ private function readyHandler(event:Event):void
+ {
+ fontModuleInfo.factory.create();
+ }
+ ]]>
+ </fx:Script>
+ <s:layout> <s:VerticalLayout/> </s:layout>
+ <s:Panel id="pnl" title="Spark Main Panel" height="300">
+ <s:layout> <s:VerticalLayout/> </s:layout>
+ <s:TextArea id="gumbo_textArea" />
+ <s:Button id="gumbo_button" label="change font" click="ml.child['pnl'].setStyle('fontFamily', 'myCourier')" />
+ <mx:Button id="halo_button" label="halo button" textFieldClass="mx.core.UIFTETextField" />
+ <mx:DataGrid id="dg" initialize="dg.dataProvider=dp" textFieldClass="mx.core.UIFTETextField"
+ itemRenderer="mx.controls.dataGridClasses.FTEDataGridItemRenderer"/>
+ </s:Panel>
+ <s:ModuleLoader id="ml" url="assets/TLFEmbedTestModule.swf" width="500" height="600" />
+
+</s:Application>
\ No newline at end of file
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/TLFFontsApp.mxml
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/TLFEmbedTestFontModule.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/TLFEmbedTestFontModule.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/TLFEmbedTestFontModule.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/TLFEmbedTestFontModule.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,68 @@
+<?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.
+
+-->
+
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" height="600" width="500"
+
+ xmlns:s="library://ns.adobe.com/flex/spark">
+
+<fx:Script>
+
+<![CDATA[
+
+
+
+]]>
+
+</fx:Script>
+
+<fx:Style>
+
+@font-face {
+
+ src:url("../../../../../Assets/Fonts/Cousine/Cousine-Regular.ttf");
+
+ embedAsCFF: true;
+
+ fontFamily: myCourier;
+
+ }
+
+
+
+@font-face {
+
+ src:url("../../../../../Assets/Fonts/Cousine/Cousine-Bold.ttf");
+
+ embedAsCFF: true;
+
+ fontWeight: bold;
+
+ fontFamily: myCourier;
+
+ }
+
+
+
+</fx:Style>
+
+
+
+</s:Module>
+
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/TLFEmbedTestFontModule.mxml
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/TLFEmbedTestModule.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/TLFEmbedTestModule.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/TLFEmbedTestModule.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/TLFEmbedTestModule.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,90 @@
+<?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.
+
+-->
+
+<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" height="600" width="500"
+
+ xmlns:s="library://ns.adobe.com/flex/spark">
+
+<fx:Script>
+
+<![CDATA[
+
+import mx.core.UIFTETextField;
+
+
+
+private var dp:Array = [{ first: 'Flex', last: 'SDK'}, {first: 'Module', last: 'Controls' }]
+
+]]>
+
+</fx:Script>
+
+<fx:Style>
+
+@font-face {
+
+ src:url("../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
+
+ embedAsCFF: true;
+
+ fontFamily: myArial;
+
+ }
+
+
+
+@font-face {
+
+ src:url("../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
+
+ embedAsCFF: true;
+
+ fontWeight: bold;
+
+ fontFamily: myArial;
+
+ }
+
+
+
+</fx:Style>
+
+
+
+<s:Panel id="pnl" scaleY="2" rotation="-10" fontFamily="myArial" title="Spark Panel Module Test">
+<s:layout> <s:VerticalLayout/> </s:layout>
+<s:Button id="gumbo_button" label="gumbo button" />
+
+<mx:Button id="halo_button" label="halo button" textFieldClass="mx.core.UIFTETextField" />
+<s:TextArea id="gumbo_textArea" />
+
+
+<mx:DataGrid id="dg" editable="true" initialize="dg.dataProvider=dp" textFieldClass="mx.core.UIFTETextField"
+
+ defaultDataGridItemRenderer="mx.controls.dataGridClasses.FTEDataGridItemRenderer"/>
+
+
+
+</s:Panel>
+
+
+
+</s:Module>
+
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/assets/TLFEmbedTestModule.mxml
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/pre_compile.sh
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/pre_compile.sh?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/pre_compile.sh (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/pre_compile.sh Mon Aug 6 20:41:55 2012
@@ -0,0 +1,28 @@
+#!/bin/sh
+################################################################################
+##
+## 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.
+##
+################################################################################
+echo `pwd`
+echo "cd assets"
+echo `pwd`
+cd ./assets
+echo "Removing previously compiled files..."
+rm -f `find . -name "*.swf"`
+echo "Compiling module SWFs..."
+$SDK_DIR/bin/mxmlc TLFEmbedTestFontModule.mxml
+$SDK_DIR/bin/mxmlc TLFEmbedTestModule.mxml
\ No newline at end of file
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/SWFs/pre_compile.sh
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/fontsEmbedInSparkModule_after.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/fontsEmbedInSparkModule_after.png?rev=1369996&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/fontsEmbedInSparkModule_after.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/fontsEmbedInSparkModule_before.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/fontsEmbedInSparkModule_before.png?rev=1369996&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/fontsEmbedInSparkModule_before.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/useFontFromModule000_after.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/useFontFromModule000_after.png?rev=1369996&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/useFontFromModule000_after.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/useFontFromModule000_before.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/useFontFromModule000_before.png?rev=1369996&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/baselines/useFontFromModule000_before.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/switchFonts.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/switchFonts.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/switchFonts.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/switchFonts.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,55 @@
+<?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="SparkModules/Fonts/tests/" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns="*" testSWF="TLFFontsApp.mxml">
+ <!-- this set of lines form a template that must be in each unit test -->
+ <fx:Script>
+ <![CDATA[
+
+ import mx.core.FlexGlobals;
+
+ 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="fontsEmbedInSparkModule" keywords="[TLF,Fonts,Module]" description="Test for font embeded in module being used at other locations in the application" >
+ <setup>
+ <Pause timeout="3000" />
+ </setup>
+ <body>
+ <CompareBitmap url="../tests/baselines/$testID_before.png" target="ml" numColorVariances="3" ignoreMaxColorVariance="true"/>
+ <RunCode code="FlexGlobals.topLevelApplication.ml.child['pnl'].setStyle('fontFamily', 'myCourier')"/>
+ <Pause timeout="1000" />
+ <CompareBitmap url="../tests/baselines/$testID_after.png" target="ml" numColorVariances="3" ignoreMaxColorVariance="true"/>
+ </body>
+
+ </TestCase>
+
+ </testCases>
+</UnitTester>
\ No newline at end of file
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/switchFonts.mxml
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/useFonts.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/useFonts.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/useFonts.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/useFonts.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,91 @@
+<?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="SparkModules/Fonts/tests/" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns="*" testSWF="TLFAppUsingFontFromModule.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="useFontFromModule000" keywords="[TLF,Fonts,Module]" description="Test for font embeded in module being used at other locations in the application" >
+
+ <setup>
+
+ <Pause timeout="3000" />
+
+ </setup>
+
+
+
+ <body>
+
+ <CompareBitmap url="../tests/baselines/$testID_before.png" target="pnl" numColorVariances="3" ignoreMaxColorVariance="true"/>
+
+
+
+ <DispatchMouseClickEvent target="changeFonts" waitEvent="click" waitTarget="changeFonts" />
+
+ <Pause timeout="1000" />
+
+ <CompareBitmap url="../tests/baselines/$testID_after.png" target="pnl" numColorVariances="3" ignoreMaxColorVariance="true"/>
+
+
+
+ </body>
+
+ </TestCase>
+
+ </testCases>
+
+
+
+</UnitTester>
\ No newline at end of file
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/Fonts/tests/useFonts.mxml
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/flex/trunk/mustella/tests/SparkModules/RSLs/Integration/baselines/modulesRSL001_comboModule.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/RSLs/Integration/baselines/modulesRSL001_comboModule.png?rev=1369996&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/RSLs/Integration/baselines/modulesRSL001_comboModule.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/trunk/mustella/tests/SparkModules/RSLs/Integration/checkModules.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/RSLs/Integration/checkModules.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/RSLs/Integration/checkModules.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/RSLs/Integration/checkModules.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,67 @@
+<?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="SparkModules/RSLs/Integration/" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns="*" testSWF="MainApp.mxml">
+
+ <!-- this set of lines form a template that must be in each unit test -->
+ <fx:Script>
+ <![CDATA[
+ import mx.core.FlexGlobals;
+ 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="modulesRSL001" keywords="[RSL,Module]" description="Test for module when using rsl" >
+ <setup>
+
+ <RunCode code="FlexGlobals.topLevelApplication.comboModule.loadModule()" />
+ <Pause timeout="1000"/>
+
+
+ </setup>
+
+ <body>
+
+ <CompareBitmap url="../Integration/baselines/$testID_comboModule.png" target="comboModule" numColorVariances="10" ignoreMaxColorVariance="true" />
+ <!--
+ <RunCode code="FlexGlobals.topLevelApplication.dataGrid.loadModule()" />
+ <Pause timeout="500"/>
+ <CompareBitmap url="../Integration/baselines/$testID_dataGrid.png" target="dataGrid" numColorVariances="10" ignoreMaxColorVariance="true"/>
+ <RunCode code="FlexGlobals.topLevelApplication.anotherDataGrid.loadModule()" />
+ <Pause timeout="500"/>
+ <CompareBitmap url="../Integration/baselines/$testID_anotherDataGrid.png" target="anotherDataGrid" numColorVariances="10" ignoreMaxColorVariance="true"/>
+ -->
+
+ </body>
+
+ </TestCase>
+
+ </testCases>
+</UnitTester>
\ No newline at end of file
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/RSLs/Integration/checkModules.mxml
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/MainApp.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/MainApp.mxml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/MainApp.mxml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/MainApp.mxml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,59 @@
+<?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.
+
+-->
+<s:Application
+ xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+backgroundColor="0xffffff" width="1200" height="1000"
+ >
+ <s:layout> <s:VerticalLayout/> </s:layout>
+
+ <fx:Script>
+ <![CDATA[
+ import mx.events.ModuleEvent;
+ import mx.controls.Alert;
+ private function errorHandler(e:ModuleEvent):void
+ {
+ Alert.show(e.errorText);
+ }
+ ]]>
+ </fx:Script>
+
+ <s:Button label="Unload ComboModule"
+ click="comboModule.unloadModule();" />
+
+ <s:Button label="Unload DataGrid"
+ click="dataGrid.unloadModule();" />
+
+ <s:Button label="Unload AnotherDataGrid"
+ click="anotherDataGrid.unloadModule();" />
+ <mx:Spacer />
+
+ <s:Button label="Load ComboModule" click="comboModule.loadModule();" />
+ <s:Button label="Load DataGrid" click="dataGrid.loadModule();" />
+ <s:Button label="Load AnotherDataGrid" click="anotherDataGrid.loadModule();" />
+
+ <mx:HBox id="hBox">
+ <s:ModuleLoader id="comboModule" url="assets/ComboModule.swf" error="errorHandler(event)"/>
+ <s:ModuleLoader id="dataGrid" url="assets/DataGridModule.swf" error="errorHandler(event)"/>
+ <s:ModuleLoader id="anotherDataGrid" url="assets/AnotherDataGridModule.swf" error="errorHandler(event)"/>
+ </mx:HBox>
+
+</s:Application>
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/MainApp.mxml
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/assets/AnotherDataGridModule-config.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/assets/AnotherDataGridModule-config.xml?rev=1369996&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/assets/AnotherDataGridModule-config.xml (added)
+++ incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/assets/AnotherDataGridModule-config.xml Mon Aug 6 20:41:55 2012
@@ -0,0 +1,26 @@
+<?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.
+
+-->
+<flex-config xmlns="http://www.adobe.com/2006/flex-config">
+ <runtime-shared-library-path>
+ <path-element>${flexlib}/libs/framework.swc</path-element>
+ <rsl-url>framework_4.5.0.${build.number}.swf</rsl-url>
+ </runtime-shared-library-path>
+ <static-link-runtime-shared-libraries>false</static-link-runtime-shared-libraries>
+</flex-config>
Propchange: incubator/flex/trunk/mustella/tests/SparkModules/RSLs/SWFs/assets/AnotherDataGridModule-config.xml
------------------------------------------------------------------------------
svn:executable = *