You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pi...@apache.org on 2014/10/12 23:58:09 UTC

[4/9] git commit: [flex-tlf] [refs/heads/develop] - Add new tests to AllTestsSuite: BoundsAndAlignmentTest.as, EventOverrideTest.as - all tests marked as Ignore - Need fixes CrossContainerTest.as, ElementOperationTest.as - all works fine

Add new tests to AllTestsSuite:
BoundsAndAlignmentTest.as, EventOverrideTest.as - all tests marked as Ignore - Need fixes
CrossContainerTest.as, ElementOperationTest.as - all works fine


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

Branch: refs/heads/develop
Commit: c105912118f6e3e064db62141f3760226fdabe49
Parents: 6cc1110
Author: piotrz <pi...@gmail.com>
Authored: Sun Oct 12 11:05:22 2014 +0200
Committer: piotrz <pi...@gmail.com>
Committed: Sun Oct 12 11:05:22 2014 +0200

----------------------------------------------------------------------
 automation_tests/src/AllTestsSuite.as           |    9 +-
 .../UnitTest/Tests/BoundsAndAlignmentTest.as    |  278 +---
 automation_tests/src/UnitTest/Tests/BoxTest.as  |   51 +-
 .../src/UnitTest/Tests/ContainerTypeTest.as     |    8 -
 .../src/UnitTest/Tests/CrossContainerTest.as    |  430 +++---
 .../src/UnitTest/Tests/ElementOperationTest.as  | 1192 +++++++++++++++++
 .../src/UnitTest/Tests/ElementOperationTests.as | 1228 ------------------
 .../src/UnitTest/Tests/EventOverrideTest.as     |  905 +++++--------
 8 files changed, 1744 insertions(+), 2357 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/c1059121/automation_tests/src/AllTestsSuite.as
----------------------------------------------------------------------
diff --git a/automation_tests/src/AllTestsSuite.as b/automation_tests/src/AllTestsSuite.as
index b24715b..a13ac01 100644
--- a/automation_tests/src/AllTestsSuite.as
+++ b/automation_tests/src/AllTestsSuite.as
@@ -25,10 +25,14 @@ package
     import UnitTest.Tests.AllEventTest;
     import UnitTest.Tests.AllParaAttributeTest;
     import UnitTest.Tests.AttributeTest;
+    import UnitTest.Tests.BoundsAndAlignmentTest;
     import UnitTest.Tests.BoxTest;
     import UnitTest.Tests.CompositionTest;
     import UnitTest.Tests.ContainerAttributeTest;
     import UnitTest.Tests.ContainerTypeTest;
+    import UnitTest.Tests.CrossContainerTest;
+    import UnitTest.Tests.ElementOperationTest;
+    import UnitTest.Tests.EventOverrideTest;
     import UnitTest.Tests.FloatTest;
     import UnitTest.Tests.OperationTest;
     import UnitTest.Tests.ScrollingTest;
@@ -50,7 +54,10 @@ package
         public var operationTest:OperationTest;
         public var scrollingTest:ScrollingTest;
         public var containerAttributeTest:ContainerAttributeTest;
-
+        public var boundsAndAlignmentTest:BoundsAndAlignmentTest;
+        public var crossContainerTest:CrossContainerTest;
+        public var elementOperationTest:ElementOperationTest;
+        public var eventOverrideTest:EventOverrideTest;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/c1059121/automation_tests/src/UnitTest/Tests/BoundsAndAlignmentTest.as
----------------------------------------------------------------------
diff --git a/automation_tests/src/UnitTest/Tests/BoundsAndAlignmentTest.as b/automation_tests/src/UnitTest/Tests/BoundsAndAlignmentTest.as
index 6daafda..026ba5f 100644
--- a/automation_tests/src/UnitTest/Tests/BoundsAndAlignmentTest.as
+++ b/automation_tests/src/UnitTest/Tests/BoundsAndAlignmentTest.as
@@ -30,7 +30,6 @@ package UnitTest.Tests
     import flash.events.EventDispatcher;
     import flash.events.IEventDispatcher;
     import flash.geom.Rectangle;
-    import flash.text.engine.TextLine;
 
     import flashx.textLayout.compose.StandardFlowComposer;
     import flashx.textLayout.container.ContainerController;
@@ -38,8 +37,6 @@ package UnitTest.Tests
     import flashx.textLayout.conversion.TextConverter;
     import flashx.textLayout.edit.EditManager;
     import flashx.textLayout.edit.IEditManager;
-    import flashx.textLayout.elements.FlowLeafElement;
-    import flashx.textLayout.elements.InlineGraphicElement;
     import flashx.textLayout.elements.InlineGraphicElementStatus;
     import flashx.textLayout.elements.TextFlow;
     import flashx.textLayout.events.StatusChangeEvent;
@@ -47,9 +44,7 @@ package UnitTest.Tests
     import flashx.textLayout.factory.TextFlowTextLineFactory;
     import flashx.textLayout.formats.BlockProgression;
     import flashx.textLayout.formats.Direction;
-    import flashx.textLayout.formats.TextAlign;
     import flashx.textLayout.formats.TextLayoutFormat;
-    import flashx.textLayout.formats.VerticalAlign;
 
     import mx.containers.Canvas;
 
@@ -61,7 +56,6 @@ package UnitTest.Tests
     {
         // Creation Types
         private static const USE_FLOW:String = "textFlow";
-        private static const USE_FACTORY_STRING:String = "factoryStr";
         private static const USE_FACTORY_FLOW:String = "factoryTF";
 
         private static var textAlignArray:Array = ["left", "center", "right", "start", "end" ];
@@ -110,11 +104,6 @@ package UnitTest.Tests
             ]
         ];
 
