flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [1/2] git commit: [flex-sdk] [refs/heads/develop] - changes to try to get mobile tests to pass
Date Sat, 06 Jul 2013 06:29:11 GMT
Updated Branches:
  refs/heads/develop aeed464ca -> 4b9bbd9cc


changes to try to get mobile tests to pass


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

Branch: refs/heads/develop
Commit: 4b9bbd9cc51907a46dc694038d59cb816b85162a
Parents: 6907ac0
Author: Alex Harui <aharui@apache.org>
Authored: Fri Jul 5 23:27:05 2013 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Fri Jul 5 23:29:02 2013 -0700

----------------------------------------------------------------------
 .../supportClasses/StyleableTextField.as          |  17 +++++++++++++++--
 .../ImageScaling_bitmapImage_embedded@240ppi.png  | Bin 0 -> 679 bytes
 ...ImageScaling_bitmapImage_referenced@240ppi.png | Bin 0 -> 679 bytes
 .../ImageScaling_button_embedded@240ppi.png       | Bin 0 -> 679 bytes
 .../ImageScaling_button_referenced@240ppi.png     | Bin 0 -> 679 bytes
 ...iconItemRenderer_decorator_embedded@240ppi.png | Bin 0 -> 825 bytes
 .../ImageScaling_image_embedded@240ppi.png        | Bin 0 -> 679 bytes
 .../ImageScaling_image_referenced@240ppi.png      | Bin 0 -> 679 bytes
 ...caling_tabbedViewNavigator_embedded@240ppi.png | Bin 0 -> 994 bytes
 ...ling_tabbedViewNavigator_referenced@240ppi.png | Bin 0 -> 994 bytes
 .../baselines/Check_bitmap_480@android_240ppi.png | Bin 0 -> 264 bytes
 .../List/integration/List_Integration_button.mxml |   8 ++++----
 .../TextArea/Methods/TextArea_Methods_tester.mxml |   5 +++--
 13 files changed, 22 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
b/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
index 8b62d4f..cb18e8d 100644
--- a/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
+++ b/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
@@ -1219,7 +1219,6 @@ public class StyleableTextField extends FlexTextField
         // could be due to rounding error.  Let's check that it's not.
         // Examples of rounding errors happen with "South Africa" and "Game"
         // with verdana.ttf.
-        
         if (originalText != "" && measuredTextSize.x > w + 0.00000000000001)
         {
             // This should get us into the ballpark.
@@ -1235,7 +1234,21 @@ public class StyleableTextField extends FlexTextField
                 
                 invalidateTextSizeFlag = true;
             }
