flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [1/5] git commit: [flex-sdk] - Changed to support 480 dpi tests
Date Thu, 25 Apr 2013 03:08:17 GMT
Updated Branches:
  refs/heads/480dpi 1c99ada89 -> d26f25b82
  refs/heads/develop 02df7e50b -> 6d5db9e42


Changed to support 480 dpi tests


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

Branch: refs/heads/480dpi
Commit: d733aa18c50cb5e6e6a9a8c473ef81eccdb8acc6
Parents: 1c99ada
Author: Justin Mclean <jmclean@apache.org>
Authored: Thu Apr 25 12:58:51 2013 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Thu Apr 25 12:58:51 2013 +1000

----------------------------------------------------------------------
 .../tests/applicationDPI_160.mxml                  |    9 +-
 .../tests/applicationDPI_240.mxml                  |    9 +-
 .../tests/applicationDPI_320.mxml                  |    8 +-
 .../tests/applicationDPI_480.mxml                  |  117 +++++++++++++++
 .../tests/applicationDPI_none.mxml                 |    2 +
 5 files changed, 137 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d733aa18/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_160.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_160.mxml
b/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_160.mxml
index bfb7e17..0f7620b 100644
--- a/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_160.mxml
+++ b/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_160.mxml
@@ -72,6 +72,7 @@
 					<ConditionalValue deviceDensity="160" value="1"/>
 					<ConditionalValue deviceDensity="240" value="1.5"/>
 					<ConditionalValue deviceDensity="320" value="2"/>
+					<ConditionalValue deviceDensity="480" value="4"/>
 				</AssertPropertyValue>	
 			
 			</body>
@@ -86,6 +87,7 @@
 					<ConditionalValue deviceDensity="160" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth"/>
 					<ConditionalValue deviceDensity="240" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth/1.5"/>
 					<ConditionalValue deviceDensity="320" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth/2"/>
+					<ConditionalValue deviceDensity="480" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth"/>
 				</AssertPropertyValue>	
 			</body>
 			
@@ -100,9 +102,10 @@
 					<ConditionalValue deviceDensity="240" os="android" />
 					<ConditionalValue deviceDensity="160" os="win" />
 					<ConditionalValue deviceDensity="320" os="win" />
-
-							<ConditionalValue deviceDensity="320" os="iphone" />
-							<ConditionalValue deviceDensity="160" os="qnx" />
+					<ConditionalValue deviceDensity="320" os="iphone" />
+					<ConditionalValue deviceDensity="160" os="qnx" />
+					<ConditionalValue deviceDensity="320" os="android" />
+					<ConditionalValue deviceDensity="480" os="android" />
 				</CompareBitmap>	
 			</body>
 					

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d733aa18/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_240.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_240.mxml
b/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_240.mxml
index 42a1eb9..d82a72d 100644
--- a/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_240.mxml
+++ b/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_240.mxml
@@ -72,6 +72,7 @@
 					<ConditionalValue deviceDensity="160" value="0.666667"/>
 					<ConditionalValue deviceDensity="240" value="1"/>
 					<ConditionalValue deviceDensity="320" value="1.333333"/>
+					<ConditionalValue deviceDensity="480" value="2"/>
 				</AssertPropertyValue>	
 			
 			</body>
@@ -87,6 +88,7 @@
 					<ConditionalValue deviceDensity="160" valueExpression="value=Math.round(FlexGlobals.topLevelApplication.stage.stageWidth/0.666667)"/>
 					<ConditionalValue deviceDensity="240" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth"/>
 					<ConditionalValue deviceDensity="320" valueExpression="value=Math.round(FlexGlobals.topLevelApplication.stage.stageWidth/1.333333)"/>
+					<ConditionalValue deviceDensity="320" valueExpression="value=Math.round(FlexGlobals.topLevelApplication.stage.stageWidth/2)"/>
 				</AssertPropertyValue>	
 			</body>
 			
@@ -100,9 +102,10 @@
 					<ConditionalValue deviceDensity="240" os="android" />
 					<ConditionalValue deviceDensity="160" os="win" />
 					<ConditionalValue deviceDensity="320" os="win" />
-
-							<ConditionalValue deviceDensity="320" os="iphone" />
-							<ConditionalValue deviceDensity="160" os="qnx" />
+					<ConditionalValue deviceDensity="320" os="iphone" />
+					<ConditionalValue deviceDensity="160" os="qnx" />
+					<ConditionalValue deviceDensity="320" os="android" />
+					<ConditionalValue deviceDensity="480" os="android" />
 				</CompareBitmap>	
 			</body>
 					

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d733aa18/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_320.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_320.mxml
b/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_320.mxml
index 9c0e256..7a18630 100644
--- a/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_320.mxml
+++ b/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_320.mxml
@@ -72,6 +72,7 @@
 					<ConditionalValue deviceDensity="160" value="0.5"/>
 					<ConditionalValue deviceDensity="240" value="0.75"/>
 					<ConditionalValue deviceDensity="320" value="1"/>
+					<ConditionalValue deviceDensity="480" value="1.5"/>
 				</AssertPropertyValue>	
 			
 			</body>
@@ -86,6 +87,7 @@
 					<ConditionalValue deviceDensity="160" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth/0.5"/>
 					<ConditionalValue deviceDensity="240" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth/0.75"/>
 					<ConditionalValue deviceDensity="320" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth"/>
