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 2012/12/14 06:15:45 UTC
svn commit: r1421673 - in
/incubator/flex/sdk/branches/develop/mustella/tests:
Managers/StyleManager/AdvancedCSS/SWFs/
Managers/StyleManager/AdvancedCSS/classSelectors/
Managers/StyleManager/AdvancedCSS/classSelectors/baselines/
Managers/StyleManager/A...
Author: aharui
Date: Fri Dec 14 05:15:43 2012
New Revision: 1421673
URL: http://svn.apache.org/viewvc?rev=1421673&view=rev
Log:
Fix some mustella tests
Added:
incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style2.png (with props)
incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style2_2.png (with props)
incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style_neg2.png (with props)
incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style_neg2_2.png (with props)
Modified:
incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/SWFs/ClassSelectors_main_runtimeCSS.mxml
incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/SWFs/IDSelectors_main_runtimeCSS.mxml
incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/AdvancedCSS_ClassSelectors_RuntimeCSS.mxml
incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/AdvancedCSS_ClassSelectors_Source.mxml
incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/idSelectors/AdvancedCSS_IDSelectors_RuntimeCSS.mxml
incubator/flex/sdk/branches/develop/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Compiler_LocaleParams_2_Tester.mxml
incubator/flex/sdk/branches/develop/mustella/tests/gumbo/components/DropDownList/Properties/DropDownList_Properties_Images.mxml
Modified: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/SWFs/ClassSelectors_main_runtimeCSS.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/SWFs/ClassSelectors_main_runtimeCSS.mxml?rev=1421673&r1=1421672&r2=1421673&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/SWFs/ClassSelectors_main_runtimeCSS.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/SWFs/ClassSelectors_main_runtimeCSS.mxml Fri Dec 14 05:15:43 2012
@@ -26,6 +26,7 @@
<![CDATA[
import mx.core.IFlexDisplayObject;
+ import mx.events.StyleEvent;
import mx.managers.PopUpManager;
import mx.styles.StyleManager;
import mx.core.EmbeddedFontRegistry; EmbeddedFontRegistry;
@@ -47,8 +48,22 @@
public function loadCSS(): void
{
+ if (moduleLoaded)
+ {
+ dispatchEvent(new Event("moduleReady"));
+ return;
+ }
eventDispatcher = StyleManager.loadStyleDeclarations("assets/classStyles.swf");
+ eventDispatcher.addEventListener(StyleEvent.COMPLETE, completeHandler);
}
+
+ private var moduleLoaded:Boolean = false;
+
+ private function completeHandler(event:Event):void
+ {
+ moduleLoaded = true;
+ dispatchEvent(new Event("moduleReady"));
+ }
]]>
</fx:Script>
Modified: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/SWFs/IDSelectors_main_runtimeCSS.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/SWFs/IDSelectors_main_runtimeCSS.mxml?rev=1421673&r1=1421672&r2=1421673&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/SWFs/IDSelectors_main_runtimeCSS.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/SWFs/IDSelectors_main_runtimeCSS.mxml Fri Dec 14 05:15:43 2012
@@ -27,6 +27,7 @@
import mx.managers.PopUpManager;
import mx.core.IFlexDisplayObject;
import comps.*;
+ import mx.events.StyleEvent;
import mx.styles.StyleManager;
import mx.core.EmbeddedFontRegistry; EmbeddedFontRegistry;
@@ -46,7 +47,21 @@
public function loadCSS(): void
{
+ if (moduleLoaded)
+ {
+ dispatchEvent(new Event("moduleReady"));
+ return;
+ }
eventDispatcher = StyleManager.loadStyleDeclarations("assets/idStyles.swf");
+ eventDispatcher.addEventListener(StyleEvent.COMPLETE, completeHandler);
+ }
+
+ private var moduleLoaded:Boolean = false;
+
+ private function completeHandler(event:Event):void
+ {
+ moduleLoaded = true;
+ dispatchEvent(new Event("moduleReady"));
}
]]>
Modified: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/AdvancedCSS_ClassSelectors_RuntimeCSS.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/AdvancedCSS_ClassSelectors_RuntimeCSS.mxml?rev=1421673&r1=1421672&r2=1421673&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/AdvancedCSS_ClassSelectors_RuntimeCSS.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/AdvancedCSS_ClassSelectors_RuntimeCSS.mxml Fri Dec 14 05:15:43 2012
@@ -42,7 +42,7 @@
<TestCase testID="classTypeSelector_basic_style" keywords="[CSS, type selector, class selector]"
description="Does a basic Type selector with a class selector work defined within the Style tag?">
<setup>
- <Pause timeout="1000" />
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
</setup>
<body>
<CompareBitmap url="../classSelectors/baselines/$testID.png" target="hbox1" />
@@ -50,18 +50,27 @@
</TestCase>
<TestCase testID="classTypeSelector_basic_style_neg" keywords="[CSS, type selector, class selector]"
description="Be sure that a style on HBox.pinkButton doesn't affect a VBox with pinkButton styleName">
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<CompareBitmap url="../classSelectors/baselines/$testID.png" target="vbox1" />
</body>
</TestCase>
<TestCase testID="classTypeSelector_basic_style_neg2" keywords="[CSS, type selector, class selector]"
description="Be sure that a style on HBox.pinkButton doesn't affect a HBox with no styleName">
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<CompareBitmap url="../classSelectors/baselines/$testID.png" target="hbox2" />
</body>
</TestCase>
<TestCase testID="classTypeSelector_basic_style_nested" keywords="[CSS, type selector, class selector]"
description="Does a basic Type selector with a class selector work even if the type is nested in containers?">
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<CompareBitmap url="../classSelectors/baselines/$testID.png" target="hbox3" />
</body>
@@ -96,6 +105,9 @@
</TestCase>
<TestCase testID="descendant_classSelector_basic_style" keywords="[CSS, type selector, class selector]"
description="Test descendant type selector with a class selector within the Style tag?">
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<CompareBitmap url="../classSelectors/baselines/$testID.png" target="button2" />
<AssertStyleValue target="button2" styleName="color" value="0x697493" />
@@ -105,6 +117,9 @@
</TestCase>
<TestCase testID="descendant_classSelector_basic_style_neg" keywords="[CSS, type selector, class selector]"
description="Test descendant type selector with a class selector within the Style tag?">
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<CompareBitmap url="../classSelectors/baselines/$testID.png" target="button1" />
<AssertStyleValue target="button1" styleName="color" value="0x000000" />
@@ -114,6 +129,9 @@
</TestCase>
<TestCase testID="id_classSelector_basic_style" keywords="[CSS, class selector, id selector]"
description="Test id selectors, with a class selector within the Style tag">
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<CompareBitmap url="../classSelectors/baselines/$testID.png" target="myDateField" numColorVariances="5" ignoreMaxColorVariance="true"/>
<DispatchMouseClickEvent target="myDateField.getChildAt(1)" localX="5" localY="5" waitTarget="myDateField" waitEvent="open" />
@@ -125,7 +143,8 @@
</TestCase>
<TestCase testID="id_classSelector_basic_style_neg" keywords="[CSS, class selector, id selector]"
description="Test id selectors, with a class selector within the Style tag">
- <setup>
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
<ResetComponent target="myDateField" className="mx.controls.DateField" waitTarget="myDateField" waitEvent="updateComplete" />
</setup>
<body>
@@ -138,6 +157,9 @@
</TestCase>
<TestCase testID="descendant_anyType_classSelector_style" keywords="[CSS, descendant selector, type selector, class selector]"
description="Test descendant type selector with any type and a class selector within the Style tag?">
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<AssertPixelValue target="greenCanvas" x="3" y="3" value="0x00DD00" />
<AssertPixelValue target="greenBox" x="3" y="3" value="0x00DD00" />
@@ -152,6 +174,9 @@
</TestCase>
<TestCase testID="descendant_anyType_classSelector_style_neg" keywords="[CSS, descendant selector, type selector, class selector]"
description="Test descendant type selector with any type and a class selector within the Style tag?">
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<AssertPixelValue target="whiteVBox" x="3" y="4" value="0xFFFFFF" />
<AssertPixelValue target="canvas2" x="3" y="4" value="0x99FFCC" />
@@ -168,6 +193,9 @@
</TestCase>
<TestCase testID="descendantWithClassSelector_typeSelector_style_precedence" keywords="[CSS, descendant selector, type selector, class selector]"
description="Test a style like: ApplicationControlBar.iconAdditionStyle Button">
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<CompareBitmap url="../classSelectors/baselines/$testID.png" target="acb_button2" />
</body>
@@ -186,6 +214,9 @@
</TestCase>
<TestCase testID="TypeWithClassSelector_separatedByCommas_style_neg" keywords="[CSS, type selector, class selector]"
description="Test a style like: Label,Text.redTheme">
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<AssertStyleValue target="label1" styleName="color" value="0x000000" />
<CompareBitmap url="../classSelectors/baselines/$testID.png" target="label1" />
Modified: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/AdvancedCSS_ClassSelectors_Source.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/AdvancedCSS_ClassSelectors_Source.mxml?rev=1421673&r1=1421672&r2=1421673&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/AdvancedCSS_ClassSelectors_Source.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/AdvancedCSS_ClassSelectors_Source.mxml Fri Dec 14 05:15:43 2012
@@ -109,7 +109,7 @@
<AssertStyleValue target="main_button2" styleName="color" value="0x000000" />
</body>
</TestCase>
- <TestCase testID="id_classSelector_basic_style" keywords="[CSS, class selector, id selector]"
+ <TestCase testID="id_classSelector_basic_style2" keywords="[CSS, class selector, id selector]"
description="Test id selectors, with a class selector within the Style tag">
<body>
<CompareBitmap url="../classSelectors/baselines/$testID.png" target="myDateField" numColorVariances="5" ignoreMaxColorVariance="true"/>
@@ -120,7 +120,7 @@
<AssertStyleValue target="myDateField" styleName="color" value="0xFF0000" />
</body>
</TestCase>
- <TestCase testID="id_classSelector_basic_style_neg" keywords="[CSS, class selector, id selector]"
+ <TestCase testID="id_classSelector_basic_style_neg2" keywords="[CSS, class selector, id selector]"
description="Test id selectors, with a class selector within the Style tag">
<setup>
<ResetComponent target="myDateField" className="mx.controls.DateField" waitTarget="myDateField" waitEvent="updateComplete" />
Added: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style2.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style2.png?rev=1421673&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style2.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style2_2.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style2_2.png?rev=1421673&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style2_2.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style_neg2.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style_neg2.png?rev=1421673&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style_neg2.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style_neg2_2.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style_neg2_2.png?rev=1421673&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/classSelectors/baselines/id_classSelector_basic_style_neg2_2.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/idSelectors/AdvancedCSS_IDSelectors_RuntimeCSS.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/idSelectors/AdvancedCSS_IDSelectors_RuntimeCSS.mxml?rev=1421673&r1=1421672&r2=1421673&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/idSelectors/AdvancedCSS_IDSelectors_RuntimeCSS.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/Managers/StyleManager/AdvancedCSS/idSelectors/AdvancedCSS_IDSelectors_RuntimeCSS.mxml Fri Dec 14 05:15:43 2012
@@ -40,9 +40,9 @@
<TestCase testID="idSelector_basic_style" keywords="[CSS, id selector]"
description="Does a basic id selector work defined within the Style tag?">
- <setup>
- <Pause timeout="500" />
- </setup>
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<CompareBitmap url="../idSelectors/baselines/$testID.png" target="redBackground" />
<CompareBitmap url="../idSelectors/baselines/$testID_2.png" target="noBackground" />
@@ -50,6 +50,9 @@
</TestCase>
<TestCase testID="idSelector_basic_PopUp_style" keywords="[CSS, id selector, PopUpManager]"
description="Does a basic id selector work for component added to a popUp when defined within the Style tag?">
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<DispatchMouseClickEvent target="open_btn" localX="10" localY="10" waitTarget="iPopUp" waitEvent="updateComplete" />
<AssertPropertyValue propertyName="y" value="10" target="iPopUp.label1" />
@@ -59,6 +62,7 @@
<TestCase testID="idSelector_basic_module_style" keywords="[CSS, id selector, Modules]"
description="(Module) Does a basic id selector work defined within the Style tag?">
<setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
<DispatchMouseClickEvent target="close_btn" localX="10" localY="10" />
<!--ResetComponent target="boxComp" className="comps.BoxComp" waitTarget="boxComp" waitEvent="updateComplete" /-->
</setup>
@@ -189,6 +193,9 @@
</TestCase>
<TestCase testID="id_multipleTypeSelector_style" keywords="[CSS, id selector]"
description="Ensure that the selector FxButton,DateField#redTheme matches any only a DateField with id=redTheme">
+ <setup>
+ <RunCode code="application.loadCSS()" waitTarget="" waitEvent="moduleReady" timeout="3000" />
+ </setup>
<body>
<CompareBitmap url="../idSelectors/baselines/$testID.png" target="redTheme" />
<CompareBitmap url="../idSelectors/baselines/$testID_neg.png" target="noTheme" />
Modified: incubator/flex/sdk/branches/develop/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Compiler_LocaleParams_2_Tester.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Compiler_LocaleParams_2_Tester.mxml?rev=1421673&r1=1421672&r2=1421673&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Compiler_LocaleParams_2_Tester.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/RuntimeLocalization/RTL_SparkSkin/Integration/RTL_Compiler_LocaleParams_2_Tester.mxml Fri Dec 14 05:15:43 2012
@@ -74,7 +74,8 @@ Verify -locale[=]en_US[,]fr_FR[,]ja_JP c
<TestCase frequency="all" testID="RTL_Compiler_LocaleParams_1_EnglishPresent" description="Be sure that the English resources are present." keywords="[Localization,Compiler,locale]" >
<setup>
- <RunCode code="ResourceManager.getInstance().localeChain=['en_US','fr_FR','ja_JP']" waitTarget="lbl1" waitEvent="updateComplete"/>
+ <RunCode code="ResourceManager.getInstance().localeChain=['en_US','fr_FR','ja_JP']"/>
+ <WaitForLayoutManager />
</setup>
<body>
<AssertPropertyValue target="lbl1" propertyName="text" value="View Source" />
Modified: incubator/flex/sdk/branches/develop/mustella/tests/gumbo/components/DropDownList/Properties/DropDownList_Properties_Images.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/mustella/tests/gumbo/components/DropDownList/Properties/DropDownList_Properties_Images.mxml?rev=1421673&r1=1421672&r2=1421673&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/mustella/tests/gumbo/components/DropDownList/Properties/DropDownList_Properties_Images.mxml (original)
+++ incubator/flex/sdk/branches/develop/mustella/tests/gumbo/components/DropDownList/Properties/DropDownList_Properties_Images.mxml Fri Dec 14 05:15:43 2012
@@ -73,8 +73,9 @@
<RunCode code="FlexGlobals.topLevelApplication.myDDLImages.openDropDown()" waitEvent="open" waitTarget="myDDLImages"/>
<DispatchMouseClickEvent target="stage" stageX="416" stageY="403" waitEvent="click" waitTarget="stage"/>
- <Pause timeout="100"/>
+ <WaitForLayoutManager/>
<DispatchMouseClickEvent target="myDDLImages.dropDown" localX="275" localY="50" waitEvent="click" waitTarget="myDDLImages.dropDown"/>
+ <WaitForLayoutManager/>
<CompareBitmap target="myDDLImages" url="../Properties/Baselines/$testID_2.png" numColorVariances="8" ignoreMaxColorVariance="true"/>
</body>
</TestCase>