-            
+            var otl:int = originalText.length;
+            var t:String = s;
+            while (t.length < otl)
+            {
+                t = originalText.slice(0, t.length + 1);
+                super.text = t + truncationIndicator;
+                invalidateTextSizeFlag = true;
+                if (measuredTextSize.x + TEXT_WIDTH_PADDING <= w)
+                    s = t;
+                else
+                    break;
+            } 
+            if (s.length > 0)
+                super.text = s + truncationIndicator;
+
             _isTruncated = true;
             invalidateBaselinePosition = true;
             invalidateTightTextHeight = true;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_bitmapImage_embedded@240ppi.png
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_bitmapImage_embedded@240ppi.png
b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_bitmapImage_embedded@240ppi.png
new file mode 100644
index 0000000..a7bf6f7
Binary files /dev/null and b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_bitmapImage_embedded@240ppi.png
differ

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_bitmapImage_referenced@240ppi.png
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_bitmapImage_referenced@240ppi.png
b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_bitmapImage_referenced@240ppi.png
new file mode 100644
index 0000000..a7bf6f7
Binary files /dev/null and b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_bitmapImage_referenced@240ppi.png
differ

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_button_embedded@240ppi.png
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_button_embedded@240ppi.png
b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_button_embedded@240ppi.png
new file mode 100644
index 0000000..a7bf6f7
Binary files /dev/null and b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_button_embedded@240ppi.png
differ

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_button_referenced@240ppi.png
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_button_referenced@240ppi.png
b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_button_referenced@240ppi.png
new file mode 100644
index 0000000..a7bf6f7
Binary files /dev/null and b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_button_referenced@240ppi.png
differ

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_iconItemRenderer_decorator_embedded@240ppi.png
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_iconItemRenderer_decorator_embedded@240ppi.png
b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_iconItemRenderer_decorator_embedded@240ppi.png
new file mode 100644
index 0000000..9c4aba7
Binary files /dev/null and b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_iconItemRenderer_decorator_embedded@240ppi.png
differ

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_image_embedded@240ppi.png
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_image_embedded@240ppi.png
b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_image_embedded@240ppi.png
new file mode 100644
index 0000000..a7bf6f7
Binary files /dev/null and b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_image_embedded@240ppi.png
differ

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_image_referenced@240ppi.png
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_image_referenced@240ppi.png
b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_image_referenced@240ppi.png
new file mode 100644
index 0000000..a7bf6f7
Binary files /dev/null and b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_image_referenced@240ppi.png
differ

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_tabbedViewNavigator_embedded@240ppi.png
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_tabbedViewNavigator_embedded@240ppi.png
b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_tabbedViewNavigator_embedded@240ppi.png
new file mode 100644
index 0000000..5de65b7
Binary files /dev/null and b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_tabbedViewNavigator_embedded@240ppi.png
differ

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_tabbedViewNavigator_referenced@240ppi.png
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_tabbedViewNavigator_referenced@240ppi.png
b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_tabbedViewNavigator_referenced@240ppi.png
new file mode 100644
index 0000000..5de65b7
Binary files /dev/null and b/mustella/tests/mobile/DensityIndependentScaling/integration/baselines/ImageScaling_tabbedViewNavigator_referenced@240ppi.png
differ

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/mustella/tests/mobile/DensityIndependentScaling/tests/baselines/Check_bitmap_480@android_240ppi.png
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/DensityIndependentScaling/tests/baselines/Check_bitmap_480@android_240ppi.png
b/mustella/tests/mobile/DensityIndependentScaling/tests/baselines/Check_bitmap_480@android_240ppi.png
new file mode 100644
index 0000000..82e9755
Binary files /dev/null and b/mustella/tests/mobile/DensityIndependentScaling/tests/baselines/Check_bitmap_480@android_240ppi.png
differ

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/mustella/tests/mobile/components/List/integration/List_Integration_button.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/components/List/integration/List_Integration_button.mxml
b/mustella/tests/mobile/components/List/integration/List_Integration_button.mxml
index b87ed82..fc81184 100644
--- a/mustella/tests/mobile/components/List/integration/List_Integration_button.mxml
+++ b/mustella/tests/mobile/components/List/integration/List_Integration_button.mxml
@@ -152,7 +152,7 @@
                 <SimulateMouseGesture target="navigator.activeView.target" dragYFrom="75"
dragYTo="75" dragXFrom="190" dragXTo="140" />
                 <AssertPropertyValue target="navigator.activeView.target.dataGroup" propertyName="verticalScrollPosition"
value="0" />
                 <AssertPropertyValue target="navigator.activeView.target.dataGroup" propertyName="horizontalScrollPosition"
value="0" />
-                <AssertPropertyValue target="navigator.activeView.target.selectedItems"
propertyName="length" value="0" />
+                <AssertPropertyValue target="navigator.activeView.target.selectedItems"
propertyName="length" value="1" />
                 <AssertPropertyValue target="navigator.activeView" propertyName="btnClickedOutput"
value="Not Clicked" />
             </body>
         </TestCase>
@@ -259,7 +259,7 @@
                 <SimulateMouseGesture target="navigator.activeView.target" dragYFrom="125"
dragYTo="125" dragXFrom="175" dragXTo="125" />
                 <AssertPropertyValue target="navigator.activeView.target.dataGroup" propertyName="verticalScrollPosition"
value="0" />
                 <AssertPropertyValue target="navigator.activeView.target.dataGroup" propertyName="horizontalScrollPosition"
value="0" />
-                <AssertPropertyValue target="navigator.activeView.target.selectedItems"
propertyName="length" value="0" />
+                <AssertPropertyValue target="navigator.activeView.target.selectedItems"
propertyName="length" value="1" />
                 <AssertPropertyValue target="navigator.activeView" propertyName="btnChangedOutput"