-        private const logicalWidth:Number = 400;
-        private const logicalHeight:Number = 400;
-
-        private var w:Number = 210;
-        private var h:Number = 40;
         private var width:Number;
         private var height:Number;
 
@@ -127,7 +116,6 @@ package UnitTest.Tests
         // bounds and format of last sprite for comparison function
         private var compareBounds:Rectangle;
 
-        private var fFactBounds:Rectangle;
         private var tFlowBounds:Rectangle;
 
         private var notReadyGraphicsCount:int;
@@ -171,14 +159,6 @@ package UnitTest.Tests
             var labelFormat:TextLayoutFormat = new TextLayoutFormat();
             labelFormat.fontSize = 12;
             labelFactory.spanFormat = labelFormat;
-
-          /*  testData = <TestCase>
-                <TestData name="measureType">{measureType}</TestData>
-                <TestData name="lineBreak">{lineBreak}</TestData>
-                <TestData name="id">{methodName}-{measureType}-{lineBreak}</TestData>
-                <TestData name="verticalAlign">{verticalAlign}</TestData>
-                <TestData name="textAlign">{textAlign}</TestData>
-            </TestCase>; */
         }
 
         [AfterClass]
@@ -211,8 +191,9 @@ package UnitTest.Tests
 
         /********************** Tests Start Here ***************************/
 
-        [Test(dataProvider="data")]
-        public function simpleMultiParagraph(measureType:Object):void
+        [Test]
+        [Ignore]
+        public function simpleMultiParagraph():void
         {
             // This is a subset of simple.xml
             // Exposed Watson bug 2559210
@@ -224,6 +205,21 @@ package UnitTest.Tests
             runSingleTest(markup, insertText);
         }
 
+        [Test]
+        [Ignore]
+        public function simpleMultiParagraphNoTextIndent():void
+        {
+            // This is a subset of simple.xml, and has NO first line indent applied to the paragraphs.
+            var markup:String = '<flow:TextFlow xmlns:flow="http://ns.adobe.com/textLayout/2008" fontSize="14" paddingTop="4" paddingLeft="4" fontFamily="Times New Roman">' +
+                    '<flow:p paragraphSpaceAfter="15"><flow:span>There are many </flow:span><flow:span fontStyle="italic">such</flow:span><flow:span> lime-kilns in that tract of country, for the purpose of burning the white marble which composes a large part of the substance of the hills. Some of them, built years ago, and long deserted, with weeds growing in the vacant round of the interior, which is open to the sky, and grass and wild-flowers rooting themselves into the chinks of the stones, look already like relics of antiquity, and may yet be overspread with the lichens of centuries to come. Sentences removed.</flow:span></flow:p>' +
+                    '<flow:p paragraphSpaceAfter="15"><flow:span>The man who now watched the fire was of a different order, and troubled himself with no thoughts save the very few that were requisite to his business. At frequent intervals, he flung back the clashing weight of the iron door, and, turning his face from the insufferable glare, thrust in huge logs of oak, or stirred the immense brands with a long pole. Sentences removed.</flow:span></flow:p>' +
+                    '</flow:TextFlow>';
+
+            runSingleTest(markup);
+        }
+
+        [Test]
+        [Ignore]
         public function longSimpleMultiParagraph():void
         {
             // This is a longer version of simple.xml, so the text overflows the visible area and scrolls
@@ -241,17 +237,8 @@ package UnitTest.Tests
             runSingleTest(markup, insertText);
         }
 
-        public function simpleMultiParagraphNoTextIndent():void
-        {
-            // This is a subset of simple.xml, and has NO first line indent applied to the paragraphs.
-            var markup:String = '<flow:TextFlow xmlns:flow="http://ns.adobe.com/textLayout/2008" fontSize="14" paddingTop="4" paddingLeft="4" fontFamily="Times New Roman">' +
-                    '<flow:p paragraphSpaceAfter="15"><flow:span>There are many </flow:span><flow:span fontStyle="italic">such</flow:span><flow:span> lime-kilns in that tract of country, for the purpose of burning the white marble which composes a large part of the substance of the hills. Some of them, built years ago, and long deserted, with weeds growing in the vacant round of the interior, which is open to the sky, and grass and wild-flowers rooting themselves into the chinks of the stones, look already like relics of antiquity, and may yet be overspread with the lichens of centuries to come. Sentences removed.</flow:span></flow:p>' +
-                    '<flow:p paragraphSpaceAfter="15"><flow:span>The man who now watched the fire was of a different order, and troubled himself with no thoughts save the very few that were requisite to his business. At frequent intervals, he flung back the clashing weight of the iron door, and, turning his face from the insufferable glare, thrust in huge logs of oak, or stirred the immense brands with a long pole. Sentences removed.</flow:span></flow:p>' +
-                    '</flow:TextFlow>';
-
-            runSingleTest(markup);
-        }
-
+        [Test]
+        [Ignore]
         public function simpleMultiParagraphNegTextIndent():void
         {
             // This is a subset of simple.xml, and has NO first line indent applied to the paragraphs.
@@ -263,6 +250,8 @@ package UnitTest.Tests
             runSingleTest(markup);
         }
 
+        [Test]
+        [Ignore]
         public function simpleWithPaddingTopLeft():void
         {
             // This is a subset of simple.xml, and has NO first line indent applied to the paragraphs.
@@ -274,6 +263,8 @@ package UnitTest.Tests
             runSingleTest(markup);
         }
 
