Skip to content

Commit

Permalink
Remove TODOs for closed tickets
Browse files Browse the repository at this point in the history
DEVSIX-8937

Autoported commit.
Original commit hash: [d3b25e767]
  • Loading branch information
AnhelinaM authored and iText-CI committed Feb 25, 2025
1 parent 3c42a16 commit d2aa555
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public virtual void TestType3FontWidth() {
[NUnit.Framework.Test]
public virtual void TestDoubleMappedCharacterExtraction() {
String inFile = "double_cmap_mapping.pdf";
// TODO after fixing DEVSIX-6089 first hyphen should be 002D instead of 2011. The similar for the second line
String expectedResult = "Regular hyphen [\u002D] and non-breaking hyphen [\u002D] (both CID 14)\n" + "Turtle kyuujitai [\u9f9c] and turtle radical [\u9f9c] (both CID 7472)";
PdfDocument pdfDocument = new PdfDocument(new PdfReader(SOURCE_FOLDER + inFile));
ITextExtractionStrategy strategy = new SimpleTextExtractionStrategy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,11 @@ public virtual void TestJPXDecode() {

[NUnit.Framework.Test]
public virtual void TestSeparationCSWithICCBasedAsAlternative() {
// TODO: DEVSIX-3538 (update test after fix)
// Android-Conversion-Ignore-Test (TODO DEVSIX-7079 increase memory available for virtual machine while test running)
TestFile("separationCSWithICCBasedAsAlternative.pdf", "Im1", "png");
}

[NUnit.Framework.Test]
public virtual void TestSeparationCSWithDeviceCMYKAsAlternative() {
// TODO: DEVSIX-3538 (update test after fix)
// Android-Conversion-Ignore-Test (TODO DEVSIX-6445 fix different DeflaterOutputStream behavior)
NUnit.Framework.Assert.Catch(typeof(NotSupportedException), () => {
TestFile("separationCSWithDeviceCMYKAsAlternative.pdf", "Im1", "png");
Expand All @@ -145,14 +142,12 @@ public virtual void TestGrayScalePng() {

[NUnit.Framework.Test]
public virtual void TestSeparationCSWithDeviceRGBAsAlternative() {
// TODO: DEVSIX-3538 (update test after fix)
// Android-Conversion-Ignore-Test (TODO DEVSIX-6445 fix different DeflaterOutputStream behavior)
TestFile("separationCSWithDeviceRgbAsAlternative.pdf", "Im1", "png");
}

[NUnit.Framework.Test]
public virtual void TestSeparationCSWithDeviceRGBAsAlternative2() {
// TODO: DEVSIX-3538 (update test after fix)
// Android-Conversion-Ignore-Test (TODO DEVSIX-6445 fix different DeflaterOutputStream behavior)
TestFile("spotColorImagesSmall.pdf", "Im1", "png");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,13 @@ public virtual void TextTransparencyPageOutputIntentTest() {
.FORCE_EMBEDDED);
PdfPage page1 = pdfDocument.AddNewPage();
page1.AddOutputIntent(CreateOutputIntent());
Stream streamGray = FileUtil.GetInputStreamForFile(SOURCE_FOLDER + "BlackWhite.icc");
IccBased gray = new IccBased(streamGray, new float[] { 0.2f });
PdfCanvas canvas = new PdfCanvas(page1);
canvas.SaveState();
PdfExtGState state = new PdfExtGState();
state.SetFillOpacity(0.6f);
canvas.SetExtGState(state);
canvas.BeginText().SetColor(gray, true)
// required here till TODO: DEVSIX-7775 - Check Output intents and colorspaces is implemented
.MoveText(36, 750).SetFontAndSize(font, 16).ShowText("Page with transparency").EndText().RestoreState();
canvas.BeginText().MoveText(36, 750).SetFontAndSize(font, 16).ShowText("Page with transparency").EndText()
.RestoreState();
pdfDocument.Close();
CompareResult(outPdf, cmpPdf);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,11 @@ public virtual void DeviceNColorspaceNoAttributesDictionary() {
PdfType4Function function = new PdfType4Function(transformArray, new float[] { 0, 1, 0, 1, 0, 1 }, "{0}".GetBytes
(iText.Commons.Utils.EncodingUtil.ISO_8859_1));
PdfDictionary currentColorSpaces = new PdfDictionary();
//TODO DEVSIX-4203 should not cause an IndexOutOfBoundException.
// Should throw PdfAConformanceException as Colorants dictionary always must be present
// for Pdf/A-2
NUnit.Framework.Assert.Catch(typeof(Exception), () => pdfA2Checker.CheckColorSpace(new PdfSpecialCs.DeviceN
(tmpArray, new PdfDeviceCs.Rgb(), function), null, currentColorSpaces, true, false));
Exception e = NUnit.Framework.Assert.Catch(typeof(PdfAConformanceException), () => pdfA2Checker.CheckColorSpace
(new PdfSpecialCs.DeviceN(tmpArray, new PdfDeviceCs.Rgb(), function), null, currentColorSpaces, true,
false));
NUnit.Framework.Assert.AreEqual(PdfaExceptionMessageConstant.COLORANTS_DICTIONARY_SHALL_NOT_BE_EMPTY_IN_DEVICE_N_COLORSPACE
, e.Message);
}

[NUnit.Framework.Test]
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ public virtual void NotTrustedRootCertificateInLatestRevisionTest() {
// dummy revision (signing cert of first revision has a chain without any revocation data).
// The second is main revision which verifying we want to test.
verifier.SwitchToPreviousRevision();
// TODO after implementing DEVSIX-6233, 1- pass local CRL for child certificate to LtvVerifier
// 2- don't manually change latestRevision field 3- don't use first signature and DSS in test PDF document
verifier.latestRevision = true;
IList<VerificationOK> verificationOKList = verifier.VerifySignature();
NUnit.Framework.Assert.AreEqual(3, verificationOKList.Count);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,12 +506,16 @@ private void TestSignatureOnRotatedPage(int pageNum, bool useDescription, bool u
// Make sure iText can open the document
new PdfDocument(new PdfReader(dest)).Close();
try {
// TODO DEVSIX-864 compareVisually() should be changed to compareByContent() because it slows down the test
// compareByContent will fail due to signing dates, compareSignatures doesn't check appearance
String testResult = new CompareTool().CompareVisually(dest, SOURCE_FOLDER + "cmp_" + fileName, DESTINATION_FOLDER
, "diff_");
if (null != testResult) {
assertionResults.Append(testResult);
}
testResult = SignaturesCompareTool.CompareSignatures(dest, SOURCE_FOLDER + "cmp_" + fileName);
if (null != testResult) {
assertionResults.Append(testResult);
}
}
catch (CompareTool.CompareToolExecutionException e) {
assertionResults.Append(e.Message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,6 @@ public virtual void ParsePathWithNewLinesTest() {
}

[NUnit.Framework.Test]
//TODO DEVSIX-8769: adapt after supporting
[LogMessage(SvgLogMessageConstant.UNMAPPED_TAG)]
public virtual void DescriptionTagsTest() {
IDictionary<String, ISvgNodeRenderer> map = new Dictionary<String, ISvgNodeRenderer>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ public virtual void GoogleFontsTest() {
public virtual void SvgWithExternalCSStoSingleDefaultPage() {
// TODO: update cmp files when DEVSIX-4396 resolved
// TODO: update cmp files when DEVSIX-6405 resolved
// TODO: update cmp files when DEVSIX-8821 resolved
// TODO: update cmp files when DEVSIX-8822 resolved
// TODO: update cmp files when DEVSIX-8832 resolved
ConvertAndCompare(sourceFolder, destinationFolder, "externalCss");
Expand All @@ -167,7 +166,6 @@ public virtual void SvgWithExternalCSStoSingleDefaultPage() {
public virtual void SvgWithInternalCSStoSingleDefaultPage() {
// TODO: update cmp files when DEVSIX-4396 resolved
// TODO: update cmp files when DEVSIX-6405 resolved
// TODO: update cmp files when DEVSIX-8821 resolved
// TODO: update cmp files when DEVSIX-8822 resolved
// TODO: update cmp files when DEVSIX-8832 resolved
ConvertAndCompare(sourceFolder, destinationFolder, "internalCss");
Expand All @@ -184,7 +182,6 @@ public virtual void SvgWithInternalCSSWithoutOverlapTest() {
public virtual void SvgWithExternalCSStoCustomPage() {
// TODO: update cmp files when DEVSIX-4396 resolved
// TODO: update cmp files when DEVSIX-6405 resolved
// TODO: update cmp files when DEVSIX-8821 resolved
// TODO: update cmp files when DEVSIX-8822 resolved
// TODO: update cmp files when DEVSIX-8832 resolved
// Take a note this method differs from the one used in Default Page test
Expand All @@ -195,7 +192,6 @@ public virtual void SvgWithExternalCSStoCustomPage() {
public virtual void SvgWithInternalCSStoCustomPage() {
// TODO: update cmp files when DEVSIX-4396 resolved
// TODO: update cmp files when DEVSIX-6405 resolved
// TODO: update cmp files when DEVSIX-8821 resolved
// TODO: update cmp files when DEVSIX-8822 resolved
// TODO: update cmp files when DEVSIX-8832 resolved
ConvertAndCompare(sourceFolder, destinationFolder, "internalCss_custom", PageSize.A3.Rotate());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,12 @@ public virtual void PieChartByJFreeSvgTest() {
//Do not make changes in svg file because it was generated by JFreeSVG
[NUnit.Framework.Test]
public virtual void BarChartByJFreeSvgFromStringTest() {
//TODO: update cmp file when DEVSIX-4043 will be fixed
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "usingJFreeSvgBarChartFromStringTest");
}

//Do not make changes in svg file because it was generated by JFreeSVG
[NUnit.Framework.Test]
public virtual void BarChartByJFreeSvgFromFileTest() {
//TODO: update cmp file when DEVSIX-4043 will be fixed
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "usingJFreeSvgBarChartFromFileTest");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ public virtual void ImageRenderingTest() {
}

[NUnit.Framework.Test]
//TODO DEVSIX-8769: adapt after supporting
[LogMessage(SvgLogMessageConstant.UNMAPPED_TAG)]
public virtual void ImageWithDescriptionsTest() {
ConvertAndCompareSinglePage(sourceFolder, destinationFolder, "image-descriptions", properties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public virtual void WidthHeightAttrPercentsPxTest() {

[NUnit.Framework.Test]
public virtual void PreserveAspectRatioViewBoxTest() {
// TODO DEVSIX-3537 Processing of preserveAspectRatio attribute with offsets x and y is not currently supported
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "preserveAspectRatioViewBoxTest");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ private FormsMetaInfoStaticContainer() {
/// <param name="metaInfoContainer">instance to be set.</param>
/// <param name="action">action which will be executed while meta info is set to static context.</param>
public static void UseMetaInfoDuringTheAction(MetaInfoContainer metaInfoContainer, Action action) {
// TODO DEVSIX-6368 We want to prevent customer code being run while meta info is in the static context
try {
metaInfoForLayout.Value = metaInfoContainer;
action();
Expand Down
1 change: 0 additions & 1 deletion itext/itext.forms/itext/forms/xfdf/XfdfReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ private void AddAnnotationToPdf(AnnotObject annotObject, PdfDocument pdfDocument
if (annotName != null) {
switch (annotName) {
case XfdfConstants.TEXT: {
//TODO DEVSIX-4027 add all attributes properly one by one
PdfTextAnnotation pdfTextAnnotation = new PdfTextAnnotation(XfdfObjectUtils.ConvertRectFromString(annotObject
.GetAttributeValue(XfdfConstants.RECT)));
AddCommonAnnotationAttributes(pdfTextAnnotation, annotObject);
Expand Down
2 changes: 1 addition & 1 deletion port-hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
094b10217256cc2efc8c1455adde0bce359204c7
d3b25e7671571d4a3567b5a2309515e30c096db8

0 comments on commit d2aa555

Please sign in to comment.