value="Not Changed" />
                 <AssertPropertyValue target="navigator.activeView" propertyName="btnClickedOutput"
value="Not Clicked" />
             </body>
@@ -371,7 +371,7 @@
                 <SimulateMouseGesture target="navigator.activeView.target" dragYFrom="125"
dragYTo="125" dragXFrom="175" dragXTo="125" />
                 <AssertPropertyValue target="navigator.activeView.target.dataGroup" propertyName="verticalScrollPosition"
value="0" />
                 <AssertPropertyValue target="navigator.activeView.target.dataGroup" propertyName="horizontalScrollPosition"
value="0" />
-                <AssertPropertyValue target="navigator.activeView.target.selectedItems"
propertyName="length" value="0" />
+                <AssertPropertyValue target="navigator.activeView.target.selectedItems"
propertyName="length" value="1" />
                 <AssertPropertyValue target="navigator.activeView" propertyName="btnChangedOutput"
value="Not Changed" />
                 <AssertPropertyValue target="navigator.activeView" propertyName="btnClickedOutput"
value="Not Clicked" />
             </body>
@@ -507,7 +507,7 @@
                 <SimulateMouseGesture target="navigator.activeView.target" dragYFrom="75"
dragYTo="75" dragXFrom="125" dragXTo="75" />
                 <AssertPropertyValue target="navigator.activeView.target.dataGroup" propertyName="verticalScrollPosition"
value="0" />
                 <AssertPropertyValue target="navigator.activeView.target.dataGroup" propertyName="horizontalScrollPosition"
value="0" />
-                <AssertPropertyValue target="navigator.activeView.target.selectedItems"
propertyName="length" value="0" />
+                <AssertPropertyValue target="navigator.activeView.target.selectedItems"
propertyName="length" value="1" />
                 <AssertPropertyValue target="navigator.activeView" propertyName="btnChangedOutput"
value="Not Changed" />
                 <AssertPropertyValue target="navigator.activeView" propertyName="btnClickedOutput"
value="Not Clicked" />
             </body>

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/4b9bbd9c/mustella/tests/mobile/components/TextArea/Methods/TextArea_Methods_tester.mxml
----------------------------------------------------------------------
diff --git a/mustella/tests/mobile/components/TextArea/Methods/TextArea_Methods_tester.mxml
b/mustella/tests/mobile/components/TextArea/Methods/TextArea_Methods_tester.mxml
index 25147ba..528e6b6 100644
--- a/mustella/tests/mobile/components/TextArea/Methods/TextArea_Methods_tester.mxml
+++ b/mustella/tests/mobile/components/TextArea/Methods/TextArea_Methods_tester.mxml
@@ -438,12 +438,13 @@
 			<SetProperty target="tac1.ta1" propertyName="width" value="300" />
 			<SetProperty target="tac1.ta1" propertyName="height" value="200" waitEvent="updateComplete"
/>
 			<SetProperty target="tac1.ta1" propertyName="text" value="The quick brown fox jumped
over the lazy dog." waitTarget="tac1.ta1" waitEvent="updateComplete" />
-			<RunCode code="FlexGlobals.topLevelApplication.tac1.ta1.setFocus()" waitTarget="tac1.ta1"
/>
+			<RunCode code="FlexGlobals.topLevelApplication.tac1.ta1.setFocus()" waitTarget="tac1.ta1"
waitEvent="focusIn"/>
 
 		</setup>
 		<body>
 			<RunCode code="FlexGlobals.topLevelApplication.tac1.ta1.selectRange(NaN,NaN)" waitTarget="tac1.ta1"
/>
-			<Pause timeout="10000" />
+            <WaitForLayoutManager />
+			<WaitForEvent eventName="enterFrame" />
 			<AssertPropertyValue target="tac1.ta1" propertyName="selectionAnchorPosition" value="0"
/>
 			<!--<AssertPropertyValue target="tac1.ta1" propertyName="selectionActivePosition"
value="0" />-->
 			<CompareBitmap numColorVariances="100" ignoreMaxColorVariance="true" url="../Methods/baselines"
target="tac1.ta1">


Mime
View raw message