+        [Test]
+        [Ignore]
         public function simpleWithPaddingBottomRight():void
         {
             // This is a subset of simple.xml, and has NO first line indent applied to the paragraphs.
@@ -312,39 +303,6 @@ package UnitTest.Tests
 
         // end of IEventDispatcher functions
 
-        private function setUpMeasureType(measureObj:Object):void
-        {
-            width = logicalWidth;
-            height = logicalHeight;
-
-            switch (measureObj.measureType)
-            {
-                case MeasureConstants.MEASURE_BOTH:
-                    width = NaN;
-                    height = NaN;
-                    break;
-
-                case MeasureConstants.MEASURE_WIDTH:
-                    width = NaN;
-                    break;
-
-                case MeasureConstants.MEASURE_HEIGHT:
-                    height = NaN;
-                    break;
-            }
-
-            if (_blockProgression == BlockProgression.RL)		// swap coordinates if we're vertical
-            {
-                var tmp:Number = width;
-                width = height;
-                height = tmp;
-
-                tmp = w;
-                w = h;
-                h = tmp;
-            }
-        }
-
         private function insertText(textFlow:TextFlow):void
         {
             textFlow.interactionManager = editManager;
@@ -365,59 +323,6 @@ package UnitTest.Tests
             }
         }
 
-        private function clearCanvas():void
-        {
-            TestDisplayObject = testApp.getDisplayObject();
-            if (TestDisplayObject)
-            {
-                testCanvas = Canvas(TestDisplayObject);
-                while (testCanvas.rawChildren.numChildren > 0)
-                    testCanvas.rawChildren.removeChildAt(0);
-            }
-        }
-
-        // These tests run flow &  textFlowfactory creation types (they don't work on string factory)
-        private static var testsToRunOnFlowAndTFFactory:Array = [
-            "simpleMultiParagraph",
-            "simpleMultiParagraphNoTextIndent",
-            "simpleWithPaddingTopLeft",
-            "simpleWithPaddingBottomRight",
-            "simpleMultiParagraphNegTextIndent",
-            "longSimpleMultiParagraph",
-        ];
-
-        private function createDefaultTextLayoutFormat():TextLayoutFormat
-        {
-            var format:TextLayoutFormat = new TextLayoutFormat();
-            format.fontFamily = "Arial";
-            format.fontSize = 20;
-            format.direction = _direction;
-            format.blockProgression = _blockProgression;
-            return format;
-        }
-
-        private function createTextFlow(markup:String):TextFlow
-        {
-            if (markup.length <= 0 || markup.charAt(0) != "<")
-                return TextConverter.importToFlow(markup, TextConverter.PLAIN_TEXT_FORMAT);
-
-            var textFlow:TextFlow = TextConverter.importToFlow(markup, TextConverter.TEXT_LAYOUT_FORMAT);
-            var flowNotReadyGraphicsCount:int = 0;
-
-            // check for inlines
-            for (var leaf:FlowLeafElement = textFlow.getFirstLeaf(); leaf != null; leaf = leaf.getNextLeaf())
-                if (leaf is InlineGraphicElement && InlineGraphicElement(leaf).status != InlineGraphicElementStatus.READY)
-                    flowNotReadyGraphicsCount++;
-            if (flowNotReadyGraphicsCount != 0)
-            {
-                textFlow.addEventListener(StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE, statusChangeHandler, false, 0, true);
-                textFlow.flowComposer.addController(new ContainerController(new Sprite()));	// add dummy controller so we get status change events
-                textFlow.flowComposer.updateAllControllers();
-                notReadyGraphicsCount += flowNotReadyGraphicsCount;
-            }
-            return textFlow;
-        }
-
         // Track the completion of loading inlines, dispatch a completion event when its done
         private function statusChangeHandler(obj:Event):void
         {
@@ -449,47 +354,6 @@ package UnitTest.Tests
             }
         }
 
-        private function addTextFactoryFromFlowSprite(x:Number, y:Number, width:Number, height:Number, textFlow:TextFlow):Sprite
-        {
-            // trace("addTextFactoryFromFlowSprite",x,y,width,height,textAlign,verticalAlign,lineBreak);
-
-            var factorySprite:Sprite = new Sprite();
-            factorySprite.x = x;
-            factorySprite.y = y;
-
-            addToCanvas(factorySprite);
-
-            textFlowFactory.compositionBounds = new Rectangle(0, 0, width ? width : NaN, height ? height : NaN);
-
-            textFlowFactory.createTextLines(callback, textFlow);
-            clearCanvas();
-            addToCanvas(factorySprite);
-
-            function callback(tl:TextLine):void
-            {
-                factorySprite.addChild(tl);
-            }
-
-            // composition bounds in black
-            // contentBounds in red
-            // put it in another sprite on top
-            sprite = new Sprite();
-            sprite.x = x;
-            sprite.y = y;
-            addToCanvas(sprite);
-
-            compareBounds = textFlowFactory.getContentBounds();
-            var g:Graphics = sprite.graphics;
-            drawCircle(g, 0xff00, 0, 0, 3);
-            strokeRect(g, 1, 0x0, 0, 0, width, height);
-            strokeRect(g, 1, 0xFF0000, compareBounds.left, compareBounds.top, compareBounds.width, compareBounds.height);
-            // trace("addTextFactoryFromFlowSprite is running");
-            fFactBounds = textFlowFactory.getContentBounds();
-
-            // trace("bounds",sFactBounds);
-            return factorySprite;
-        }
-
         private function addTextFlowSprite(parentSprite:Sprite, x:Number, y:Number, width:Number, height:Number, textFlow:TextFlow):Sprite
         {
             sprite = new Sprite();
@@ -558,100 +422,6 @@ package UnitTest.Tests
             g.endFill();
         }
 
