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 2015/10/13 22:55:02 UTC
git commit: [flex-tlf] [refs/heads/develop] - Fix for broken unit
FLEX_34807_Test
Repository: flex-tlf
Updated Branches:
refs/heads/develop 5eff80ef7 -> 7710afb61
Fix for broken unit FLEX_34807_Test
Project: http://git-wip-us.apache.org/repos/asf/flex-tlf/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-tlf/commit/7710afb6
Tree: http://git-wip-us.apache.org/repos/asf/flex-tlf/tree/7710afb6
Diff: http://git-wip-us.apache.org/repos/asf/flex-tlf/diff/7710afb6
Branch: refs/heads/develop
Commit: 7710afb61039666c8ad028452b628f25124ca5d8
Parents: 5eff80e
Author: piotrz <pi...@gmail.com>
Authored: Tue Oct 13 22:54:44 2015 +0200
Committer: piotrz <pi...@gmail.com>
Committed: Tue Oct 13 22:54:44 2015 +0200
----------------------------------------------------------------------
automation_apps/src/VellumUnit.mxml | 3 ++-
.../src/UnitTest/Tests/FLEX_34807_Test.as | 17 +++++++----------
2 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/7710afb6/automation_apps/src/VellumUnit.mxml
----------------------------------------------------------------------
diff --git a/automation_apps/src/VellumUnit.mxml b/automation_apps/src/VellumUnit.mxml
index afae29d..37a9c45 100644
--- a/automation_apps/src/VellumUnit.mxml
+++ b/automation_apps/src/VellumUnit.mxml
@@ -106,7 +106,8 @@
"asknot.xml",
"empty.xml",
"sampleArabic.xml",
- "aliceExcerpt.xml"
+ "aliceExcerpt.xml",
+ "HtmlTest.xml"
];
public var reportXMLResults:Boolean = false;
http://git-wip-us.apache.org/repos/asf/flex-tlf/blob/7710afb6/automation_tests/src/UnitTest/Tests/FLEX_34807_Test.as
----------------------------------------------------------------------
diff --git a/automation_tests/src/UnitTest/Tests/FLEX_34807_Test.as b/automation_tests/src/UnitTest/Tests/FLEX_34807_Test.as
index ff03a97..e8ca479 100644
--- a/automation_tests/src/UnitTest/Tests/FLEX_34807_Test.as
+++ b/automation_tests/src/UnitTest/Tests/FLEX_34807_Test.as
@@ -28,7 +28,6 @@ package UnitTest.Tests
{
import UnitTest.ExtendedClasses.VellumTestCase;
- import UnitTest.Fixtures.FileRepository;
import UnitTest.Fixtures.TestConfig;
import flashx.textLayout.conversion.ConversionType;
@@ -60,7 +59,6 @@ package UnitTest.Tests
public function FLEX_34807_Test()
{
- // super(methodName, testID, testConfig, testCaseXML);
super("", "FLEX_34807_Test", TestConfig.getInstance());
metaData = {};
@@ -71,13 +69,12 @@ package UnitTest.Tests
[BeforeClass]
public static function setUpClass():void
{
- FileRepository.readFile(TestConfig.getInstance().baseURL, "../../test/testFiles/markup/tlf/HtmlTest.xml");
analyseStylesOfPastedText();
}
private static function analyseStylesOfPastedText():void
{
- for(var i:int = 0; i < PASTED_TEXT.length; i++)
+ for (var i:int = 0; i < PASTED_TEXT.length; i++)
{
PASTE_CHAR_STYLES.push(getFormatOfCharFromFlow(i, PASTE.textFlow));
}
@@ -88,10 +85,10 @@ package UnitTest.Tests
{
super.setUpTest();
- if(!sourceAsPlainText)
+ if (!sourceAsPlainText)
sourceAsPlainText = TextConverter.export(testApp.getTextFlow(), TextConverter.PLAIN_TEXT_FORMAT, ConversionType.STRING_TYPE) as String;
- if(isNaN(initialTextLength))
+ if (isNaN(initialTextLength))
initialTextLength = SelManager.textFlow.textLength;
}
@@ -187,7 +184,7 @@ package UnitTest.Tests
private function assertFormattingOfPastedTextNotAltered(pastePosition:int):void
{
- for(var i:int = 0; i < PASTED_TEXT.length; i++)
+ for (var i:int = 0; i < PASTED_TEXT.length; i++)
{
var formatOfPastedChar:ITextLayoutFormat = getFormatOfCharAt(pastePosition + i);
assertTrue("The style of the pasted text has been altered!", TextLayoutFormat.isEqual(PASTE_CHAR_STYLES[i], formatOfPastedChar));
@@ -202,14 +199,14 @@ package UnitTest.Tests
private function assertAdjacentTextFormatsArePreserved(pastePosition:int):void
{
- if(pastePosition)
+ if (pastePosition)
{
assertNotNull("Couldn't manage to find the format of the character to the left of the pasted text, before the paste operation!", leftBefore);
assertNotNull("Couldn't manage to find the format of the character to the left of the pasted text, after the paste operation!", leftAfter);
assertTrue("The style of the original text has been altered! (left)", TextLayoutFormat.isEqual(leftBefore, leftAfter));
}
- if(pastePosition < initialTextLength - 1)
+ if (pastePosition < initialTextLength - 1)
{
assertNotNull("Couldn't manage to find the format of the character to the right of the pasted text, before the paste operation!", rightBefore);
assertNotNull("Couldn't manage to find the format of the character to the right of the pasted text, after the paste operation!", rightAfter);
@@ -220,7 +217,7 @@ package UnitTest.Tests
private function recordTextFormatsBeforeOperation(pastePosition:int):void
{
leftBefore = pastePosition ? getFormatOfCharAt(pastePosition - 1) : null;
- rightBefore = pastePosition < initialTextLength - 1 ? getFormatOfCharAt(pastePosition + 1) : null;
+ rightBefore = pastePosition < initialTextLength - 1 ? getFormatOfCharAt(pastePosition + 1) : null;
}
private function recordTextFormatsAfterOperation(pastePosition:int):void