flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r1370370 [43/43] - in /incubator/flex/trunk/mustella/tests/mx: ./ binding/ binding/utils/ binding/utils/BindingUtils/ binding/utils/BindingUtils/SWFs/ binding/utils/BindingUtils/SWFs/assets/ binding/utils/BindingUtils/method/ binding/utils/...
Date Tue, 07 Aug 2012 17:13:35 GMT
Added: incubator/flex/trunk/mustella/tests/mx/styles/AdvancedStyleClient/Styles/ADV_style_method_main_tester.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/styles/AdvancedStyleClient/Styles/ADV_style_method_main_tester.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/styles/AdvancedStyleClient/Styles/ADV_style_method_main_tester.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/mx/styles/AdvancedStyleClient/Styles/ADV_style_method_main_tester.mxml
Tue Aug  7 17:13:06 2012
@@ -0,0 +1,163 @@
+<?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="mx/styles/AdvancedStyleClient/Styles/"  
+			xmlns:mx="http://www.adobe.com/2006/mxml" 
+			xmlns:s="library://ns.adobe.com/flex/spark" 
+			xmlns="*" 
+			testSWF="ADV_style_method_main.mxml">
+	
+	<mx:Script>
+		<![CDATA[
+			import assets.styleTest.ADVStyleTestClass;
+			import assets.styleTest.ADVStyleTestVo;
+			import assets.styleTest.ADVStyleTestConstants;
+			import assets.styleTest.ADVStyleTestEvent;
+			
+			import mx.collections.ArrayCollection;
+			import mx.collections.IList;
+			import mx.collections.XMLListCollection;		
+			
+			public static function init(o:DisplayObject):void
+			{
+				
+			}
+		]]>
+	</mx:Script>
+	
+	<mx:Metadata>
+		
+		<![CDATA[
+		[Mixin]
+		]]>
+	</mx:Metadata>
+	
+	<testCases>
+		<!--This test case is to test setStyle() and getStyle() API in tester-->
+		<TestCase testID="ADV_method_setStyle_tester_test1" 
+				  description="This test case is to test setStyle() and getStyle() API in tester" 
+				  keywords="[ADVStyleTestClass, setStyle_tester]">
+			<setup>
+				<ResetComponent target="advStyleTest_method" className="assets.styleTest.ADVStyleTestClass"
/>
+				<Pause timeout="100" />
+				<RunCode code="application.advStyleTest_method.initialized(null, 'advStyleTest_method')"
/>
+				<Pause timeout="100" />
+				
+				<SetStyle styleName="teststyle_1_string_noinh" target="advStyleTest_method" value="setString"
/>
+				<SetStyle styleName="teststyle_3_uint_inh" target="advStyleTest_method" valueExpression="value=456"
/>
+			</setup>
+			<body>
+				<!--test setted styles-->
+				<AssertMethodValue method="value=application.advStyleTest_method.getStyle('teststyle_1_string_noinh')"
value="setString"/>
+				<AssertMethodValue method="value=application.advStyleTest_method.getStyle('teststyle_3_uint_inh')"
valueExpression="value=456"/>
+				
+				<!--test un-setting style using default value-->
+				<AssertMethodValue method="value=application.advStyleTest_method.getStyle('teststyle_2_number_noinh')"
valueExpression="value=undefined"/>
+			</body>
+		</TestCase>
+		
+		<!--This test case is to test setStyle() API in ActionScript codes-->
+		<TestCase testID="ADV_method_setStyle_mainAS_test2" 
+				  description="This test case is to test setStyle() API in ActionScript codes" 
+				  keywords="[ADVStyleTestClass, setStyle_AS_code]">
+			<setup>
+				<ResetComponent target="advStyleTest_method" className="assets.styleTest.ADVStyleTestClass"
/>
+				<Pause timeout="100" />
+				<RunCode code="application.advStyleTest_method.initialized(null, 'advStyleTest_method')"
/>
+				<Pause timeout="100" />
+				
+				<RunCode code="application.setAdvStyle()" />
+				<Pause timeout="100" />
+			</setup>
+			<body>
+				<!--test setted styles-->
+				<AssertMethodValue method="value=application.advStyleTest_method.getStyle('teststyle_1_string_noinh')"
value="testString"/>	
+				<AssertMethodValue method="value=application.advStyleTest_method.getStyle('teststyle_3_uint_inh')"
valueExpression="value=123"/>
+				
+				<!--test unsetted style using default value-->
+				<AssertMethodValue method="value=application.advStyleTest_method.getStyle('teststyle_2_number_noinh')"
valueExpression="value=undefined"/>
+			</body>
+		</TestCase>
+		
+		<!--This test case is to test clearStyle() API in ActionScript codes-->
+		<TestCase testID="ADV_method_clearStyle_mainAS_test3" 
+				  description="This test case is to test clearStyle() API in ActionScript codes" 
+				  keywords="[ADVStyleTestClass, clearStyle_AS_code]">
+			<setup>
+				<RunCode code="application.clearAdvStyle()"/>
+				<Pause timeout="100" />
+			</setup>
+			<body>
+				<!--test cleared styles using Type Selector value-->
+				<AssertMethodValue method="value=application.clearStyleTest.getStyle('teststyle_1_string_noinh')"
value="testStr"/>
+				<AssertMethodValue method="value=application.clearStyleTest.getStyle('teststyle_3_uint_inh')"
valueExpression="value=34"/>
+				
+				<!--test uncleared style using inline value-->
+				<AssertMethodValue method="value=application.clearStyleTest.getStyle('teststyle_2_number_noinh')"
valueExpression="value=12"/>
+			</body>
+		</TestCase>
+		
+		<!--This test case is to test get id() and set id() methods-->
+		<TestCase testID="ADV_method_property_id_test4" 
+				  description="This test case is to test get id() and set id() methods" 
+				  keywords="[ADVStyleTestClass, id property]">
+			<setup>
+				<ResetComponent target="advStyleTest_method" className="assets.styleTest.ADVStyleTestClass"/>
+				<Pause timeout="100" />
+				<RunCode code="application.advStyleTest_method.initialized(null, 'advStyleTest_method')"
/>
+				<Pause timeout="100" />
+				
+				<SetProperty target="advStyleTest_method" value="testClassID" propertyName="id"/>
+				<Pause timeout="100" />
+			</setup>
+			<body>
+				<AssertPropertyValue propertyName="id" target="advStyleTest_method" value="testClassID"
/>
+			</body>
+		</TestCase>
+		
+		<!--This test case is to test get className() method-->
+		<TestCase testID="ADV_method_get_className_test5" 
+				  description="This test case is to test get className() method" 
+				  keywords="[ADVStyleTestClass, getClassName]">
+			<setup>
+				<ResetComponent target="advStyleTest_method" className="assets.styleTest.ADVStyleTestClass"/>
+				<Pause timeout="100" />
+				<RunCode code="application.advStyleTest_method.initialized(null, 'advStyleTest_method')"
/>
+				<Pause timeout="100" />
+			</setup>
+			<body>
+				<AssertMethodValue method="value=application.advStyleTest_method.className" value="ADVStyleTestClass"/>
+			</body>
+		</TestCase>
+		
+		<!--This test case is to test getClassStyleDeclarations() method in ActionScript codes-->
+		<TestCase testID="ADV_method_getClassStyleDeclarations_test6" 
+				  description="This test case is to test getClassStyleDeclarations() method in ActionScript
codes" 
+				  keywords="[ADVStyleTestClass, getClassStyleDeclarations]">
+			<setup>
+				<RunCode code="application.testStyleDeclaration()" />
+				<Pause timeout="100" />
+			</setup>
+			<body>
+				<AssertMethodValue method="value=application.getCssStyleDecl_0()" value="assets.styleTest.ADVStyleTestClass"
/>
+				<AssertMethodValue method="value=application.getCssStyleDecl_1()" value="assets.styleTest.ADVStyleTestExtendClass"
/>
+			</body>
+		</TestCase>
+	</testCases>
+</UnitTester>
\ No newline at end of file