-
-        private function validateContentBounds(s:Sprite, contentBounds:Rectangle, marginOfError:Number):void
-        {
-            // Check that the content bounds includes all the places within the container that have text
-            s.graphics.clear();
-            var bbox:Rectangle = s.getBounds(s);
-
-            // The content bounds should always include the inked bounds, or be very close to it. In practice, how far it may be off by is proportional to the text size.
-            assertTrue("contentBounds left doesn't match sprite inked bounds", contentBounds.left <= bbox.left || Math.abs(contentBounds.left - bbox.left) < marginOfError);
-            assertTrue("contentBounds top doesn't match sprite inked bounds", contentBounds.top <= bbox.top || Math.abs(contentBounds.top - bbox.top) < marginOfError);
-            assertTrue("contentBounds right doesn't match sprite inked bounds", contentBounds.right >= bbox.right || Math.abs(contentBounds.right - bbox.right) < marginOfError);
-            assertTrue("contentBounds bottom doesn't match sprite inked bounds", contentBounds.bottom >= bbox.bottom || Math.abs(contentBounds.bottom - bbox.bottom) < marginOfError);
-        }
-
-        private function validateAlignment(verticalAlign:String, textAlign:String, textFlow:TextFlow, compositionBounds:Rectangle, contentBounds:Rectangle, expectContentsToFit:Boolean, marginOfError:Number):void
-        {
-            // Check that the text was put in the appropriate area of the container, given the vertical & horizontal alignment values
-            if (expectContentsToFit)
-            {
-                assertTrue("contents expected to fit, but overflow in height", contentBounds.height <= compositionBounds.height || contentBounds.height - compositionBounds.height < 1);
-                assertTrue("contents expected to fit, but overflow in width", contentBounds.width <= compositionBounds.width || contentBounds.width - compositionBounds.width < 1);
-            }
-
-            // Resolve direction dependent alignment
-            if (textAlign == TextAlign.START)
-                textAlign = textFlow.computedFormat.direction == Direction.LTR ? TextAlign.LEFT : TextAlign.RIGHT;
-            if (textAlign == TextAlign.END)
-                textAlign = textFlow.computedFormat.direction == Direction.RTL ? TextAlign.LEFT : TextAlign.RIGHT;
-
-            // Swap alignment values for validate call if text is rotated (vertical text)
-            if (_blockProgression == BlockProgression.RL)
-            {
-                var originalTextAlign:String = textAlign;
-                switch (verticalAlign)
-                {
-                    case VerticalAlign.TOP:
-                        textAlign = TextAlign.RIGHT;
-                        break;
-                    case VerticalAlign.MIDDLE:
-                        textAlign = TextAlign.CENTER;
-                        break;
-                    case VerticalAlign.BOTTOM:
-                        textAlign = TextAlign.LEFT;
-                        break;
-                    default:
-                        break;
-                }
-                switch (originalTextAlign)
-                {
-                    case TextAlign.LEFT:
-                        verticalAlign = VerticalAlign.TOP;
-                        break;
-                    case TextAlign.CENTER:
-                        verticalAlign = VerticalAlign.MIDDLE;
-                        break;
-                    case TextAlign.RIGHT:
-                        verticalAlign = VerticalAlign.BOTTOM;
-                        break;
-                    default:
-                        break;
-                }
-            }
-
-            switch (verticalAlign)
-            {
-                case VerticalAlign.TOP:
-                    assertTrue("Vertical alignment top - content not at top", Math.abs(contentBounds.top - compositionBounds.top) < marginOfError);
-                    break;
-                case VerticalAlign.MIDDLE:
-                    assertTrue("Vertical alignment middle - content not at middle", Math.abs(Math.abs(contentBounds.top - compositionBounds.top) - Math.abs(contentBounds.bottom - compositionBounds.bottom)) < marginOfError);
-                    break;
-                case VerticalAlign.BOTTOM:
-                    assertTrue("Vertical alignment bottom - content not at bottom", Math.abs(contentBounds.bottom - compositionBounds.bottom) < marginOfError);
-                    break;
-                default:
-                    break;
-            }
-            switch (textAlign)
-            {
-                case TextAlign.LEFT:
-                    assertTrue("Horizontal alignment left - content not at left", Math.abs(contentBounds.left - compositionBounds.left) < marginOfError);
-                    break;
-                case TextAlign.CENTER:
-                    assertTrue("Horizontal alignment center - content not at center", Math.abs(Math.abs(contentBounds.left - compositionBounds.left) - Math.abs(contentBounds.right - compositionBounds.right)) < marginOfError);
-                    break;
-                case TextAlign.RIGHT:
-                    assertTrue("Horizontal alignment right - content not at right", Math.abs(contentBounds.right - compositionBounds.right) < marginOfError);
-                    break;
-                default:
-                    break;
-            }
-        }
-
-
         /** Run a single markup description in vertical alignment (top, middle, bottom) * horizontal alignment (left, center, right) in
          * both the full compose using ContainerController and a TextFlow Factory case. Compare the results to make sure the text falls
          * in the correct area of the container, that the content bounds is no smaller than the inked bounds, and that the full compose

http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/c1059121/automation_tests/src/UnitTest/Tests/BoxTest.as
----------------------------------------------------------------------
diff --git a/automation_tests/src/UnitTest/Tests/BoxTest.as b/automation_tests/src/UnitTest/Tests/BoxTest.as
index e0512c5..6340382 100644
--- a/automation_tests/src/UnitTest/Tests/BoxTest.as
+++ b/automation_tests/src/UnitTest/Tests/BoxTest.as
@@ -76,31 +76,6 @@ package UnitTest.Tests
             metaData.productArea = "Text Composition";
         }
 
-        /*  public static function suite(testConfig:TestConfig, ts:TestSuiteExtended):void
-         {
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "paddingAndMarginOnDiv", testConfig, null));
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "negativePaddingAndMarginOnDiv", testConfig, null));
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "verticalSpaceCollapse", testConfig, null));
-
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "ilgMarginsAndPaddingStart", testConfig, null));
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "ilgMarginsAndPaddingEnd", testConfig, null));
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "ilgMarginsAndPaddingBeforeAndAfter", testConfig, null));
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "ilgMarginsAndPaddingStartStrikeAndUnderline", testConfig, null));
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "ilgMarginsAndPaddingEndStrikeAndUnderline", testConfig, null));
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "ilgMarginsAndPaddingBeforeAndAfterStrikeAndUnderline", testConfig, null));
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "floatMarginsAndPaddingLeftAndRight", testConfig, null));
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "floatMarginsAndPaddingUpAndDown", testConfig, null));
-
-
-         // We only need one version of these tests, they supply their own markup
-         if (testConfig.writingDirection[0] == BlockProgression.TB && testConfig.writingDirection[1] == Direction.LTR)
-         {
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "textFlowPadding", testConfig, null));
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "rlPaddingOnDiv", testConfig, null));
-         ts.addTestDescriptor(new TestDescriptor(BoxTest, "boundsWithPadding", testConfig, null));
-         }
-         }    */
-
         [Before]
         override public function setUpTest():void
         {
@@ -154,28 +129,7 @@ package UnitTest.Tests
                 format.paddingRight = totalRight;
                 format.paddingBottom = totalBottom;
             }
