FLEX-34876
Added/fixed tests
diff --git a/automation_tests/src/AllTestsSuite.as b/automation_tests/src/AllTestsSuite.as
index 0cd93e9..62f2f45 100644
--- a/automation_tests/src/AllTestsSuite.as
+++ b/automation_tests/src/AllTestsSuite.as
@@ -33,6 +33,7 @@
import UnitTest.Tests.CrossContainerTest;
import UnitTest.Tests.ElementOperationTest;
import UnitTest.Tests.EventOverrideTest;
+ import UnitTest.Tests.FLEX_34807_Test;
import UnitTest.Tests.FactoryImportTest;
import UnitTest.Tests.FloatTest;
import UnitTest.Tests.FlowModelTest;
@@ -111,7 +112,8 @@
public var measurementTest:MeasurementTest;
public var leadingTest:LeadingTest;
public var scrollToRangeTest:ScrollToRangeTest;
- //public var pasteWithMultiParagraph:PasteWithMutliParagraph_FLEX_34876_Test;
+ public var pasteWithMultiParagraph:PasteWithMutliParagraph_FLEX_34876_Test;
+ public var flex_34807:FLEX_34807_Test;
}
}
diff --git a/automation_tests/src/UnitTest/Tests/FLEX_34807_Test.as b/automation_tests/src/UnitTest/Tests/FLEX_34807_Test.as
index 872250a..ff03a97 100644
--- a/automation_tests/src/UnitTest/Tests/FLEX_34807_Test.as
+++ b/automation_tests/src/UnitTest/Tests/FLEX_34807_Test.as
@@ -243,7 +243,7 @@
private function assertTextPastedCorrectlyAndExistingTextNotChanged(pastePosition:int):void
{
const currentSourceAsPlainText:String = TextConverter.export(testApp.getTextFlow(), TextConverter.PLAIN_TEXT_FORMAT, ConversionType.STRING_TYPE) as String;
- assertEquals("Not all the pasted content appears in the new TextFlow!", sourceAsPlainText.substr(0, pastePosition) + PASTED_TEXT + sourceAsPlainText.substr(pastePosition), currentSourceAsPlainText);
+ assertEquals("Not all the pasted content appears in the new TextFlow!", sourceAsPlainText.substr(0, pastePosition) + PASTED_TEXT + "\n" + sourceAsPlainText.substr(pastePosition), currentSourceAsPlainText);
}
}
}
\ No newline at end of file
diff --git a/textLayout/src/flashx/textLayout/edit/TextFlowEdit.as b/textLayout/src/flashx/textLayout/edit/TextFlowEdit.as
index 5908353..491994c 100644
--- a/textLayout/src/flashx/textLayout/edit/TextFlowEdit.as
+++ b/textLayout/src/flashx/textLayout/edit/TextFlowEdit.as
@@ -251,7 +251,7 @@
}
else
{
- if (applyFormat && firstParagraph)
+ if (applyFormat)
{
destinationElement = destinationLeaf ? findLowestPossibleParent(destinationLeaf.parent, scrapElement) : findLowestPossibleParent(destinationElement, scrapElement);
var currentIndex:int = destinationElement.findChildIndexAtPosition(insertPosition - destinationElement.getAbsoluteStart());