Added: incubator/flex/trunk/mustella/tests/mx/styles/AdvancedStyleClient/Styles/ADV_style_method_parent_main_tester.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/styles/AdvancedStyleClient/Styles/ADV_style_method_parent_main_tester.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/styles/AdvancedStyleClient/Styles/ADV_style_method_parent_main_tester.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/mx/styles/AdvancedStyleClient/Styles/ADV_style_method_parent_main_tester.mxml
Tue Aug  7 17:13:06 2012
@@ -0,0 +1,128 @@
+<?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="mx/styles/AdvancedStyleClient/Styles/"  
+			xmlns:mx="http://www.adobe.com/2006/mxml" 
+			xmlns:s="library://ns.adobe.com/flex/spark" 
+			xmlns="*" 
+			testSWF="ADV_style_method_parent_main.mxml">
+	
+	<mx:Script>
+		<![CDATA[
+			import assets.styleTest.ADVStyleTestClass;
+			import assets.styleTest.ADVStyleTestVo;
+			import assets.styleTest.ADVStyleTestConstants;
+			import assets.styleTest.ADVStyleTestEvent;
+			
+			
+			import mx.collections.ArrayCollection;
+			import mx.collections.IList;
+			import mx.collections.XMLListCollection;		
+			
+			public static function init(o:DisplayObject):void
+			{
+				
+			}
+		]]>
+	</mx:Script>
+	
+	<mx:Metadata>
+		<![CDATA[
+		[Mixin]
+		]]>
+	</mx:Metadata>
+	
+	<testCases>
+		<!--This test case is to test get styleParent() and set styleParent() method in ActionScript
codes-->
+		<TestCase testID="ADV_method_styleParent_class_test1" 
+				  description="This test case is to test get styleParent() and set styleParent() method
in ActionScript codes" 
+				  keywords="[ADVStyleTestClass, styleParent]">
+			<setup>
+				<RunCode code="application.teststyleParent()"/>
+				<Pause timeout="100" />
+			</setup>
+			<body>
+				<!--test get styleParent-->
+				<AssertMethodValue method="value=application.testStyle.styleParent" 
+								   value="ADV_style_method_parent_main0.ApplicationSkin2._ApplicationSkin_Group1.contentGroup.labelParent"/>
+				
+				<!--test non-inheritance style-->
+				<AssertMethodValue method="value=application.testStyle.getStyle('teststyle_1_string_noinh')"
value="defaultString"/>
+				
+				<!--test inheritance style-->
+				<AssertMethodValue method="value=application.testStyle.getStyle('teststyle_3_uint_inh')"
valueExpression="value=67"/>
+			</body>
+		</TestCase>
+		
+		<!--This test case is to test addStyleClient() method in ActionScript codes-->
+		<TestCase testID="ADV_method_styleClient_add_test2" 
+				  description="This test case is to test addStyleClient() method in ActionScript codes"