-            /*	if (verticalText)		FOR WHEN MARGINS ARE TURNED BACK ON
-             {
-             format.marginLeft = totalBottom / 2;
-             format.paddingLeft = totalBottom / 2;
-             format.marginTop = totalLeft / 2;
-             format.paddingTop = totalLeft / 2;
-             format.marginRight = totalTop / 2;
-             format.paddingRight = totalTop / 2;
-             format.marginBottom = totalRight / 2;
-             format.paddingBottom = totalRight / 2;
-             }
-             else
-             {
-             format.marginLeft = totalLeft / 2;
-             format.paddingLeft = totalLeft / 2;
-             format.marginTop = totalTop / 2;
-             format.paddingTop = totalTop / 2;
-             format.marginRight = totalRight / 2;
-             format.paddingRight = totalRight / 2;
-             format.marginBottom = totalBottom / 2;
-             format.paddingBottom = totalBottom / 2;
-             } */
+
             element.format = format;
         }
 
@@ -549,9 +503,6 @@ package UnitTest.Tests
             var columnRect:Rectangle = controller.columnState.getColumnAt(tfl.columnIndex);
 
             // Check that graphic leaves a margin on the left side, so its not right up against the container edge
-            //	var globalInlinePt:Point = ilg.graphic.localToGlobal(new Point(0, 0));
-            //	var inlinePt:Point = controller.container.globalToLocal(globalInlinePt);
-            //	var inlineBBox:Rectangle = new Rectangle(inlinePt.x, inlinePt.y, ilg.elementWidth, ilg.elementHeight);
             var inlineBBox:Rectangle = new Rectangle(floatHolder.x, floatHolder.y, ilg.elementWidth, ilg.elementHeight);
 
             if (float == Float.LEFT)

http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/c1059121/automation_tests/src/UnitTest/Tests/ContainerTypeTest.as
----------------------------------------------------------------------
diff --git a/automation_tests/src/UnitTest/Tests/ContainerTypeTest.as b/automation_tests/src/UnitTest/Tests/ContainerTypeTest.as
index 1381e41..5e401c9 100644
--- a/automation_tests/src/UnitTest/Tests/ContainerTypeTest.as
+++ b/automation_tests/src/UnitTest/Tests/ContainerTypeTest.as
@@ -18,8 +18,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 package UnitTest.Tests
 {
-
-    import UnitTest.ExtendedClasses.TestSuiteExtended;
     import UnitTest.ExtendedClasses.VellumTestCase;
     import UnitTest.Fixtures.TestConfig;
 
@@ -71,12 +69,6 @@ package UnitTest.Tests
             markup = getTestMarkup();
         }
 