+					<ConditionalValue deviceDensity="480" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth*2"/>
 				</AssertPropertyValue>	
 			</body>
 			
@@ -99,8 +101,10 @@
 					<ConditionalValue deviceDensity="240" os="android" />
 					<ConditionalValue deviceDensity="160" os="win" />
 					<ConditionalValue deviceDensity="320" os="win" />
-							<ConditionalValue deviceDensity="320" os="iphone" />
-							<ConditionalValue deviceDensity="160" os="qnx" />
+					<ConditionalValue deviceDensity="320" os="iphone" />
+					<ConditionalValue deviceDensity="160" os="qnx" />
+					<ConditionalValue deviceDensity="320" os="android" />
+					<ConditionalValue deviceDensity="480" os="android" />
 				</CompareBitmap>	
 			</body>
 					

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d733aa18/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_480.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_480.mxml
b/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_480.mxml
new file mode 100644
index 0000000..9c8160e
--- /dev/null
+++ b/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_480.mxml
@@ -0,0 +1,117 @@
+<?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="mobile/DensityIndependentScaling/tests/"  xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns="*"

+			testSWF="ViewNavigatorApplication480dpi.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 -->
+	
+	<fx:Script>
+		<![CDATA[
+			//import components.*;
+			import mx.core.FlexGlobals;
+		]]>
+	</fx:Script>
+	
+	<testCases>
+		
+		<TestCase testID="Get_applicationDPI" description="applicationDPI is set to  in MXML"
keywords="[ViewNavigatorApplication, properties, applicationDPI]">
+
+			<body>
+				<AssertPropertyValue target="" propertyName="applicationDPI" value="480" />
+			</body>
+		
+		</TestCase>
+
+		<!-- Set a bogus value. No error but should not be set. -->
+		<TestCase  testID="Set_applicationDPI_at_runtime" description="Should not change the
value." keywords="[ViewNavigatorApplication, properties, applicationDPI]">
+			<setup>
+				<SetProperty target="" propertyName="applicationDPI" value="777" />
+			</setup>
+			<body>
+			<AssertPropertyValue target="" propertyName="applicationDPI" value="480" />
+			</body>
+			
+		</TestCase>
+		
+		<TestCase testID="Check_scaling" description="" keywords="[ViewNavigatorApplication,
properties, applicationDPI]">
+			
+			<body>
+				
+				<AssertPropertyValue target="" propertyName="scalingFactor" value="0.500000" >
+					<ConditionalValue deviceDensity="160" value="0.25"/>
+					<ConditionalValue deviceDensity="240" value="0.5"/>
+					<ConditionalValue deviceDensity="320" value="0.75"/>
+					<ConditionalValue deviceDensity="480" value="1"/>
+				</AssertPropertyValue>	
+			
+			</body>
+	
+		</TestCase>
+		
+		<TestCase testID="Check_screen_size" description="" keywords="[ViewNavigatorApplication,
properties, applicationDPI]">
+			
+			<body>
+				
+				<AssertPropertyValue target="" propertyName="screenWidth" value="1000">
+					<ConditionalValue deviceDensity="160" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth/0.25"/>
+					<ConditionalValue deviceDensity="240" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth/0.5"/>
+					<ConditionalValue deviceDensity="320" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth/0.75"/>
+					<ConditionalValue deviceDensity="480" valueExpression="value=FlexGlobals.topLevelApplication.stage.stageWidth"/>
+				</AssertPropertyValue>	
+			</body>
+			
+		</TestCase>
+
+		<TestCase testID="Check_bitmap_320" description="" keywords="[ViewNavigatorApplication,
properties, applicationDPI]">
+					
+			<body>
+				<!-- Noticed pixel differences between win 160 and qnx 160. These really shouldn't
be happening. -->		
+				<CompareBitmap target="navigator.activeView.redSquare" url="../tests/baselines">
+					<ConditionalValue deviceDensity="240" os="android" />
+					<ConditionalValue deviceDensity="160" os="win" />
+					<ConditionalValue deviceDensity="320" os="win" />
+					<ConditionalValue deviceDensity="320" os="iphone" />
+					<ConditionalValue deviceDensity="160" os="qnx" />
+					<ConditionalValue deviceDensity="320" os="android" />
+					<ConditionalValue deviceDensity="480" os="android" />
+				</CompareBitmap>	
+			</body>
+					
+		</TestCase>
+
+		
+		
+	</testCases>
+	
+</UnitTester>

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/d733aa18/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_none.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_none.mxml
b/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_none.mxml
index 4cb4109..5d3ff2e 100644
--- a/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_none.mxml
+++ b/mustella/tests/mobile/DensityIndependentScaling/tests/applicationDPI_none.mxml
@@ -52,6 +52,7 @@
 					<ConditionalValue deviceDensity="160" value="160"/>
 					<ConditionalValue deviceDensity="240" value="240"/>
 					<ConditionalValue deviceDensity="320" value="320"/>
+					<ConditionalValue deviceDensity="480" value="480"/>
 				</AssertPropertyValue>
 			</body>
 		
@@ -67,6 +68,7 @@
 				<ConditionalValue deviceDensity="160" value="160"/>
 				<ConditionalValue deviceDensity="240" value="240"/>
 				<ConditionalValue deviceDensity="320" value="320"/>
+				<ConditionalValue deviceDensity="480" value="480"/>
 			</AssertPropertyValue>
 		
 		


Mime
View raw message