+				  keywords="[ADVStyleTestClass, addStyleClient]">
+			<setup>
+				<RunCode code="application.teststyleClient()"/>
+				<Pause timeout="100" />
+			</setup>
+			<body>
+				<!--test non-inheritance style-->
+				<AssertMethodValue method="value=application.myStyle.getStyle('teststyle_1_string_noinh')"
value="defaultString"/>
+				<AssertMethodValue method="value=application.myStyle.getStyle('teststyle_2_number_noinh')"
valueExpression="value=undefined"/>
+				
+				<!--test inheritance style-->
+				<AssertMethodValue method="value=application.myStyle.getStyle('teststyle_3_uint_inh')"
valueExpression="value=456"/>
+			</body>
+		</TestCase>
+		
+		<!--This test case is to test removeStyleClient() method in ActionScript codes-->
+		<TestCase testID="ADV_method_styleClient_change_test3" 
+				  description="This test case is to test removeStyleClient() method in ActionScript codes"

+				  keywords="[ADVStyleTestClass, removeStyleClient]">
+			<setup>
+				<RunCode code="application.teststyleClient()"/>
+				<RunCode code="application.removestyleClient()"/>
+				<Pause timeout="100" />
+			</setup>
+			<body>
+				<!--test non-inheritance style-->
+				<AssertMethodValue method="value=application.myStyle.getStyle('teststyle_1_string_noinh')"
value="defaultString" />
+				<AssertMethodValue method="value=application.myStyle.getStyle('teststyle_5_format_length_noinh')"
valueExpression="value=30"/>
+				
+				<!--test inheritance style-->
+				<AssertMethodValue method="value=application.myStyle.getStyle('teststyle_3_uint_inh')"
valueExpression="value=123"/>
+			</body>
+		</TestCase>
+		
+		<!--This test case is to test automatically removes the styleClient from one UI component
before adding it to another in ActionScript codes-->
+		<TestCase testID="ADV_method_styleClient_change_test4" 
+				  description="This test case is to test automatically removes the styleClient from one
UI component before adding it to another in ActionScript codes" 
+				  keywords="[ADVStyleTestClass, removeStyleClient]">
+			<setup>
+				<RunCode code="application.testAutoClient()"/>
+				<Pause timeout="100" />
+			</setup>
+			<body>
+				<!--test non-inheritance style-->
+				<AssertMethodValue method="value=application.myStyle.getStyle('teststyle_1_string_noinh')"
value="defaultString" />
+				<AssertMethodValue method="value=application.myStyle.getStyle('teststyle_5_format_length_noinh')"
valueExpression="value=30"/>
+				
+				<!--test inheritance style-->
+				<AssertMethodValue method="value=application.myStyle.getStyle('teststyle_3_uint_inh')"
valueExpression="value=123"/>
+			</body>
+		</TestCase>
+	</testCases>
+</UnitTester>
\ No newline at end of file