-        public static function suiteFromXML(testListXML:XML, testConfig:TestConfig, ts:TestSuiteExtended):void
-        {
-            var testCaseClass:Class = ContainerTypeTest;
-            VellumTestCase.suiteFromXML(testCaseClass, testListXML, testConfig, ts);
-        }
-
         [Before]
         override public function setUpTest():void
         {

http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/c1059121/automation_tests/src/UnitTest/Tests/CrossContainerTest.as
----------------------------------------------------------------------
diff --git a/automation_tests/src/UnitTest/Tests/CrossContainerTest.as b/automation_tests/src/UnitTest/Tests/CrossContainerTest.as
index bf9f20b..1d831ec 100644
--- a/automation_tests/src/UnitTest/Tests/CrossContainerTest.as
+++ b/automation_tests/src/UnitTest/Tests/CrossContainerTest.as
@@ -18,240 +18,216 @@
 ////////////////////////////////////////////////////////////////////////////////
 package UnitTest.Tests
 {
-	import UnitTest.ExtendedClasses.TestDescriptor;
-	import UnitTest.ExtendedClasses.TestSuiteExtended;
-	import UnitTest.ExtendedClasses.VellumTestCase;
-	import UnitTest.Fixtures.TestConfig;
-	
-	import flash.display.Sprite;
-	import flash.text.engine.TextBlock;
-	import flash.text.engine.TextLine;
-	
-	import flashx.textLayout.compose.IFlowComposer;
-	import flashx.textLayout.container.ContainerController;
-	import flashx.textLayout.edit.EditManager;
-	import flashx.textLayout.elements.InlineGraphicElement;
-	import flashx.textLayout.elements.ParagraphElement;
-	import flashx.textLayout.elements.SpanElement;
-	import flashx.textLayout.elements.TextFlow;
-	import flashx.textLayout.formats.BlockProgression;
-	import flashx.textLayout.formats.Direction;
-	import flashx.textLayout.formats.TextLayoutFormat;
-	import flashx.textLayout.tlf_internal;
-	
-	import mx.containers.Canvas;
+    import UnitTest.ExtendedClasses.VellumTestCase;
+    import UnitTest.Fixtures.TestConfig;
+
+    import flash.display.Sprite;
+    import flash.text.engine.TextBlock;
+    import flash.text.engine.TextLine;
+
+    import flashx.textLayout.compose.IFlowComposer;
+    import flashx.textLayout.container.ContainerController;
+    import flashx.textLayout.edit.EditManager;
+    import flashx.textLayout.elements.InlineGraphicElement;
+    import flashx.textLayout.elements.ParagraphElement;
+    import flashx.textLayout.elements.SpanElement;
+    import flashx.textLayout.elements.TextFlow;
+    import flashx.textLayout.formats.BlockProgression;
+    import flashx.textLayout.formats.Direction;
+    import flashx.textLayout.formats.TextLayoutFormat;
+    import flashx.textLayout.tlf_internal;
+
+    import mx.containers.Canvas;
 
     import org.flexunit.asserts.assertTrue;
 
     use namespace tlf_internal;
-	
-	public class CrossContainerTest extends VellumTestCase
-	{
+
+    public class CrossContainerTest extends VellumTestCase
+    {
         // Members
         private var _flowComposer:IFlowComposer;
-		private var _textFlow:TextFlow;
-		private var _testXML:XML;
-		private var _verticalText:Boolean;
-		private var _rtlText:Boolean;
-		private var _testCanvas:Canvas;
-		private var _textFlowSprite:Sprite;
-		private var _container1:Sprite;
-		private var _container2:Sprite;
-		private var _container3:Sprite;
-		
-		public function CrossContainerTest(methodName:String, testID:String, testConfig:TestConfig, testXML:XML = null)
-		{
-			super (methodName, testID, testConfig);
-			_testXML = testXML;
-			TestData.fileName = null;
-			
-			// Note: These must correspond to a Watson product area (case-sensitive)
-			metaData.productArea = "Text Composition";
-		}
-		
-		public static function suite(testConfig:TestConfig, ts:TestSuiteExtended):void
-		{
-            addTestCase(ts, testConfig, "crossContainerTest");
-		}
-		
-		private static function addTestCase(ts:TestSuiteExtended, testConfig:TestConfig, methodName:String):void
-		{
-			var testXML:XML = <TestCase>
-								<TestData name="methodName">{methodName}</TestData>
-								<TestData name="id">{methodName}</TestData>
-							</TestCase>;
-
-			ts.addTestDescriptor (new TestDescriptor (CrossContainerTest,"callTestMethod", testConfig, testXML) );
-		}
-		
-		override public function setUpTest() : void
-		{
-			super.setUpTest();
-			setupTextFlow();
-			initializeFlow();
-		}
-		
-		private function setupTextFlow():void
-
-		{
-			var textFlow:TextFlow = new TextFlow();
-			var para1String:String = "In the first paragraph of a "
-			var para1String2:String = "cheap"
-			var para1String3:String ="Western novel, a cowboy meets a saloon girl.";
-			var para2String:String = "In the middle of the cheap novel a really bad guy, "+
-				"who is having a relationship with the saloon girl, sees the cowboy help "+
-				"her onto her horse as she smiles at him warmly."
-			var para3String:String = "In the last paragraph of the cheap novel, the cowboy kills "+
-				"the really bad guy in a shootout in the middle of main street and "+
-				"then rides into the sunset with the saloon girl on the back of his";
-			
-			var controllerOne:ContainerController;
-			var controllerTwo:ContainerController;
-			
-			_container1 = new Sprite();
-			_container2 = new Sprite();
-			
-			controllerOne = new ContainerController(_container1, 200, 210);
-			controllerTwo = new ContainerController(_container2, 200, 220);
-			
-			var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
-			var paragraph1:ParagraphElement = new ParagraphElement();
-			
-			var paragraph2:ParagraphElement = new ParagraphElement();
-			var paragraph3:ParagraphElement = new ParagraphElement();
-			
-			var p1Span1:SpanElement = new SpanElement();
-			var p1Span2:SpanElement = new SpanElement();
-			var p1Span3:SpanElement = new SpanElement();
-			var p2Span:SpanElement = new SpanElement();
-			var p3Span:SpanElement = new SpanElement();
-			
-			p1Span1.text = para1String;
-			p1Span2.text = para1String2;
-			p1Span3.text = para1String3;
-			
-			paragraph1.addChild(p1Span1);
-			paragraph1.addChild(p1Span2);
-			paragraph1.addChild(p1Span3);
-			
-			p2Span.text = para2String;
-			paragraph2.addChild(p2Span);
-			
-			p3Span.text = para3String;
-			
-			var img:InlineGraphicElement = new InlineGraphicElement();
-			img.source = "../../test/testFiles/assets/smiley.gif"
-			img.width = 100;
-			img.height = 100;
-			
-			paragraph3.addChild(p3Span);
-			paragraph3.addChild(img);
-			
-			textFlow.addChild(paragraph1);
-			textFlow.addChild(paragraph2);
-			textFlow.addChild(paragraph3);
-			
-			textLayoutFormat.fontSize = 14;
-			textLayoutFormat.textIndent = 15;
-			textLayoutFormat.paragraphSpaceAfter = 15;
-			textLayoutFormat.paddingTop = 4;
-			textLayoutFormat.paddingLeft = 4;
-			
-			textFlow.hostFormat = textLayoutFormat;
-			textFlow.interactionManager = new EditManager();
-			_container1.x = 0;
-			_container1.y = 100;
-			_container2.x = 255;
-			_container2.y = 100; 
-			textFlow.flowComposer.addController(controllerOne);
-			textFlow.flowComposer.addController(controllerTwo);
-			textFlow.flowComposer.updateAllControllers();
-			
-			_container3 = new Sprite();
-			var controllerThree:ContainerController = new ContainerController(_container3, 200, 220);
-			_container3.x = 510;
-			_container3.y = 100; 
-			var textLayoutFormat1:TextLayoutFormat = new TextLayoutFormat();
-			
-			textLayoutFormat1.fontSize = 18;
-			textLayoutFormat1.textIndent = 15;
-			textLayoutFormat1.paragraphSpaceAfter = 15;
-			textLayoutFormat1.paddingTop = 4;
-			textLayoutFormat1.paddingLeft = 4;
-			textFlow.hostFormat = textLayoutFormat1;
-			textFlow.flowComposer.addController(controllerThree);
-			
-			_textFlowSprite = new Sprite();
-			_textFlowSprite.addChild(_container1);
-			_textFlowSprite.addChild(_container2);
-			_textFlowSprite.addChild(_container3);
-		
-			_textFlow = textFlow;
-
-		}
-		
-		override public function tearDownTest(): void
-		{
-			super.tearDownTest();
-		}
-		
-		private function initializeFlow():void
-		{
-			_flowComposer = _textFlow.flowComposer;
-			_testCanvas = myEmptyChilds();
-			_testCanvas.rawChildren.addChild(_textFlowSprite);
-			
+        private var _textFlow:TextFlow;
+        private var _verticalText:Boolean;
+        private var _rtlText:Boolean;
+        private var _testCanvas:Canvas;
+        private var _textFlowSprite:Sprite;
+        private var _container1:Sprite;
+        private var _container2:Sprite;
+        private var _container3:Sprite;
+
+        public function CrossContainerTest()
+        {
+            super("", "CrossContainerTest", TestConfig.getInstance());
+            TestData.fileName = null;
+            metaData = {};
+            // Note: These must correspond to a Watson product area (case-sensitive)
+            metaData.productArea = "Text Composition";
+        }
+
+        [Before]
+        override public function setUpTest():void
+        {
+            super.setUpTest();
+            setupTextFlow();
+            initializeFlow();
+        }
+
+        [After]
+        override public function tearDownTest():void
+        {
+            super.tearDownTest();
+        }
+
+        [Test]
+        public function crossContainerTest():void
+        {
+            var tb:TextBlock = (_textFlow.getChildAt(2) as ParagraphElement).getTextBlock();
+            assertTrue("The _textBlock of the second paragraph should not be null", tb);
+            var fLine:TextLine = tb.firstLine;
+            assertTrue("The first TextLine of the second paragraph should not be null", fLine);
+            assertTrue("The first TextLine of the second paragraph should be on the second container", fLine.parent == _container2);
+        }
+
+        private function setupTextFlow():void
+        {
+            var textFlow:TextFlow = new TextFlow();
+            var para1String:String = "In the first paragraph of a "
+            var para1String2:String = "cheap"
+            var para1String3:String = "Western novel, a cowboy meets a saloon girl.";
+            var para2String:String = "In the middle of the cheap novel a really bad guy, " +
+                    "who is having a relationship with the saloon girl, sees the cowboy help " +
+                    "her onto her horse as she smiles at him warmly."
+            var para3String:String = "In the last paragraph of the cheap novel, the cowboy kills " +
+                    "the really bad guy in a shootout in the middle of main street and " +
+                    "then rides into the sunset with the saloon girl on the back of his";
+
+            var controllerOne:ContainerController;
+            var controllerTwo:ContainerController;
+
+            _container1 = new Sprite();
+            _container2 = new Sprite();
+
+            controllerOne = new ContainerController(_container1, 200, 210);
+            controllerTwo = new ContainerController(_container2, 200, 220);
+
+            var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
+            var paragraph1:ParagraphElement = new ParagraphElement();
+
+            var paragraph2:ParagraphElement = new ParagraphElement();
+            var paragraph3:ParagraphElement = new ParagraphElement();
+
+            var p1Span1:SpanElement = new SpanElement();
+            var p1Span2:SpanElement = new SpanElement();
+            var p1Span3:SpanElement = new SpanElement();
+            var p2Span:SpanElement = new SpanElement();
+            var p3Span:SpanElement = new SpanElement();
+
+            p1Span1.text = para1String;
+            p1Span2.text = para1String2;
+            p1Span3.text = para1String3;
+
+            paragraph1.addChild(p1Span1);
+            paragraph1.addChild(p1Span2);
+            paragraph1.addChild(p1Span3);
+
+            p2Span.text = para2String;
+            paragraph2.addChild(p2Span);
+
+            p3Span.text = para3String;
+
+            var img:InlineGraphicElement = new InlineGraphicElement();
+            img.source = "../../test/testFiles/assets/smiley.gif"
+            img.width = 100;
+            img.height = 100;
+
+            paragraph3.addChild(p3Span);
+            paragraph3.addChild(img);
+
+            textFlow.addChild(paragraph1);
+            textFlow.addChild(paragraph2);
+            textFlow.addChild(paragraph3);
+
+            textLayoutFormat.fontSize = 14;
+            textLayoutFormat.textIndent = 15;
+            textLayoutFormat.paragraphSpaceAfter = 15;
+            textLayoutFormat.paddingTop = 4;
+            textLayoutFormat.paddingLeft = 4;
+
+            textFlow.hostFormat = textLayoutFormat;
+            textFlow.interactionManager = new EditManager();
+            _container1.x = 0;
+            _container1.y = 100;
+            _container2.x = 255;
+            _container2.y = 100;
+            textFlow.flowComposer.addController(controllerOne);
+            textFlow.flowComposer.addController(controllerTwo);
+            textFlow.flowComposer.updateAllControllers();
+
+            _container3 = new Sprite();
+            var controllerThree:ContainerController = new ContainerController(_container3, 200, 220);
+            _container3.x = 510;
+            _container3.y = 100;
+            var textLayoutFormat1:TextLayoutFormat = new TextLayoutFormat();
+
+            textLayoutFormat1.fontSize = 18;
+            textLayoutFormat1.textIndent = 15;
+            textLayoutFormat1.paragraphSpaceAfter = 15;
+            textLayoutFormat1.paddingTop = 4;
+            textLayoutFormat1.paddingLeft = 4;
+            textFlow.hostFormat = textLayoutFormat1;
+            textFlow.flowComposer.addController(controllerThree);
+
+            _textFlowSprite = new Sprite();
+            _textFlowSprite.addChild(_container1);
+            _textFlowSprite.addChild(_container2);
+            _textFlowSprite.addChild(_container3);
+
+            _textFlow = textFlow;
+
+        }
+
+        private function initializeFlow():void
+        {
+            _flowComposer = _textFlow.flowComposer;
+            _testCanvas = myEmptyChilds();
+            _testCanvas.rawChildren.addChild(_textFlowSprite);
+
             // Set the writing direction specified by the test
-			_textFlow.blockProgression = writingDirection[0];
-			_textFlow.direction        = writingDirection[1];
-			
+            _textFlow.blockProgression = writingDirection[0];
+            _textFlow.direction = writingDirection[1];
+
             _verticalText = (_textFlow.blockProgression == BlockProgression.RL);
             _rtlText = (_textFlow.direction == Direction.RTL);
-            
-			SelManager = EditManager(_textFlow.interactionManager);
-			if(SelManager) 
-			{
-				SelManager.selectRange(0, 0);
-				//make sure there is never any blinking when running these tests
-				setCaretBlinkRate (0);
-			}
-            
-			_textFlow.flowComposer.updateAllControllers();
-		}
-		
-		private function myEmptyChilds():Canvas
-		{
-			var TestCanvas:Canvas = null;
-			TestDisplayObject = testApp.getDisplayObject();
-			if (TestDisplayObject)
-			{
-				TestCanvas = Canvas(TestDisplayObject);
-				TestCanvas.removeAllChildren();
-				var iCnt:int = TestCanvas.rawChildren.numChildren;
-				for ( var a:int = 0; a < iCnt; a ++ )
-				{
-					TestCanvas.rawChildren.removeChildAt(0);
-				}
-			}
-			
-			return TestCanvas;
-		}
-		
-		public function callTestMethod():void
-		{
-				var TestCase:XML = _testXML;
-				var methodName:String = TestCase.TestData.(@name == "methodName").toString();
-				this[methodName]();
-		}
-		
-		private function crossContainerTest():void
-		{
-			var tb:TextBlock = (_textFlow.getChildAt(2) as ParagraphElement).getTextBlock();
-			assertTrue ("The _textBlock of the second paragraph should not be null",  tb);
-			var fLine:TextLine = tb.firstLine;
-			assertTrue ("The first TextLine of the second paragraph should not be null",  fLine);
-			assertTrue ("The first TextLine of the second paragraph should be on the second container",  fLine.parent == _container2);
-		}
-		
-    } // !class
+
+            SelManager = EditManager(_textFlow.interactionManager);
+            if (SelManager)
+            {
+                SelManager.selectRange(0, 0);
+                //make sure there is never any blinking when running these tests
+                setCaretBlinkRate(0);
+            }
+
+            _textFlow.flowComposer.updateAllControllers();
+        }
+
+        private function myEmptyChilds():Canvas
+        {
+            var TestCanvas:Canvas = null;
+            TestDisplayObject = testApp.getDisplayObject();
+            if (TestDisplayObject)
+            {
+                TestCanvas = Canvas(TestDisplayObject);
+                TestCanvas.removeAllChildren();
+                var iCnt:int = TestCanvas.rawChildren.numChildren;
+                for (var a:int = 0; a < iCnt; a++)
+                {
+                    TestCanvas.rawChildren.removeChildAt(0);
+                }
+            }
+
+            return TestCanvas;
+        }
+
+    }
 }