Added: incubator/flex/trunk/mustella/tests/mx/utils/ColorUtil/SWFs/ColorUtil_main.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/ColorUtil/SWFs/ColorUtil_main.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/utils/ColorUtil/SWFs/ColorUtil_main.mxml (added)
+++ incubator/flex/trunk/mustella/tests/mx/utils/ColorUtil/SWFs/ColorUtil_main.mxml Tue Aug
 7 17:13:06 2012
@@ -0,0 +1,28 @@
+<?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:mx="library://ns.adobe.com/flex/mx"
+    xmlns:s="library://ns.adobe.com/flex/spark"
+    height="500" width="500"
+    backgroundColor="0xFFFFFF">
+
+
+</s:Application>

Added: incubator/flex/trunk/mustella/tests/mx/utils/ColorUtil/method/ColorUtil_method.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/ColorUtil/method/ColorUtil_method.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/utils/ColorUtil/method/ColorUtil_method.mxml (added)
+++ incubator/flex/trunk/mustella/tests/mx/utils/ColorUtil/method/ColorUtil_method.mxml Tue
Aug  7 17:13:06 2012
@@ -0,0 +1,126 @@
+<?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="mx/utils/ColorUtil/method/"  
+    xmlns:mx="http://www.adobe.com/2006/mxml" 
+    xmlns="*" 
+    testSWF="../SWFs/ColorUtil_main.mxml">
+
+    <!-- this set of lines form a template that must be in each unit test -->
+    <mx:Script>
+        <![CDATA[
+        import mx.utils.ColorUtil;
+        public static function init(o:DisplayObject):void{}
+        ]]>
+    </mx:Script>
+
+    <mx:Metadata>
+        <![CDATA[
+        [Mixin]
+        ]]>
+    </mx:Metadata>
+    <!-- end of set of lines that must be in each unit test -->
+
+    <testCases>
+
+        <!-- adjustBrightness -->
+        <TestCase testID="ColorUtil_adjustBrightness_uberNegative"  keywords="[ColorUtil,
method, adjustBrightness]" description="Test the adjustBrightness method with a number less
than -255.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.adjustBrightness(0xFF0077,
-1*0x000FFF)" value="0x000000"/>
+            </body>
+        </TestCase>
+        <TestCase testID="ColorUtil_adjustBrightness_negative"  keywords="[ColorUtil,
method, adjustBrightness]" description="Test the adjustBrightness method with a number between
color and 0.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.adjustBrightness(0xFF5577,
-1*0x000033)" value="0xCC2244"/>
+            </body>
+        </TestCase>
+        <TestCase testID="ColorUtil_adjustBrightness_zero"  keywords="[ColorUtil, method,
adjustBrightness]" description="Test the adjustBrightness method when adding 0.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.adjustBrightness(0xFF5577,
0x000000)" value="0xFF5577"/>
+            </body>
+        </TestCase>
+        <TestCase testID="ColorUtil_adjustBrightness_positive"  keywords="[ColorUtil,
method, adjustBrightness]" description="Test the adjustBrightness method with a number between
color and 255.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.adjustBrightness(0x333333,
0x000044)" value="0x777777"/>
+            </body>
+        </TestCase>
+        <TestCase testID="ColorUtil_adjustBrightness_uberPositive"  keywords="[ColorUtil,
method, adjustBrightness]" description="Test the adjustBrightness method with a number greater
than 255.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.adjustBrightness(0xFF5577,
0x000FFF)" value="0xFFFFFF"/>
+            </body>
+        </TestCase>
+        <TestCase testID="ColorUtil_adjustBrightness_bleed"  keywords="[ColorUtil, method,
adjustBrightness]" description="Test the adjustBrightness method with a number that may cause
bleeding into higher channels.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.adjustBrightness(0x0000AA,
0x000077)" value="0x7777FF"/>
+            </body>
+        </TestCase>
+
+        <!-- adjustBrightness2 -->
+        <TestCase testID="ColorUtil_adjustBrightness2_min"  keywords="[ColorUtil, method,
adjustBrightness2]" description="Test the adjustBrightness2 method with a number less than
-255.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.adjustBrightness2(0xFF0077,
-100)" value="0x000000"/>
+            </body>
+        </TestCase>
+        <TestCase testID="ColorUtil_adjustBrightness2_negative"  keywords="[ColorUtil,
method, adjustBrightness2]" description="Test the adjustBrightness2 method with a number between
color and 0.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.adjustBrightness2(0xFFFFFF,
-50)" value="0x7F7F7F"/>
+            </body>
+        </TestCase>
+        <TestCase testID="ColorUtil_adjustBrightness2_zero"  keywords="[ColorUtil, method,
adjustBrightness2]" description="Test the adjustBrightness2 method when adding 0.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.adjustBrightness2(0xFF5577,
0x000000)" value="0xFF5577"/>
+            </body>
+        </TestCase>
+        <TestCase testID="ColorUtil_adjustBrightness2_positive"  keywords="[ColorUtil,
method, adjustBrightness2]" description="Test the adjustBrightness2 method with a number between
color and 255.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.adjustBrightness2(0x000000,
50)" value="0x7F7F7F"/>
+            </body>
+        </TestCase>
+        <TestCase testID="ColorUtil_adjustBrightness2_max"  keywords="[ColorUtil, method,
adjustBrightness2]" description="Test the adjustBrightness2 method with a number greater than
255.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.adjustBrightness2(0xFF0077,
100)" value="0xFFFFFF"/>
+            </body>
+        </TestCase>
+
+        <!-- rgbMultiply -->
+        <TestCase testID="ColorUtil_rgbMultiply_white"  keywords="[ColorUtil, method,
rgbMultiply]" description="Test the rgbMultiply method with white changes nothing.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.rgbMultiply(0xFF0077, 0xFFFFFF)"
value="0xFF0077"/>
+            </body>
+        </TestCase>
+        <TestCase testID="ColorUtil_rgbMultiply_multiChannel"  keywords="[ColorUtil, method,
rgbMultiply]" description="Test the rgbMultiply method with across individual channels.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.rgbMultiply(0xFF0077, 0x335522)"
value="0x33000F"/>
+            </body>
+        </TestCase>
+        <TestCase testID="ColorUtil_rgbMultiply_black"  keywords="[ColorUtil, method,
rgbMultiply]" description="Test the rgbMultiply method with white changes nothing.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.rgbMultiply(0xFF0077, 0x000000)"
value="0x000000"/>
+            </body>
+        </TestCase>
+        <TestCase testID="ColorUtil_rgbMultiply_blackMultiChannel"  keywords="[ColorUtil,
method, rgbMultiply]" description="Test the rgbMultiply method with across individual channels.">
+            <body>
+                <AssertMethodValue method="value=ColorUtil.rgbMultiply(0xFF0077, 0x00FF00)"
value="0x000000"/>
+            </body>
+        </TestCase>
+
+
+    </testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/MediaQueryParser_Integration.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/MediaQueryParser_Integration.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/MediaQueryParser_Integration.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/MediaQueryParser_Integration.mxml
Tue Aug  7 17:13:06 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 
+    xmlns:fx="http://ns.adobe.com/mxml/2009" 
+    xmlns:s="library://ns.adobe.com/flex/spark" 
+    xmlns="*" 
+    testDir="mx/utils/MediaQueryParser/integration/"
+    testSWF="MediaQueryApp.mxml">
+    
+    <fx:Script><![CDATA[ public static function init(o:DisplayObject):void { } ]]></fx:Script>
+    <fx:Metadata><![CDATA[ [Mixin] ]]></fx:Metadata>
+
+    <testCases>
+		<TestCase testID="MediaQueryParser_Integration_TypeSelectors" keywords="[CSS, Media,
Query, Style, Integration]" description="Ensure media queries work with button type selectors">
+			<body>
+				<CompareBitmap target="typeSelectorButton" url="../integration/baselines/">
+					<ConditionalValue os="win" />
+					<ConditionalValue os="mac" />
+				</CompareBitmap>
+			</body>
+		</TestCase>
+		<TestCase testID="MediaQueryParser_Integration_ClassSelectors" keywords="[CSS, Media,
Query, Style, Integration]" description="Ensure media queries work with button class selectors">
+			<body>
+				<CompareBitmap target="classSelectorButton" url="../integration/baselines/">
+					<ConditionalValue os="win" />
+					<ConditionalValue os="mac" />
+				</CompareBitmap>
+			</body>
+		</TestCase>
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/MediaQueryParser_Integration_CSSModule.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/MediaQueryParser_Integration_CSSModule.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/MediaQueryParser_Integration_CSSModule.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/MediaQueryParser_Integration_CSSModule.mxml
Tue Aug  7 17:13:06 2012
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<UnitTester 
+    xmlns:fx="http://ns.adobe.com/mxml/2009" 
+    xmlns:s="library://ns.adobe.com/flex/spark" 
+    xmlns="*" 
+    testDir="mx/utils/MediaQueryParser/integration/"
+    testSWF="MediaQueryCSSModuleApp.mxml">
+    
+    <fx:Script><![CDATA[ public static function init(o:DisplayObject):void { } ]]></fx:Script>
+    <fx:Metadata><![CDATA[ [Mixin] ]]></fx:Metadata>
+
+    <testCases>
+		<TestCase testID="MediaQueryParser_Integration_CSSModule_TypeSelectors" keywords="[CSS,
Media, Query, Style, Integration]" description="Ensure media queries work with CSS modules">
+			<setup>
+				<RunCode code="application.loadCSSModule()" waitEvent="cssModuleLoaded" waitTarget="loadButton"
/>
+			</setup>
+			<body>
+				<CompareBitmap target="typeSelectorButton" url="../integration/baselines/">
+					<ConditionalValue os="win" />
+					<ConditionalValue os="mac" />
+				</CompareBitmap>
+			</body>
+		</TestCase>
+		<TestCase testID="MediaQueryParser_Integration_CSSModule_ClassSelectors" keywords="[CSS,
Media, Query, Style, Integration]" description="Ensure media queries work with class selectors
in CSS module">
+			<setup>
+				<RunCode code="application.loadCSSModule()" waitEvent="cssModuleLoaded" waitTarget="loadButton"
/>
+			</setup>
+			<body>
+				<CompareBitmap target="classSelectorButton" url="../integration/baselines/">
+					<ConditionalValue os="win" />
+					<ConditionalValue os="mac" />
+				</CompareBitmap>
+			</body>
+		</TestCase>
+	</testCases>
+</UnitTester>

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_CSSModule_ClassSelectors@mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_CSSModule_ClassSelectors%40mac.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_CSSModule_ClassSelectors@mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_CSSModule_ClassSelectors@win.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_CSSModule_ClassSelectors%40win.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_CSSModule_ClassSelectors@win.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_CSSModule_TypeSelectors@mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_CSSModule_TypeSelectors%40mac.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_CSSModule_TypeSelectors@mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_CSSModule_TypeSelectors@win.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_CSSModule_TypeSelectors%40win.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_CSSModule_TypeSelectors@win.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_ClassSelectors@mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_ClassSelectors%40mac.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_ClassSelectors@mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_ClassSelectors@win.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_ClassSelectors%40win.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_ClassSelectors@win.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_TypeSelectors@mac.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_TypeSelectors%40mac.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_TypeSelectors@mac.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_TypeSelectors@win.png
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_TypeSelectors%40win.png?rev=1370370&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/integration/baselines/MediaQueryParser_Integration_TypeSelectors@win.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/MediaQueryApp.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/MediaQueryApp.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/MediaQueryApp.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/MediaQueryApp.mxml
Tue Aug  7 17:13:06 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.
+
+-->
+<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"
+			   width="400"
+			   height="400">
+	<fx:Style>
+		@namespace s "library://ns.adobe.com/flex/spark";
+		@namespace mx "library://ns.adobe.com/flex/mx";
+		
+		s|Button
+		{
+			chromeColor: #999999;
+		}
+		
+		.buttonStyle 
+		{
+			chromeColor: #AAAAAA;
+		}
+		
+		@media screen and (os-platform: "Windows")
+		{
+			s|Button
+			{
+				chromeColor: #990000;
+			}
+			.buttonStyle
+			{
+				chromeColor: #999900;
+			}
+		}
+		
+		@media all and (os-platform: "Macintosh")
+		{
+			s|Button
+			{
+				chromeColor: #009900;
+			}
+			.buttonStyle
+			{
+				chromeColor: #009999;	
+			}
+		}
+		
+		@media (os-platform: "Linux")
+		{
+			s|Button
+			{
+				chromeColor: #000099;
+			}
+			.buttonStyle
+			{
+				chromeColor: #993300;
+			}
+		}
+	</fx:Style>
+	
+	<s:VGroup left="10" right="10" bottom="10" top="10">
+		<s:Button id="typeSelectorButton" width="100" height="40" />
+		<s:Label fontWeight="bold" text="Type Selector Expected Output:" fontSize="20" color="#666666"
/>
+		<s:Label text="Windows: red chrome" fontSize="16" color="#666666" />
+		<s:Label text="Macintosh: green chrome" fontSize="16" color="#666666" />
+		<s:Label text="Linux: blue chrome" fontSize="16" color="#666666" />
+		<s:Label text="Others: gray chrome" fontSize="16" color="#666666" />
+		<s:Spacer height="20" />
+		<s:Button id="classSelectorButton" width="100" height="40" styleName="buttonStyle" />
+		<s:Label fontWeight="bold" text="Class Selector Expected Output:" fontSize="20" color="#666666"
/>
+		<s:Label text="Windows: yellow chrome" fontSize="16" color="#666666" />
+		<s:Label text="Macintosh: teal chrome" fontSize="16" color="#666666" />
+		<s:Label text="Linux: orange chrome" fontSize="16" color="#666666" />
+		<s:Label text="Others: black text, gray chrome" fontSize="16" color="#666666" />
+	</s:VGroup>
+</s:Application>

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/MediaQueryCSSModuleApp.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/MediaQueryCSSModuleApp.mxml?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/MediaQueryCSSModuleApp.mxml
(added)
+++ incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/MediaQueryCSSModuleApp.mxml
Tue Aug  7 17:13:06 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"
+			   width="500"
+			   height="500">
+	
+	<fx:Script>
+		<![CDATA[
+			import mx.events.StyleEvent;
+			public function loadCSSModule():void
+			{
+				var eventDispatcher:IEventDispatcher = styleManager.loadStyleDeclarations("assets/MediaQueryCSSModule.swf");
+				eventDispatcher.addEventListener(StyleEvent.COMPLETE, stylesLoadedHandler);
+			}
+			
+			public function stylesLoadedHandler(event:StyleEvent):void
+			{
+				loadButton.dispatchEvent(new Event("cssModuleLoaded"));
+			}
+		]]>
+	</fx:Script>
+	
+	<s:VGroup left="10" right="10" bottom="10" top="10">
+		<s:Button id="typeSelectorButton" width="100" height="40" />
+		<s:Label fontWeight="bold" text="Type Selector Expected Output:" fontSize="20" color="#666666"
/>
+		<s:Label text="Windows: red chrome" fontSize="16" color="#666666" />
+		<s:Label text="Macintosh: green chrome" fontSize="16" color="#666666" />
+		<s:Label text="Linux: blue chrome" fontSize="16" color="#666666" />
+		<s:Label text="Others: gray chrome" fontSize="16" color="#666666" />
+		<s:Spacer height="20" />
+		<s:Button id="classSelectorButton" width="100" height="40" styleName="buttonStyle" />
+		<s:Label fontWeight="bold" text="Class Selector Expected Output:" fontSize="20" color="#666666"
/>
+		<s:Label text="Windows: yellow chrome" fontSize="16" color="#666666" />
+		<s:Label text="Macintosh: teal chrome" fontSize="16" color="#666666" />
+		<s:Label text="Linux: orange chrome" fontSize="16" color="#666666" />
+		<s:Label text="Others: black text, gray chrome" fontSize="16" color="#666666" />
+		<s:Spacer height="20" />
+		<s:Button id="loadButton" label="Load CSS Module" click="loadCSSModule()" />
+	</s:VGroup>
+</s:Application>

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/assets/MediaQueryCSSModule.css
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/assets/MediaQueryCSSModule.css?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/assets/MediaQueryCSSModule.css
(added)
+++ incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/assets/MediaQueryCSSModule.css
Tue Aug  7 17:13:06 2012
@@ -0,0 +1,67 @@
+/*
+ *
+ * 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.
+ *
+ */
+/* CSS file */
+@namespace s "library://ns.adobe.com/flex/spark";
+@namespace mx "library://ns.adobe.com/flex/mx";
+
+s|Button
+{
+	chromeColor: #999999;
+}
+
+.buttonStyle 
+{
+	chromeColor: #AAAAAA;
+}
+
+@media screen and (os-platform: "Windows")
+{
+	s|Button
+	{
+			chromeColor: #990000;
+	}
+	.buttonStyle
+	{
+		chromeColor: #999900;
+	}
+}
+
+@media all and (os-platform: "Macintosh")
+{
+	s|Button
+	{
+		chromeColor: #009900;
+	}
+	.buttonStyle
+	{
+		chromeColor: #009999;	
+	}
+}
+
+@media (os-platform: "Linux")
+{
+	s|Button
+	{
+		chromeColor: #000099;
+	}
+	.buttonStyle
+	{
+		chromeColor: #993300;
+	}
+}

Added: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/pre_compile.sh
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/pre_compile.sh?rev=1370370&view=auto
==============================================================================
--- incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/pre_compile.sh (added)
+++ incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/pre_compile.sh Tue
Aug  7 17:13:06 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.
+##
+################################################################################
+cd assets
+
+echo "Removing previously compiled files..."
+rm -f `find . -name "*.swf"`
+
+echo "Compiling module SWFs... "
+
+$SDK_DIR/bin/mxmlc MediaQueryCSSModule.css

Propchange: incubator/flex/trunk/mustella/tests/mx/utils/MediaQueryParser/swfs/pre_compile.sh
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message