diff --git a/pom.xml b/pom.xml index 6f64128a6..fbba93088 100644 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ com.itextpdf root - 8.0.4 + 8.0.5 html2pdf - 5.0.4 + 5.0.5 pdfHTML pdfHTML is an iText add-on that lets you to parse (X)HTML snippets and the associated CSS and converts @@ -25,25 +25,6 @@ ${project.parent.version} - - - - true - - itext-snapshot - iText Repository - snapshots - https://repo.itextsupport.com/snapshot - - - - false - - itext-releases - iText Repository - releases - https://repo.itextsupport.com/releases - - - com.itextpdf @@ -79,6 +60,25 @@ + + + + true + + itext-snapshot + iText Repository - snapshots + https://repo.itextsupport.com/snapshot + + + + false + + itext-releases + iText Repository - releases + https://repo.itextsupport.com/releases + + + diff --git a/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java b/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java index d133a933a..fe8358ff6 100644 --- a/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java +++ b/src/main/java/com/itextpdf/html2pdf/actions/data/PdfHtmlProductData.java @@ -30,7 +30,7 @@ This file is part of the iText (R) project. */ public final class PdfHtmlProductData { private static final String PDF_HTML_PUBLIC_PRODUCT_NAME = "pdfHTML"; - private static final String PDF_HTML_VERSION = "5.0.4"; + private static final String PDF_HTML_VERSION = "5.0.5"; private static final int PDF_HTML_COPYRIGHT_SINCE = 2000; private static final int PDF_HTML_COPYRIGHT_TO = 2024; diff --git a/src/main/java/com/itextpdf/html2pdf/attach/impl/DefaultTagWorkerMapping.java b/src/main/java/com/itextpdf/html2pdf/attach/impl/DefaultTagWorkerMapping.java index a95c8ca20..47849498c 100644 --- a/src/main/java/com/itextpdf/html2pdf/attach/impl/DefaultTagWorkerMapping.java +++ b/src/main/java/com/itextpdf/html2pdf/attach/impl/DefaultTagWorkerMapping.java @@ -34,6 +34,7 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.attach.impl.tags.ColTagWorker; import com.itextpdf.html2pdf.attach.impl.tags.ColgroupTagWorker; import com.itextpdf.html2pdf.attach.impl.tags.DisplayFlexTagWorker; +import com.itextpdf.html2pdf.attach.impl.tags.DisplayGridTagWorker; import com.itextpdf.html2pdf.attach.impl.tags.DisplayTableRowTagWorker; import com.itextpdf.html2pdf.attach.impl.tags.DisplayTableTagWorker; import com.itextpdf.html2pdf.attach.impl.tags.DivTagWorker; @@ -204,6 +205,8 @@ class DefaultTagWorkerMapping { (lhs, rhs) -> new DisplayFlexTagWorker(lhs, rhs)); workerMapping.putMapping(TagConstants.SPAN, CssConstants.FLEX, (lhs, rhs) -> new DisplayFlexTagWorker(lhs, rhs)); + workerMapping.putMapping(TagConstants.DIV, CssConstants.GRID, + (lhs, rhs) -> new DisplayGridTagWorker(lhs, rhs)); // pseudo elements mapping String beforePseudoElemName = CssPseudoElementUtil.createPseudoElementTagName(CssConstants.BEFORE); diff --git a/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/DisplayGridTagWorker.java b/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/DisplayGridTagWorker.java new file mode 100644 index 000000000..463a1daa8 --- /dev/null +++ b/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/DisplayGridTagWorker.java @@ -0,0 +1,59 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.attach.impl.tags; + +import com.itextpdf.html2pdf.attach.ITagWorker; +import com.itextpdf.html2pdf.attach.ProcessorContext; +import com.itextpdf.layout.IPropertyContainer; +import com.itextpdf.layout.element.GridContainer; +import com.itextpdf.layout.element.IElement; +import com.itextpdf.styledxmlparser.node.IElementNode; + +/** + * {@link ITagWorker} implementation for elements with {@code display: grid}. + */ +public class DisplayGridTagWorker extends DivTagWorker { + + /** + * Creates a new {@link DisplayGridTagWorker} instance. + * + * @param element the element + * @param context the context + */ + public DisplayGridTagWorker(IElementNode element, ProcessorContext context) { + super(element, context, new GridContainer()); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean processTagChild(ITagWorker childTagWorker, ProcessorContext context) { + final IPropertyContainer element = childTagWorker.getElementResult(); + if (childTagWorker instanceof BrTagWorker) { + return super.processTagChild(childTagWorker, context); + } else { + return addBlockChild((IElement) element); + } + } +} diff --git a/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/DivTagWorker.java b/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/DivTagWorker.java index d7123a194..33504c890 100644 --- a/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/DivTagWorker.java +++ b/src/main/java/com/itextpdf/html2pdf/attach/impl/tags/DivTagWorker.java @@ -66,7 +66,18 @@ public class DivTagWorker implements ITagWorker, IDisplayAware { * @param context the context */ public DivTagWorker(IElementNode element, ProcessorContext context) { - div = new Div(); + this(element, context, new Div()); + } + + /** + * Creates a new {@link DivTagWorker} instance. + * + * @param element the element + * @param context the context + * @param container div element container + */ + protected DivTagWorker(IElementNode element, ProcessorContext context, Div container) { + div = container; Map styles = element.getStyles(); if (styles != null && (styles.containsKey(CssConstants.COLUMN_COUNT) || styles.containsKey(CssConstants.COLUMN_WIDTH))) { multicolContainer = new MulticolContainer(); diff --git a/src/main/java/com/itextpdf/html2pdf/css/CssConstants.java b/src/main/java/com/itextpdf/html2pdf/css/CssConstants.java index 7e16ec515..bd9c6d200 100644 --- a/src/main/java/com/itextpdf/html2pdf/css/CssConstants.java +++ b/src/main/java/com/itextpdf/html2pdf/css/CssConstants.java @@ -31,6 +31,12 @@ This file is part of the iText (R) project. public class CssConstants extends CommonCssConstants { + /** The Constant AUTO_FIT. */ + public static final String AUTO_FIT = "auto-fit"; + + /** The Constant AUTO_FILL. */ + public static final String AUTO_FILL = "auto-fill"; + /** The Constant BLEED. */ public static final String BLEED = "bleed"; @@ -71,6 +77,9 @@ public class CssConstants extends CommonCssConstants { /** The Constant MIN_WIDTH. */ public static final String MIN_WIDTH = "min-width"; + /** The Constant MIN_MAX. */ + public static final String MINMAX = "minmax"; + /** * The Constant OBJECT_FIT. */ @@ -138,8 +147,8 @@ public class CssConstants extends CommonCssConstants { /** The Constant FIRST_EXCEPT. */ public static final String FIRST_EXCEPT = "first-except"; - /** The Constant GRID. */ - public static final String GRID = "grid"; + /** The Constant GRID_AREA. */ + public static final String GRID_AREA = "grid-area"; /** The Constant INLINE. */ public static final String INLINE = "inline"; @@ -223,6 +232,9 @@ public class CssConstants extends CommonCssConstants { /** The Constant SUB. */ public static final String SUB = "sub"; + /** The Constant SUBGRID. */ + public static final String SUBGRID = "subgrid"; + /** The Constant SUPER. */ public static final String SUPER = "super"; diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/BlockCssApplier.java b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/BlockCssApplier.java index 6eecf0d07..b240a51b4 100644 --- a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/BlockCssApplier.java +++ b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/BlockCssApplier.java @@ -33,6 +33,7 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.apply.util.FlexApplierUtil; import com.itextpdf.html2pdf.css.apply.util.FloatApplierUtil; import com.itextpdf.html2pdf.css.apply.util.FontStyleApplierUtil; +import com.itextpdf.html2pdf.css.apply.util.GridApplierUtil; import com.itextpdf.html2pdf.css.apply.util.HyphenationApplierUtil; import com.itextpdf.html2pdf.css.apply.util.MarginApplierUtil; import com.itextpdf.html2pdf.css.apply.util.OpacityApplierUtil; @@ -81,6 +82,7 @@ public void apply(ProcessorContext context, IStylesContainer stylesContainer, IT OrphansWidowsApplierUtil.applyOrphansAndWidows(cssProps, container); VerticalAlignmentApplierUtil.applyVerticalAlignmentForBlocks(cssProps, container, isInlineItem(tagWorker)); MultiColumnCssApplierUtil.applyMultiCol(cssProps, context, container); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, container); if (isFlexItem(stylesContainer)) { FlexApplierUtil.applyFlexItemProperties(cssProps, context, container); } else { diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/DefaultTagCssApplierMapping.java b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/DefaultTagCssApplierMapping.java index 5b326f84f..45ad93403 100644 --- a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/DefaultTagCssApplierMapping.java +++ b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/DefaultTagCssApplierMapping.java @@ -152,6 +152,7 @@ class DefaultTagCssApplierMapping { mapping.putMapping(TagConstants.DIV, CssConstants.TABLE_ROW, () -> new DisplayTableRowTagCssApplier()); mapping.putMapping(TagConstants.DIV, CssConstants.FLEX, () -> new DisplayFlexTagCssApplier()); mapping.putMapping(TagConstants.SPAN, CssConstants.FLEX, () -> new DisplayFlexTagCssApplier()); + mapping.putMapping(TagConstants.DIV, CssConstants.GRID, () -> new DisplayGridTagCssApplier()); // pseudo elements mapping String beforePseudoElemName = CssPseudoElementUtil.createPseudoElementTagName(CssConstants.BEFORE); diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/DisplayFlexTagCssApplier.java b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/DisplayFlexTagCssApplier.java index 1b3f5ab4d..a4cceffa4 100644 --- a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/DisplayFlexTagCssApplier.java +++ b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/DisplayFlexTagCssApplier.java @@ -46,6 +46,5 @@ public void apply(ProcessorContext context, IStylesContainer stylesContainer, IT container.deleteOwnProperty(Property.OVERFLOW_X); container.deleteOwnProperty(Property.OVERFLOW_Y); } - MultiColumnCssApplierUtil.applyMultiCol(stylesContainer.getStyles(), context, container); } } diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/DisplayGridTagCssApplier.java b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/DisplayGridTagCssApplier.java new file mode 100644 index 000000000..23a9253e8 --- /dev/null +++ b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/DisplayGridTagCssApplier.java @@ -0,0 +1,51 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.apply.impl; + +import com.itextpdf.html2pdf.attach.ITagWorker; +import com.itextpdf.html2pdf.attach.ProcessorContext; +import com.itextpdf.html2pdf.css.apply.ICssApplier; +import com.itextpdf.html2pdf.css.apply.util.GridApplierUtil; +import com.itextpdf.layout.IPropertyContainer; +import com.itextpdf.styledxmlparser.node.IStylesContainer; + +import java.util.Map; + +/** + * {@link ICssApplier} implementation for elements with display grid. + */ +public class DisplayGridTagCssApplier extends BlockCssApplier { + + /** + * {@inheritDoc} + */ + @Override + public void apply(ProcessorContext context, IStylesContainer stylesContainer, ITagWorker tagWorker) { + super.apply(context, stylesContainer, tagWorker); + final IPropertyContainer container = tagWorker.getElementResult(); + if (container != null) { + Map cssProps = stylesContainer.getStyles(); + GridApplierUtil.applyGridContainerProperties(cssProps, container, context); + } + } +} diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/MultiColumnCssApplierUtil.java b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/MultiColumnCssApplierUtil.java index 017a988db..6182dde6f 100644 --- a/src/main/java/com/itextpdf/html2pdf/css/apply/impl/MultiColumnCssApplierUtil.java +++ b/src/main/java/com/itextpdf/html2pdf/css/apply/impl/MultiColumnCssApplierUtil.java @@ -64,6 +64,15 @@ public static void applyMultiCol(Map cssProps, ProcessorContext element.setProperty(Property.COLUMN_WIDTH, width.getValue()); } + if (!element.hasProperty(Property.COLUMN_WIDTH) && !element.hasProperty(Property.COLUMN_COUNT)) { + if (CommonCssConstants.AUTO.equals(cssProps.get(CssConstants.COLUMN_COUNT)) + || CommonCssConstants.AUTO.equals(cssProps.get(CssConstants.COLUMN_WIDTH))) { + element.setProperty(Property.COLUMN_COUNT, 1); + } else { + return; + } + } + final UnitValue gap = CssDimensionParsingUtils.parseLengthValueToPt(cssProps.get(CssConstants.COLUMN_GAP), emValue, remValue); if (gap != null) { @@ -74,11 +83,6 @@ public static void applyMultiCol(Map cssProps, ProcessorContext if (!element.hasProperty(Property.COLUMN_GAP)) { element.setProperty(Property.COLUMN_GAP, CssDimensionParsingUtils.parseRelativeValue("1em", emValue)); } - if (!element.hasProperty(Property.COLUMN_COUNT) && !element.hasProperty(Property.COLUMN_WIDTH) - && (CommonCssConstants.AUTO.equals(cssProps.get(CssConstants.COLUMN_COUNT)) - || CommonCssConstants.AUTO.equals(cssProps.get(CssConstants.COLUMN_WIDTH)))) { - element.setProperty(Property.COLUMN_COUNT, 1); - } final Border borderFromCssProperties = BorderStyleApplierUtil.getCertainBorder( cssProps.get(CssConstants.COLUMN_RULE_WIDTH), cssProps.get(CssConstants.COLUMN_RULE_STYLE), diff --git a/src/main/java/com/itextpdf/html2pdf/css/apply/util/GridApplierUtil.java b/src/main/java/com/itextpdf/html2pdf/css/apply/util/GridApplierUtil.java new file mode 100644 index 000000000..1c334a0d9 --- /dev/null +++ b/src/main/java/com/itextpdf/html2pdf/css/apply/util/GridApplierUtil.java @@ -0,0 +1,755 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.apply.util; + +import com.itextpdf.commons.datastructures.Tuple2; +import com.itextpdf.commons.utils.MapUtil; +import com.itextpdf.commons.utils.MessageFormatUtil; +import com.itextpdf.html2pdf.attach.ProcessorContext; +import com.itextpdf.html2pdf.css.CssConstants; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.layout.IPropertyContainer; +import com.itextpdf.layout.element.IAbstractElement; +import com.itextpdf.layout.element.IElement; +import com.itextpdf.layout.properties.Property; +import com.itextpdf.layout.properties.UnitValue; +import com.itextpdf.layout.properties.grid.AutoRepeatValue; +import com.itextpdf.layout.properties.grid.AutoValue; +import com.itextpdf.layout.properties.grid.BreadthValue; +import com.itextpdf.layout.properties.grid.FitContentValue; +import com.itextpdf.layout.properties.grid.FixedRepeatValue; +import com.itextpdf.layout.properties.grid.FlexValue; +import com.itextpdf.layout.properties.grid.GridFlow; +import com.itextpdf.layout.properties.grid.GridValue; +import com.itextpdf.layout.properties.grid.MaxContentValue; +import com.itextpdf.layout.properties.grid.MinContentValue; +import com.itextpdf.layout.properties.grid.MinMaxValue; +import com.itextpdf.layout.properties.grid.PercentValue; +import com.itextpdf.layout.properties.grid.PointValue; +import com.itextpdf.layout.properties.grid.TemplateValue; +import com.itextpdf.styledxmlparser.css.CommonCssConstants; +import com.itextpdf.styledxmlparser.css.util.CssDimensionParsingUtils; +import com.itextpdf.styledxmlparser.css.util.CssUtils; +import com.itextpdf.styledxmlparser.node.IStylesContainer; +import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Utilities class to apply css grid properties and styles. + */ +public final class GridApplierUtil { + + private static final Logger LOGGER = LoggerFactory.getLogger(GridApplierUtil.class); + + private static final Pattern SPAN_PLACEMENT = Pattern.compile("^span\\s+(.+)$"); + + /** + * Property map which maps property order in grid-area css prop to layout property + */ + private static final Map propsMap = new HashMap<>(); + + /** + * Property map which maps property order in grid-area css prop to grid span property + */ + private static final Map spansMap = new HashMap<>(); + static { + propsMap.put(0, Property.GRID_ROW_START); + propsMap.put(1, Property.GRID_COLUMN_START); + propsMap.put(2, Property.GRID_ROW_END); + propsMap.put(3, Property.GRID_COLUMN_END); + + spansMap.put(0, Property.GRID_ROW_SPAN); + spansMap.put(1, Property.GRID_COLUMN_SPAN); + spansMap.put(2, Property.GRID_ROW_SPAN); + spansMap.put(3, Property.GRID_COLUMN_SPAN); + } + + private GridApplierUtil() { + // empty constructor + } + + /** + * Applies grid properties to a grid item. + * + * @param cssProps the CSS properties + * @param stylesContainer the styles container + * @param element the element + */ + public static void applyGridItemProperties(Map cssProps, IStylesContainer stylesContainer, + IPropertyContainer element) { + if (!(stylesContainer instanceof JsoupElementNode) + || !(((JsoupElementNode) stylesContainer).parentNode() instanceof JsoupElementNode)) { + return; + } + final Map parentStyles = ((JsoupElementNode) ((JsoupElementNode) stylesContainer) + .parentNode()).getStyles(); + if (!CssConstants.GRID.equals(parentStyles.get(CssConstants.DISPLAY))) { + // Not a grid - return + return; + } + + applyGridArea(cssProps, element); + + applyGridItemPlacement(cssProps.get(CssConstants.GRID_COLUMN_END), element, Property.GRID_COLUMN_END, Property.GRID_COLUMN_SPAN); + applyGridItemPlacement(cssProps.get(CssConstants.GRID_COLUMN_START), element, Property.GRID_COLUMN_START, Property.GRID_COLUMN_SPAN); + applyGridItemPlacement(cssProps.get(CssConstants.GRID_ROW_END), element, Property.GRID_ROW_END, Property.GRID_ROW_SPAN); + applyGridItemPlacement(cssProps.get(CssConstants.GRID_ROW_START), element, Property.GRID_ROW_START, Property.GRID_ROW_SPAN); + } + + /** + * Applies grid properties to a grid container. + * + * @param cssProps the CSS properties + * @param container the grid container + * @param context the context + */ + public static void applyGridContainerProperties(Map cssProps, IPropertyContainer container, + ProcessorContext context) { + + final float emValue = CssDimensionParsingUtils.parseAbsoluteFontSize(cssProps.get(CssConstants.FONT_SIZE)); + final float remValue = context.getCssContext().getRootFontSize(); + + NamedAreas namedAreas = applyNamedAreas(cssProps.get(CssConstants.GRID_TEMPLATE_AREAS), container); + + applyTemplate(cssProps.get(CssConstants.GRID_TEMPLATE_COLUMNS), container, Property.GRID_TEMPLATE_COLUMNS, + emValue, remValue, namedAreas); + applyTemplate(cssProps.get(CssConstants.GRID_TEMPLATE_ROWS), container, Property.GRID_TEMPLATE_ROWS, + emValue, remValue, namedAreas); + + applyAuto(cssProps.get(CssConstants.GRID_AUTO_ROWS), container, Property.GRID_AUTO_ROWS, emValue, remValue); + applyAuto(cssProps.get(CssConstants.GRID_AUTO_COLUMNS), container, Property.GRID_AUTO_COLUMNS, emValue, remValue); + applyFlow(cssProps.get(CssConstants.GRID_AUTO_FLOW), container); + + applyGap(container, emValue, remValue, cssProps.get(CssConstants.COLUMN_GAP), Property.COLUMN_GAP); + applyGap(container, emValue, remValue, cssProps.get(CssConstants.GRID_COLUMN_GAP), Property.COLUMN_GAP); + applyGap(container, emValue, remValue, cssProps.get(CssConstants.ROW_GAP), Property.ROW_GAP); + applyGap(container, emValue, remValue, cssProps.get(CssConstants.GRID_ROW_GAP), Property.ROW_GAP); + } + + private static void applyGap(IPropertyContainer container, float emValue, float remValue, String gap, int property) { + final UnitValue gapValue = CssDimensionParsingUtils.parseLengthValueToPt(gap, emValue, remValue); + if (gapValue != null) { + container.setProperty(property, gapValue.getValue()); + } + } + + private static void applyAuto(String autoStr, IPropertyContainer container, int property, float emValue, float remValue) { + if (autoStr != null) { + TemplateValue value = parseTemplateValue(autoStr, emValue, remValue); + if (value != null) { + container.setProperty(property, value); + } + } + } + + private static void applyFlow(String flow, IPropertyContainer container) { + GridFlow value = GridFlow.ROW; + if (flow != null) { + if (flow.contains(CommonCssConstants.COLUMN)) { + if (flow.contains(CssConstants.DENSE)) { + value = GridFlow.COLUMN_DENSE; + } else { + value = GridFlow.COLUMN; + } + } else if (flow.contains(CssConstants.DENSE)) { + value = GridFlow.ROW_DENSE; + } + } + container.setProperty(Property.GRID_FLOW, value); + } + + private static NamedAreas applyNamedAreas(String gridTemplateAreas, IPropertyContainer container) { + if (gridTemplateAreas == null || CommonCssConstants.NONE.equals(gridTemplateAreas)) { + return null; + } + + NamedAreas namedAreas = parseGridTemplateAreas(gridTemplateAreas); + List children = ((IAbstractElement) container).getChildren(); + for (IElement child : children) { + // Area name can be only in GRID_ROW_START + Object propValue = child.getProperty(Property.GRID_ROW_START); + if (propValue instanceof String) { + // It will override all props by integers if area name is found + namedAreas.setPlaceToElement((String) propValue, child); + } + } + + return namedAreas; + } + + private static void applyTemplate(String templateStr, IPropertyContainer container, int property, + float emValue, float remValue, NamedAreas namedAreas) { + if (templateStr != null && templateStr.contains(CssConstants.SUBGRID)) { + LOGGER.warn(Html2PdfLogMessageConstant.SUBGRID_VALUE_IS_NOT_SUPPORTED); + } + + Map> lineNumbersPerName = new HashMap<>(); + int namedAreaLength = 0; + final boolean applyColumns = property == Property.GRID_TEMPLATE_COLUMNS; + if (namedAreas != null) { + if (applyColumns) { + lineNumbersPerName = namedAreas.getNamedColumnNumbers(); + namedAreaLength = namedAreas.getColumnsCount(); + } else { + lineNumbersPerName = namedAreas.getNamedRowNumbers(); + namedAreaLength = namedAreas.getRowsCount(); + } + } + final List templateResult = new ArrayList<>(); + int currentLine = 1; + if (templateStr != null) { + final List templateStrArray = CssUtils.extractShorthandProperties(templateStr).get(0); + for (String str : templateStrArray) { + TemplateValue value = parseTemplateValue(str, emValue, remValue, lineNumbersPerName, currentLine); + if (value != null) { + templateResult.add(value); + if (value instanceof FixedRepeatValue) { + currentLine += ((FixedRepeatValue) value).getRepeatCount() * + ((FixedRepeatValue) value).getValues().size(); + } else { + ++currentLine; + } + } + } + if (templateResult.isEmpty()) { + LOGGER.warn(MessageFormatUtil.format(Html2PdfLogMessageConstant.GRID_TEMPLATE_WAS_NOT_RECOGNISED, + applyColumns ? "columns" : "rows")); + } else { + container.setProperty(property, templateResult); + } + } + + // Now process all children to apply line names + int startProperty; + int endProperty; + int spanProperty; + if (applyColumns) { + startProperty = Property.GRID_COLUMN_START; + endProperty = Property.GRID_COLUMN_END; + spanProperty = Property.GRID_COLUMN_SPAN; + } else { + startProperty = Property.GRID_ROW_START; + endProperty = Property.GRID_ROW_END; + spanProperty = Property.GRID_ROW_SPAN; + } + + List children = ((IAbstractElement) container).getChildren(); + for (IElement child : children) { + substituteLinename(lineNumbersPerName, startProperty, child, + Math.max(namedAreaLength + 1, currentLine), "-start"); + substituteLinename(lineNumbersPerName, endProperty, child, + Math.max(namedAreaLength + 1, currentLine), "-end"); + substituteLinenameInSpan(lineNumbersPerName, startProperty, endProperty, spanProperty, child, + Math.max(namedAreaLength + 1, currentLine)); + } + } + + private static void substituteLinenameInSpan(Map> lineNumbersPerName, + int startProperty, int endProperty, int spanProperty, + IElement child, int lastLineNumber) { + Object propValue = child.getProperty(spanProperty); + if (!(propValue instanceof String)) { + // It means it's null or we processed it earlier + return; + } + child.deleteOwnProperty(spanProperty); + + // Here we need one of grid-row/column-start or grid-row/column-end + // as otherwise the property doesn't have sense + // And we know that there can't be both start and end at this point + Integer startPoint = child.getProperty(startProperty); + Integer endPoint = child.getProperty(endProperty); + if (startPoint == null && endPoint == null) { + return; + } + + Tuple2 parsedValue = parseStringValue((String) propValue); + final int distance = parsedValue.getFirst(); + final String strValue = parsedValue.getSecond(); + + List lineNumbers = lineNumbersPerName.get(strValue); + if (lineNumbers == null || distance <= 0 || strValue == null) { + return; + } + + // We should span by X linenames back or forth starting from current position + final int direction = startPoint != null ? 1 : -1; + final int startPosition = startPoint != null ? startPoint.intValue() : endPoint.intValue(); + + // linenumbers are sorted, let's find current position in the array + int start = -1; + int correction = -direction; + for (Integer lineNumber : lineNumbers) { + ++start; + if (startPosition <= lineNumber) { + if (startPosition == lineNumber) { + correction = 0; + } + break; + } + } + + int spanIdx = start + distance * direction + correction; + if (spanIdx < 0) { + // Going negative is not supported + return; + } + int endPosition; + if (spanIdx > lineNumbers.size() - 1) { + // Increase grid + endPosition = lastLineNumber + spanIdx - (lineNumbers.size() - 1); + } else { + endPosition = lineNumbers.get(spanIdx); + } + + if (direction == 1) { + child.setProperty(endProperty, endPosition); + } else { + child.setProperty(startProperty, endPosition); + } + } + + private static void substituteLinename(Map> lineNumbersPerName, int property, + IElement child, int lastLineNumber, String alternateLineNameSuffix) { + Object propValue = child.getProperty(property); + if (!(propValue instanceof String)) { + // It means it's null or we processed it earlier + return; + } + child.deleteOwnProperty(property); + + Tuple2 parsedValue = parseStringValue((String) propValue); + int idx = parsedValue.getFirst(); + String strValue = parsedValue.getSecond(); + if (idx == 0 || strValue == null) { + return; + } + + List lineNumbers = lineNumbersPerName.get(strValue); + if (lineNumbers == null) { + lineNumbers = lineNumbersPerName.get(strValue + alternateLineNameSuffix); + } + if (lineNumbers == null) { + return; + } + + if (idx > lineNumbers.size()) { + // Increase grid + // We should also go to negative in a similar manner + // but currently we don't support negative columns/rows + child.setProperty(property, lastLineNumber + idx - lineNumbers.size()); + return; + } + + if (Math.abs(idx) > lineNumbers.size()) { + // The case when it's too negative + LOGGER.error(Html2PdfLogMessageConstant.ADDING_GRID_LINES_TO_THE_LEFT_OR_TOP_IS_NOT_SUPPORTED); + return; + } + if (idx < 0) { + idx = lineNumbers.size() + idx + 1; + } + child.setProperty(property, lineNumbers.get(idx - 1)); + } + + private static Tuple2 parseStringValue(String strPropValue) { + String[] propValues = strPropValue.split("\\s+"); + int idx = 1; + String strValue = null; + if (propValues.length == 1) { + strValue = propValues[0]; + } else if (propValues.length == 2) { + // Here we have two options + // grid-row-start: 1 a and grid-row-start a 1 + final Integer i0 = CssDimensionParsingUtils.parseInteger(propValues[0]); + final Integer i1 = CssDimensionParsingUtils.parseInteger(propValues[1]); + final Integer i = i0 != null ? i0 : i1; + if (i != null) { + idx = i.intValue(); + } + strValue = i0 != null ? propValues[1] : propValues[0]; + } + + return new Tuple2(idx, strValue); + } + + private static TemplateValue parseTemplateValue(String str, float emValue, float remValue) { + final UnitValue unit = CssDimensionParsingUtils.parseLengthValueToPt(str, emValue, remValue); + if (unit != null) { + if (unit.isPointValue()) { + return new PointValue(unit.getValue()); + } else { + return new PercentValue(unit.getValue()); + } + } + if (CommonCssConstants.MIN_CONTENT.equals(str)) { + return MinContentValue.VALUE; + } + if (CommonCssConstants.MAX_CONTENT.equals(str)) { + return MaxContentValue.VALUE; + } + if (CommonCssConstants.AUTO.equals(str)) { + return AutoValue.VALUE; + } + final Float fr = CssDimensionParsingUtils.parseFlex(str); + if (fr != null) { + return new FlexValue((float) fr); + } + if (determineFunction(str, CommonCssConstants.FIT_CONTENT)) { + return parseFitContent(str, emValue, remValue); + } + if (determineFunction(str, CssConstants.MINMAX)) { + return parseMinMax(str, emValue, remValue); + } + return null; + } + + private static TemplateValue parseTemplateValue(String str, float emValue, float remValue, + Map> lineNumbersPerName, int currentLine) { + + if (str == null) { + return null; + } + + if (str.startsWith("[") && str.endsWith("]")) { + // It's a linename + String strStripped = str.substring(1, str.length() - 1); + String[] linenames = strStripped.trim().split("\\s+"); + for (String linename : linenames) { + if (!lineNumbersPerName.containsKey(linename)) { + lineNumbersPerName.put(linename, new ArrayList<>(1)); + } + lineNumbersPerName.get(linename).add(currentLine); + } + + return null; + } + + if (determineFunction(str, CommonCssConstants.REPEAT)) { + return parseRepeat(str, emValue, remValue, lineNumbersPerName, currentLine); + } + + return parseTemplateValue(str, emValue, remValue); + } + + private static FitContentValue parseFitContent(String str, float emValue, float remValue) { + UnitValue length = CssDimensionParsingUtils.parseLengthValueToPt( + str.substring(CommonCssConstants.FIT_CONTENT.length() + 1, str.length() - 1), emValue, remValue); + if (length == null) { + return null; + } + return new FitContentValue(length); + } + + private static boolean determineFunction(String str, String function) { + return str.startsWith(function) + && str.length() > function.length() + 2; + } + + private static TemplateValue parseMinMax(String str, float emValue, float remValue) { + int parameterSeparator = str.indexOf(','); + if (parameterSeparator < 0) { + return null; + } + TemplateValue min = parseTemplateValue(str.substring(CssConstants.MINMAX.length() + 1, parameterSeparator).trim(), emValue, remValue); + TemplateValue max = parseTemplateValue(str.substring(parameterSeparator + 1, str.length() - 1).trim(), emValue, remValue); + if (!(min instanceof BreadthValue) || !(max instanceof BreadthValue)) { + return null; + } + return new MinMaxValue((BreadthValue)min, (BreadthValue)max); + } + + private static TemplateValue parseRepeat(String str, float emValue, float remValue, + Map> lineNumbersPerName, int currentLine) { + List repeatList = new ArrayList<>(); + int repeatTypeEndIndex = str.indexOf(','); + if (repeatTypeEndIndex < 0) { + return null; + } + String repeatType = str.substring(CommonCssConstants.REPEAT.length() + 1, repeatTypeEndIndex).trim(); + Integer repeatCount = CssDimensionParsingUtils.parseInteger(repeatType); + + List repeatStr = CssUtils.extractShorthandProperties( + str.substring(repeatTypeEndIndex + 1, str.length() - 1)).get(0); + Map> repeatLineNumbersPerName = new HashMap<>(); + for (String strValue : repeatStr) { + TemplateValue value = parseTemplateValue(strValue, emValue, remValue, + repeatLineNumbersPerName, currentLine); + if (value instanceof GridValue) { + repeatList.add((GridValue) value); + ++currentLine; + } + } + + // Now multiply line numbers for repeats + if (repeatCount != null && repeatCount.intValue() > 1) { + for (List repeatLineNumbers : repeatLineNumbersPerName.values()) { + List extraLineNumbers = new ArrayList<>(); + for (int i = 1; i < repeatCount.intValue(); ++i) { + for (Integer lineNumber : repeatLineNumbers) { + final int extraLineNumber = lineNumber.intValue() + repeatList.size() * i; + if (!extraLineNumbers.contains(extraLineNumber)) { + extraLineNumbers.add(extraLineNumber); + } + } + } + repeatLineNumbers.removeAll(extraLineNumbers); + repeatLineNumbers.addAll(extraLineNumbers); + } + } + + // Now merge with common lineNumbersPerName + MapUtil.merge(lineNumbersPerName, repeatLineNumbersPerName, (List dest, List source) -> { + dest.removeAll(source); + dest.addAll(source); + return dest; + }); + + if (repeatCount != null) { + return new FixedRepeatValue(repeatCount.intValue(), repeatList); + } else if (CssConstants.AUTO_FILL.equals(repeatType)) { + if (!lineNumbersPerName.isEmpty()) { + LOGGER.warn(Html2PdfLogMessageConstant.LINENAMES_ARE_NOT_SUPPORTED_WITHIN_AUTO_REPEAT); + } + return new AutoRepeatValue(false, repeatList); + } else if (CssConstants.AUTO_FIT.equals(repeatType)) { + if (!lineNumbersPerName.isEmpty()) { + LOGGER.warn(Html2PdfLogMessageConstant.LINENAMES_ARE_NOT_SUPPORTED_WITHIN_AUTO_REPEAT); + } + return new AutoRepeatValue(true, repeatList); + } + return null; + } + + private static void applyGridArea(Map cssProps, IPropertyContainer element) { + if (cssProps.get(CssConstants.GRID_AREA) == null) { + return; + } + + String gridArea = cssProps.get(CssConstants.GRID_AREA); + String[] gridAreaParts = gridArea.split("/"); + for(int i = 0; i < gridAreaParts.length; ++i) { + String part = gridAreaParts[i].trim(); + if (CommonCssConstants.AUTO.equals(part)) { + // We override already set value if any + element.deleteOwnProperty(propsMap.get(i).intValue()); + continue; + } + + // If it's an area name from grid-template-areas, it will go into GRID_ROW_START + applyGridItemPlacement(part, element, propsMap.get(i).intValue(), spansMap.get(i).intValue()); + } + } + + private static void applyGridItemPlacement(String value, IPropertyContainer element, + int property, int spanProperty) { + if (value == null) { + return; + } + + Integer intValue = CssDimensionParsingUtils.parseInteger(value); + if (intValue != null) { + // grid-row-start: 2 + element.setProperty(property, intValue); + return; + } + + Matcher matcher = SPAN_PLACEMENT.matcher(value.trim()); + if (matcher.matches()) { + Integer spanValue = CssDimensionParsingUtils.parseInteger(matcher.group(1)); + if (spanValue != null) { + // grid-row-start: span 2 + element.setProperty(spanProperty, spanValue); + } else { + // grid-row-start: span linename or grid-row-start: span linename 2 + // Later on we will convert linename to number or remove + element.setProperty(spanProperty, matcher.group(1).trim()); + } + + return; + } + + // grid-row-start: linename + // Later on we will convert linename to number or remove + element.setProperty(property, value.trim()); + } + + private static NamedAreas parseGridTemplateAreas(String templateAreas) { + NamedAreas res = new NamedAreas(); + + String[] rows = templateAreas.split("[\\\"|']"); + int rowIdx = 0; + for(String row : rows) { + String rowTrimmed = row.trim(); + if (rowTrimmed.isEmpty()) { + continue; + } + ++rowIdx; + int columnIdx = 0; + String[] names = rowTrimmed.split("\\s+"); + for(String name : names) { + if (name.isEmpty()) { + continue; + } + ++columnIdx; + + res.addName(name, rowIdx, columnIdx); + } + } + + return res; + } + + private final static class NamedAreas { + private static final String DOT_PLACEHOLDER = "."; + private static final String AREA_START_SUFFIX = "-start"; + private static final String AREA_END_SUFFIX = "-end"; + private final Map areas = new HashMap<>(); + private int rowsCount = 0; + private int columnsCount = 0; + + NamedAreas() { + // Empty constructor + } + + public void addName(String name, int row, int column) { + // Dot has a special meaning saying this area is not named and grid-template-areas doesn't work for it + // Numbers are also not allowed + if (DOT_PLACEHOLDER.equals(name) || CssDimensionParsingUtils.parseInteger(name) != null) { + return; + } + + Placement placement = areas.get(name); + if (placement == null) { + areas.put(name, new Placement(row, row, column, column)); + } else { + placement.increaseSpansTill(row, column); + } + + rowsCount = Math.max(rowsCount, row); + columnsCount = Math.max(columnsCount, column); + } + + public void setPlaceToElement(String name, IPropertyContainer element) { + Placement placement = areas.get(name); + if (placement == null) { + return; + } + + element.setProperty(Property.GRID_ROW_START, placement.getRowStart()); + element.setProperty(Property.GRID_ROW_END, placement.getRowEnd() + 1); + element.setProperty(Property.GRID_COLUMN_START, placement.getColumnStart()); + element.setProperty(Property.GRID_COLUMN_END, placement.getColumnEnd() + 1); + } + + public Map> getNamedRowNumbers() { + Map> namedNumbers = new HashMap<>(areas.size() * 2); + for (Map.Entry area : areas.entrySet()) { + namedNumbers.put(area.getKey() + AREA_START_SUFFIX, + new ArrayList<>(Arrays.asList(area.getValue().getRowStart()))); + namedNumbers.put(area.getKey() + AREA_END_SUFFIX, + new ArrayList<>(Arrays.asList(area.getValue().getRowEnd() + 1))); + } + + return namedNumbers; + } + + public Map> getNamedColumnNumbers() { + Map> namedNumbers = new HashMap<>(); + for (Map.Entry area : areas.entrySet()) { + namedNumbers.put(area.getKey() + AREA_START_SUFFIX, + new ArrayList<>(Arrays.asList(area.getValue().getColumnStart()))); + namedNumbers.put(area.getKey() + AREA_END_SUFFIX, + new ArrayList<>(Arrays.asList(area.getValue().getColumnEnd() + 1))); + } + + return namedNumbers; + } + + public int getRowsCount() { + return rowsCount; + } + + public int getColumnsCount() { + return columnsCount; + } + } + + private final static class Placement { + + // 1-based indexes. + private int rowStart; + private int rowEnd; + private int columnStart; + private int columnEnd; + + public Placement(int rowStart, int rowEnd, int columnStart, int columnEnd) { + this.rowStart = rowStart; + this.rowEnd = rowEnd; + this.columnStart = columnStart; + this.columnEnd = columnEnd; + } + + public void increaseSpansTill(int row, int column) { + boolean valid = false; + if (row == rowEnd + 1) { + valid = column == columnStart; + } else if (column == columnEnd + 1) { + valid = row == rowEnd; + } else { + // valid stays false + } + if (!valid) { + LOGGER.error(Html2PdfLogMessageConstant.GRID_TEMPLATE_AREAS_IS_INVALID); + return; + } + rowEnd = row; + columnEnd = column; + } + + public int getRowStart() { + return rowStart; + } + + public int getRowEnd() { + return rowEnd; + } + + public int getColumnStart() { + return columnStart; + } + + public int getColumnEnd() { + return columnEnd; + } + } +} diff --git a/src/main/java/com/itextpdf/html2pdf/css/resolve/DefaultCssResolver.java b/src/main/java/com/itextpdf/html2pdf/css/resolve/DefaultCssResolver.java index 266a239a1..7d08847cd 100644 --- a/src/main/java/com/itextpdf/html2pdf/css/resolve/DefaultCssResolver.java +++ b/src/main/java/com/itextpdf/html2pdf/css/resolve/DefaultCssResolver.java @@ -182,12 +182,13 @@ private Map resolveStyles(INode element, CssContext context) { CommonCssConstants.FONT_SIZE), inheritanceRules); // If the parent has display: flex, the flex item is blockified - // no matter what display value is set for it (except 'none' value). + // no matter what display value is set for it (except 'none' and 'grid' values). // See CSS Flexible Box Layout Module Level 1, // W3C Candidate Recommendation, 19 November 2018: 4. Flex Items. final String currentElementDisplay = elementStyles.get(CssConstants.DISPLAY); if (isFlexItem(entry, currentElementDisplay) && - !CommonCssConstants.NONE.equals(currentElementDisplay)) { + !CommonCssConstants.NONE.equals(currentElementDisplay) && + !CommonCssConstants.GRID.equals(currentElementDisplay)) { elementStyles.put(CssConstants.DISPLAY, CssConstants.BLOCK); } } diff --git a/src/main/java/com/itextpdf/html2pdf/logs/Html2PdfLogMessageConstant.java b/src/main/java/com/itextpdf/html2pdf/logs/Html2PdfLogMessageConstant.java index 7c0008740..8f9a86917 100644 --- a/src/main/java/com/itextpdf/html2pdf/logs/Html2PdfLogMessageConstant.java +++ b/src/main/java/com/itextpdf/html2pdf/logs/Html2PdfLogMessageConstant.java @@ -173,6 +173,14 @@ public final class Html2PdfLogMessageConstant { public static final String OPTGROUP_NOT_SUPPORTED_IN_INTERACTIVE_SELECT = "Option groups are not supported in " + "interactive mode"; public static final String IMMEDIATE_FLUSH_DISABLED = "Setting createAcroForm disables immediateFlush property"; + public static final String GRID_TEMPLATE_AREAS_IS_INVALID = "grid-template-areas property is invalid. " + + "The result is nondeterministic"; + public static final String LINENAMES_ARE_NOT_SUPPORTED_WITHIN_AUTO_REPEAT = "Line names are not supported " + + "with auto-repeat as a track-size"; + public static final String ADDING_GRID_LINES_TO_THE_LEFT_OR_TOP_IS_NOT_SUPPORTED = "Adding grid lines to the left " + + "or to the top is not supported"; + public static final String SUBGRID_VALUE_IS_NOT_SUPPORTED = "Subgrid value for grid-template-row\\columns isn't supported"; + public static final String GRID_TEMPLATE_WAS_NOT_RECOGNISED = "Grid template {0} value was not recognised"; private Html2PdfLogMessageConstant() { //Private constructor will prevent the instantiation of this class directly diff --git a/src/test/java/com/itextpdf/html2pdf/ConverterPropertiesTest.java b/src/test/java/com/itextpdf/html2pdf/ConverterPropertiesTest.java index a269e5092..5d798fb7c 100644 --- a/src/test/java/com/itextpdf/html2pdf/ConverterPropertiesTest.java +++ b/src/test/java/com/itextpdf/html2pdf/ConverterPropertiesTest.java @@ -25,13 +25,12 @@ This file is part of the iText (R) project. import com.itextpdf.commons.actions.NamespaceConstant; import com.itextpdf.commons.actions.contexts.IMetaInfo; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class ConverterPropertiesTest extends ExtendedITextTest { @Test @@ -40,7 +39,7 @@ public void getDefaultMetaInfoTest() { IMetaInfo metaInfo = properties.getEventMetaInfo(); - Assert.assertTrue(metaInfo.getClass().getName().startsWith(NamespaceConstant.PDF_HTML + ".")); + Assertions.assertTrue(metaInfo.getClass().getName().startsWith(NamespaceConstant.PDF_HTML + ".")); } @Test @@ -51,25 +50,25 @@ public void setEventMetaInfoAndGetTest() { properties.setEventMetaInfo(testMetaInfo); IMetaInfo metaInfo = properties.getEventMetaInfo(); - Assert.assertSame(testMetaInfo, metaInfo); + Assertions.assertSame(testMetaInfo, metaInfo); } @Test public void checkDefaultsTest() { ConverterProperties properties = new ConverterProperties(); - Assert.assertTrue(properties.isImmediateFlush()); - Assert.assertFalse(properties.isCreateAcroForm()); - Assert.assertEquals(10, properties.getLimitOfLayouts()); + Assertions.assertTrue(properties.isImmediateFlush()); + Assertions.assertFalse(properties.isCreateAcroForm()); + Assertions.assertEquals(10, properties.getLimitOfLayouts()); properties.setImmediateFlush(false); properties.setCreateAcroForm(true); properties.setLimitOfLayouts(20); ConverterProperties propertiesCopied = new ConverterProperties(properties); - Assert.assertFalse(propertiesCopied.isImmediateFlush()); - Assert.assertTrue(propertiesCopied.isCreateAcroForm()); - Assert.assertEquals(20, propertiesCopied.getLimitOfLayouts()); + Assertions.assertFalse(propertiesCopied.isImmediateFlush()); + Assertions.assertTrue(propertiesCopied.isCreateAcroForm()); + Assertions.assertEquals(20, propertiesCopied.getLimitOfLayouts()); } private static class TestMetaInfo implements IMetaInfo { diff --git a/src/test/java/com/itextpdf/html2pdf/ExtendedFontPropertiesTest.java b/src/test/java/com/itextpdf/html2pdf/ExtendedFontPropertiesTest.java index 65cab2f5e..26b2f603a 100644 --- a/src/test/java/com/itextpdf/html2pdf/ExtendedFontPropertiesTest.java +++ b/src/test/java/com/itextpdf/html2pdf/ExtendedFontPropertiesTest.java @@ -36,7 +36,7 @@ This file is part of the iText (R) project. import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.util.List; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; public class ExtendedFontPropertiesTest extends ExtendedITextTest { @@ -74,7 +74,7 @@ public void runTest(String htmlString, String sourceFolder, String destinationFo // Convert to elements writeToDocument(doc, bytes); - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, "diff_" + testName + "_")); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, "diff_" + testName + "_")); } private void writeToDocument(Document doc, byte[] bytes) throws IOException { diff --git a/src/test/java/com/itextpdf/html2pdf/ExtendedHtmlConversionITextTest.java b/src/test/java/com/itextpdf/html2pdf/ExtendedHtmlConversionITextTest.java index 3131c85d7..45bf01733 100644 --- a/src/test/java/com/itextpdf/html2pdf/ExtendedHtmlConversionITextTest.java +++ b/src/test/java/com/itextpdf/html2pdf/ExtendedHtmlConversionITextTest.java @@ -33,14 +33,14 @@ This file is part of the iText (R) project. import com.itextpdf.layout.element.IBlockElement; import com.itextpdf.layout.element.IElement; import com.itextpdf.test.ExtendedITextTest; -import org.junit.Assert; +import org.junit.jupiter.api.Assertions; import org.xml.sax.SAXException; import javax.xml.parsers.ParserConfigurationException; import java.io.FileInputStream; import java.io.IOException; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * This class is used for testing of pdfHTML conversion cases @@ -79,7 +79,7 @@ public void convertToPdfAndCompare(String name, String sourceFolder, String dest null == converterProperties ? new ConverterProperties() : converterProperties); } System.out.println("html: " + UrlUtil.getNormalizedFileUriString(sourceHtml) + "\n"); - Assert.assertNull(new CompareTool().compareByContent(destinationPdf, cmpPdf, destinationFolder, + Assertions.assertNull(new CompareTool().compareByContent(destinationPdf, cmpPdf, destinationFolder, "diff_" + name + "_")); } @@ -111,7 +111,7 @@ public void convertToElementsAndCompare(String name, String sourceFolder, String } } System.out.println("html: " + UrlUtil.getNormalizedFileUriString(sourceHtml) + "\n"); - Assert.assertNull(new CompareTool().compareByContent(destinationPdf, cmpPdf, destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationPdf, cmpPdf, destinationFolder, "diff_" + name + "_")); } public void convertToPdfAcroformFlattenAndCompare(String name, String sourceFolder, String destinationFolder, @@ -155,9 +155,9 @@ public void convertToPdfAcroformFlattenAndCompare(String name, String sourceFold document.close(); //compare with cmp - Assert.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder)); - Assert.assertNull(new CompareTool().compareByContent(outPdfPathAcro, cmpPdfPathAcro, destinationFolder)); - Assert.assertNull(new CompareTool().compareByContent(outPdfPathFlatted, cmpPdfPathAcroFlatten, + Assertions.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(outPdfPathAcro, cmpPdfPathAcro, destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(outPdfPathFlatted, cmpPdfPathAcroFlatten, destinationFolder)); //compare tags structure if tagged @@ -176,7 +176,7 @@ private void compareTagStructure(String outPath, String cmpPath) throws IOExcept if (tagStructureErrors != null) { resultMessage += tagStructureErrors + "\n"; } - assertTrue(resultMessage, tagStructureErrors == null); + assertTrue(tagStructureErrors == null, resultMessage); } private ConverterProperties getConverterProperties(String fontsFolder) { diff --git a/src/test/java/com/itextpdf/html2pdf/FontProviderTest.java b/src/test/java/com/itextpdf/html2pdf/FontProviderTest.java index e1e2992aa..1b363efbd 100644 --- a/src/test/java/com/itextpdf/html2pdf/FontProviderTest.java +++ b/src/test/java/com/itextpdf/html2pdf/FontProviderTest.java @@ -30,28 +30,22 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.IOException; -import org.junit.rules.ExpectedException; // Actually the results are invalid because there is no pdfCalligraph. -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FontProviderTest extends ExtendedITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/FontProviderTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/FontProviderTest/"; - @Rule - public ExpectedException expectedException = ExpectedException.none(); - - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -62,14 +56,14 @@ public static void beforeClass() { }) public void hebrewTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "hebrew.html"), new File(DESTINATION_FOLDER + "hebrew.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "hebrew.pdf", SOURCE_FOLDER + "cmp_hebrew.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "hebrew.pdf", SOURCE_FOLDER + "cmp_hebrew.pdf", DESTINATION_FOLDER, "diffHebrew_")); } @Test public void devanagariTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "devanagari.html"), new File(DESTINATION_FOLDER + "devanagari.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "devanagari.pdf", SOURCE_FOLDER + "cmp_devanagari.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "devanagari.pdf", SOURCE_FOLDER + "cmp_devanagari.pdf", DESTINATION_FOLDER, "diffDevanagari_")); } @@ -77,14 +71,14 @@ public void devanagariTest() throws IOException, InterruptedException { //For more specific tests see FontSelectorTimesFontTest in html2pdf and FontSelectorHelveticaFontTest in html2pdf-private public void convertStandardFonts() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "convertStandardFonts.html"), new File(DESTINATION_FOLDER + "convertStandardFonts.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "convertStandardFonts.pdf", SOURCE_FOLDER + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "convertStandardFonts.pdf", SOURCE_FOLDER + "cmp_convertStandardFonts.pdf", DESTINATION_FOLDER, "difffontstand_")); } @Test public void notoSansMonoItalicTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "notoSansMonoItalic.html"), new File(DESTINATION_FOLDER + "notoSansMonoItalic.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "notoSansMonoItalic.pdf", SOURCE_FOLDER + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "notoSansMonoItalic.pdf", SOURCE_FOLDER + "cmp_notoSansMonoItalic.pdf", DESTINATION_FOLDER, "diffnotoSansMonoItalic_")); } @@ -93,7 +87,7 @@ public void notoSansMonoItalicTest() throws IOException, InterruptedException { public void notoSansMonoBoldItalicTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "notoSansMonoBoldItalic.html"), new File( DESTINATION_FOLDER + "notoSansMonoBoldItalic.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "notoSansMonoBoldItalic.pdf", SOURCE_FOLDER + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "notoSansMonoBoldItalic.pdf", SOURCE_FOLDER + "cmp_notoSansMonoBoldItalic.pdf", DESTINATION_FOLDER, "diffnotoSansMonoBoldItalic_")); } @@ -143,12 +137,12 @@ public void comparatorErrorTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "comparatorError.html"), new File(DESTINATION_FOLDER + "comparatorError.pdf"), properties); } catch (IllegalArgumentException e) { - Assert.assertEquals("Comparison method violates its general contract!", e.getMessage()); + Assertions.assertEquals("Comparison method violates its general contract!", e.getMessage()); isExceptionThrown = true; } if (!isExceptionThrown) { - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "comparatorError.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "comparatorError.pdf", SOURCE_FOLDER + "cmp_comparatorError.pdf", DESTINATION_FOLDER)); } } @@ -162,7 +156,7 @@ public void differentFontFamiliesTest() throws IOException, InterruptedException HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "differentFontFamilies.html"), new File( DESTINATION_FOLDER + "differentFontFamilies.pdf"), properties); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "differentFontFamilies.pdf", SOURCE_FOLDER + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "differentFontFamilies.pdf", SOURCE_FOLDER + "cmp_differentFontFamilies.pdf", DESTINATION_FOLDER, "diff_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/Html2ElementsTest.java b/src/test/java/com/itextpdf/html2pdf/Html2ElementsTest.java index 7670438ce..0abd30043 100644 --- a/src/test/java/com/itextpdf/html2pdf/Html2ElementsTest.java +++ b/src/test/java/com/itextpdf/html2pdf/Html2ElementsTest.java @@ -59,7 +59,6 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import com.itextpdf.test.pdfa.VeraPdfValidator; import java.io.File; @@ -67,18 +66,18 @@ This file is part of the iText (R) project. import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class Html2ElementsTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/Html2ElementsTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/Html2ElementsTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -87,35 +86,35 @@ public static void beforeClass() { public void htmlToElementsTest01() { String html = "

Hello world!

"; List lst = HtmlConverter.convertToElements(html); - Assert.assertTrue(lst.size() == 1); - Assert.assertTrue(lst.get(0) instanceof Paragraph); + Assertions.assertTrue(lst.size() == 1); + Assertions.assertTrue(lst.get(0) instanceof Paragraph); Paragraph p = (Paragraph) lst.get(0); - Assert.assertEquals("Hello world!", ((Text) p.getChildren().get(0)).getText()); - Assert.assertEquals(12f, p.getProperty(Property.FONT_SIZE).getValue(), 1e-10); + Assertions.assertEquals("Hello world!", ((Text) p.getChildren().get(0)).getText()); + Assertions.assertEquals(12f, p.getProperty(Property.FONT_SIZE).getValue(), 1e-10); } @Test public void htmlToElementsTest02() { String html = "
123<456>
Long cell
"; List lst = HtmlConverter.convertToElements(html); - Assert.assertTrue(lst.size() == 1); - Assert.assertTrue(lst.get(0) instanceof Table); + Assertions.assertTrue(lst.size() == 1); + Assertions.assertTrue(lst.get(0) instanceof Table); Table t = (Table) lst.get(0); - Assert.assertEquals(2, t.getNumberOfRows()); - Assert.assertEquals("123", ((Text) (((Paragraph) t.getCell(0, 0).getChildren().get(0)).getChildren().get(0))).getText()); - Assert.assertEquals(24f, t.getProperty(Property.FONT_SIZE).getValue(), 1e-10); + Assertions.assertEquals(2, t.getNumberOfRows()); + Assertions.assertEquals("123", ((Text) (((Paragraph) t.getCell(0, 0).getChildren().get(0)).getChildren().get(0))).getText()); + Assertions.assertEquals(24f, t.getProperty(Property.FONT_SIZE).getValue(), 1e-10); } @Test public void htmlToElementsTest03() { String html = "

Hello world!

123<456>
Long cell

Hello world!

"; List lst = HtmlConverter.convertToElements(html); - Assert.assertTrue(lst.size() == 3); - Assert.assertTrue(lst.get(0) instanceof Paragraph); - Assert.assertTrue(lst.get(1) instanceof Table); - Assert.assertTrue(lst.get(2) instanceof Paragraph); - Assert.assertEquals("Hello world!", ((Text) ((Paragraph) lst.get(0)).getChildren().get(0)).getText()); - Assert.assertEquals("123", ((Text) (((Paragraph) ((Table) lst.get(1)).getCell(0, 0).getChildren().get(0)).getChildren().get(0))).getText()); + Assertions.assertTrue(lst.size() == 3); + Assertions.assertTrue(lst.get(0) instanceof Paragraph); + Assertions.assertTrue(lst.get(1) instanceof Table); + Assertions.assertTrue(lst.get(2) instanceof Paragraph); + Assertions.assertEquals("Hello world!", ((Text) ((Paragraph) lst.get(0)).getChildren().get(0)).getText()); + Assertions.assertEquals("123", ((Text) (((Paragraph) ((Table) lst.get(1)).getCell(0, 0).getChildren().get(0)).getChildren().get(0))).getText()); } @Test @@ -123,11 +122,11 @@ public void htmlToElementsTest03() { public void htmlToElementsTest04() { String html = "

Hello world!
123"; List lst = HtmlConverter.convertToElements(html); - Assert.assertTrue(lst.size() == 2); - Assert.assertTrue(lst.get(0) instanceof Paragraph); - Assert.assertTrue(lst.get(1) instanceof Table); - Assert.assertEquals("Hello world!", ((Text) ((Paragraph) lst.get(0)).getChildren().get(0)).getText()); - Assert.assertEquals("123", ((Text) (((Paragraph) ((Table) lst.get(1)).getCell(0, 0).getChildren().get(0)).getChildren().get(0))).getText()); + Assertions.assertTrue(lst.size() == 2); + Assertions.assertTrue(lst.get(0) instanceof Paragraph); + Assertions.assertTrue(lst.get(1) instanceof Table); + Assertions.assertEquals("Hello world!", ((Text) ((Paragraph) lst.get(0)).getChildren().get(0)).getText()); + Assertions.assertEquals("123", ((Text) (((Paragraph) ((Table) lst.get(1)).getCell(0, 0).getChildren().get(0)).getChildren().get(0))).getText()); } @Test @@ -135,7 +134,7 @@ public void htmlToElementsTest04() { public void htmlToElementsTest05() { String html = "123"; List lst = HtmlConverter.convertToElements(html); - Assert.assertTrue(lst.size() == 1); + Assertions.assertTrue(lst.size() == 1); } @Test @@ -143,9 +142,9 @@ public void htmlToElementsTest05() { public void htmlElementsTest06() { String html = "Lorem

Ipsum

Dolor

Sit

"; List lst = HtmlConverter.convertToElements(html); - Assert.assertTrue(lst.size() == 4); + Assertions.assertTrue(lst.size() == 4); for (int i = 0; i < lst.size(); i++) - Assert.assertTrue(lst.get(i) instanceof Paragraph); + Assertions.assertTrue(lst.get(i) instanceof Paragraph); } @Test @@ -153,9 +152,9 @@ public void htmlElementsTest06() { public void htmlElementsTest07() { String html = "LoremDolor

Ipsum

Sit

"; List lst = HtmlConverter.convertToElements(html); - Assert.assertTrue(lst.size() == 3); + Assertions.assertTrue(lst.size() == 3); for (int i = 0; i < lst.size(); i++) - Assert.assertTrue(lst.get(i) instanceof Paragraph); + Assertions.assertTrue(lst.get(i) instanceof Paragraph); } @Test @@ -192,7 +191,7 @@ public void htmlToElementsTest09() { public void htmlObjectMalformedUrlTest() { String html = ""; List lst = HtmlConverter.convertToElements(html); - Assert.assertTrue(lst.size() == 0); + Assertions.assertTrue(lst.size() == 0); } @Test @@ -219,14 +218,14 @@ public void htmlToElementsVsHtmlToPdfTest() throws IOException, InterruptedExcep } else if (elem instanceof AreaBreak) { document.add((AreaBreak) elem); } else { - Assert.fail("The #convertToElements method gave element which is unsupported as root element, it's unexpected."); + Assertions.fail("The #convertToElements method gave element which is unsupported as root element, it's unexpected."); } } document.close(); System.out.println("html: " + UrlUtil.getNormalizedFileUriString(src) + "\n"); - Assert.assertNull(new CompareTool().compareByContent(outConvertToElements, outConvertToPdf, destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(outConvertToElements, outConvertToPdf, destinationFolder)); } @Test @@ -240,13 +239,13 @@ public void bodyFontFamilyTest() { + ""; List elements = HtmlConverter.convertToElements(html); - Assert.assertEquals(2, elements.size()); + Assertions.assertEquals(2, elements.size()); IElement anonymousParagraph = elements.get(0); - Assert.assertArrayEquals(new String[]{"monospace"}, anonymousParagraph.getProperty(Property.FONT)); + Assertions.assertArrayEquals(new String[]{"monospace"}, anonymousParagraph.getProperty(Property.FONT)); IElement normalParagraph = elements.get(1); - Assert.assertArrayEquals(new String[]{"monospace"}, normalParagraph.getProperty(Property.FONT)); + Assertions.assertArrayEquals(new String[]{"monospace"}, normalParagraph.getProperty(Property.FONT)); } @Test @@ -255,14 +254,14 @@ public void leadingInDefaultRenderingModeTest() { + "

This text is in paragraph.

"; List elements = HtmlConverter.convertToElements(html); - Assert.assertEquals(2, elements.size()); + Assertions.assertEquals(2, elements.size()); IElement anonymousParagraph = elements.get(0); // TODO DEVSIX-3873 anonymous paragraph inherited styles should be applied in general way - Assert.assertNull(anonymousParagraph.getProperty(Property.LEADING)); + Assertions.assertNull(anonymousParagraph.getProperty(Property.LEADING)); IElement normalParagraph = elements.get(1); - Assert.assertEquals(new Leading(Leading.MULTIPLIED, 1.2f), normalParagraph.getProperty(Property.LEADING)); + Assertions.assertEquals(new Leading(Leading.MULTIPLIED, 1.2f), normalParagraph.getProperty(Property.LEADING)); } @Test @@ -273,8 +272,8 @@ public void eventGenerationTest() { String html = "
123<456>
789

Hello world!

"; List elements = HtmlConverter.convertToElements(html); - Assert.assertEquals(1, handler.getEvents().size()); - Assert.assertTrue(handler.getEvents().get(0) instanceof PdfHtmlProductEvent); + Assertions.assertEquals(1, handler.getEvents().size()); + Assertions.assertTrue(handler.getEvents().get(0) instanceof PdfHtmlProductEvent); SequenceId expectedSequenceId = ((PdfHtmlProductEvent) handler.getEvents().get(0)).getSequenceId(); int validationsCount = validateSequenceIds(expectedSequenceId, elements); @@ -285,7 +284,7 @@ public void eventGenerationTest() { // Paragraph -> Text [Hello world!] 2 //-------------------------------------------- // 12 - Assert.assertEquals(12, validationsCount); + Assertions.assertEquals(12, validationsCount); } finally { EventManager.getInstance().unregister(handler); } @@ -307,8 +306,8 @@ public void convertToElementsAndCreateTwoDocumentsTest() { addElementsToDocument(document, iElementList); // TODO DEVSIX-5753 error should not be thrown here - Exception e = Assert.assertThrows(PdfException.class, () -> document.close()); - Assert.assertEquals(KernelExceptionMessageConstant.PDF_INDIRECT_OBJECT_BELONGS_TO_OTHER_PDF_DOCUMENT, e.getMessage()); + Exception e = Assertions.assertThrows(PdfException.class, () -> document.close()); + Assertions.assertEquals(KernelExceptionMessageConstant.PDF_INDIRECT_OBJECT_BELONGS_TO_OTHER_PDF_DOCUMENT, e.getMessage()); } @Test @@ -319,13 +318,13 @@ public void htmlToElementsSvgTest() throws IOException, InterruptedException { String cmpPdf = sourceFolder + "cmp_htmlToElementsSvg.pdf"; String outPdf = destinationFolder + "htmlToElementsSvg.pdf"; List lst = HtmlConverter.convertToElements(html); - Assert.assertEquals(1, lst.size()); + Assertions.assertEquals(1, lst.size()); try (Document document = new Document(new PdfDocument(new PdfWriter(outPdf)))) { for (IElement element : lst) { document.add((Image) element); } } - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder)); } @Test @@ -352,7 +351,7 @@ public void htmlToElementsSvgInTheTableTest() throws IOException, InterruptedExc document.add((IBlockElement) element); } } - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder)); } @Test @@ -368,7 +367,7 @@ public void htmlToElementsSvgImgTest() throws IOException, InterruptedException document.add((IBlockElement) element); } } - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder)); } @Test @@ -384,7 +383,7 @@ public void htmlToElementsSvgObjectTest() throws IOException, InterruptedExcepti document.add((Image) element); } } - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder)); } @Test @@ -400,7 +399,7 @@ public void htmlToElementsFormTest() throws IOException, InterruptedException { document.add((IBlockElement) element); } } - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder)); } @@ -424,8 +423,8 @@ public void htmlToElementsToPDFATest() throws IOException, InterruptedException document.add((IBlockElement) element); } } - Assert.assertNull(new VeraPdfValidator().validate(outPdf)); - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder)); + Assertions.assertNull(new VeraPdfValidator().validate(outPdf)); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder)); } @@ -438,7 +437,7 @@ private static void addElementsToDocument(Document document, List elem } else if (elem instanceof AreaBreak) { document.add((AreaBreak) elem); } else { - Assert.fail( + Assertions.fail( "The #convertToElements method gave element which is unsupported as root element, it's unexpected."); } } @@ -447,9 +446,9 @@ private static void addElementsToDocument(Document document, List elem private static int validateSequenceIds(SequenceId expectedSequenceId, List elements) { int validationCount = 0; for (IElement element : elements) { - Assert.assertTrue(element instanceof AbstractIdentifiableElement); - Assert.assertTrue(element instanceof IAbstractElement); - Assert.assertEquals(expectedSequenceId, SequenceIdManager.getSequenceId((AbstractIdentifiableElement) element)); + Assertions.assertTrue(element instanceof AbstractIdentifiableElement); + Assertions.assertTrue(element instanceof IAbstractElement); + Assertions.assertEquals(expectedSequenceId, SequenceIdManager.getSequenceId((AbstractIdentifiableElement) element)); validationCount += 1; validationCount += validateSequenceIds(expectedSequenceId, ((IAbstractElement) element).getChildren()); } diff --git a/src/test/java/com/itextpdf/html2pdf/HtmlConverterMetaInfoTest.java b/src/test/java/com/itextpdf/html2pdf/HtmlConverterMetaInfoTest.java index 71a8e6a69..b01dc77ee 100644 --- a/src/test/java/com/itextpdf/html2pdf/HtmlConverterMetaInfoTest.java +++ b/src/test/java/com/itextpdf/html2pdf/HtmlConverterMetaInfoTest.java @@ -41,14 +41,13 @@ This file is part of the iText (R) project. import com.itextpdf.layout.renderer.MetaInfoContainer; import com.itextpdf.styledxmlparser.node.IElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.io.ByteArrayOutputStream; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class HtmlConverterMetaInfoTest extends ExtendedITextTest { @Test @@ -74,7 +73,7 @@ public void metaInfoShouldBePresentTest() { ); document.close(); - Assert.assertTrue(invocationAssert.isInvoked()); + Assertions.assertTrue(invocationAssert.isInvoked()); } private static class AssertMetaInfoTagWorkerFactory extends DefaultTagWorkerFactory { @@ -119,7 +118,7 @@ public AssertMetaInfoDivTagRenderer(Div modelElement, InvocationAssert invocatio @Override public LayoutResult layout(LayoutContext layoutContext) { - Assert.assertNotNull(this.getProperty(Property.META_INFO)); + Assertions.assertNotNull(this.getProperty(Property.META_INFO)); invocationAssert.setInvoked(true); return super.layout(layoutContext); } diff --git a/src/test/java/com/itextpdf/html2pdf/HtmlConverterMultiThreadedTest.java b/src/test/java/com/itextpdf/html2pdf/HtmlConverterMultiThreadedTest.java index d7d4dc765..7a97ee576 100644 --- a/src/test/java/com/itextpdf/html2pdf/HtmlConverterMultiThreadedTest.java +++ b/src/test/java/com/itextpdf/html2pdf/HtmlConverterMultiThreadedTest.java @@ -23,7 +23,6 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.ByteArrayOutputStream; import java.util.ArrayList; @@ -32,11 +31,11 @@ This file is part of the iText (R) project. import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HtmlConverterMultiThreadedTest extends ExtendedITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/HtmlConverterMultiThreadedTest/"; @@ -56,7 +55,7 @@ public void multiThreadedHtmlToPdfConversionTest() throws InterruptedException { } executorService.shutdown(); - Assert.assertTrue(executorService.awaitTermination(2, TimeUnit.MINUTES)); + Assertions.assertTrue(executorService.awaitTermination(2, TimeUnit.MINUTES)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfA3Test.java b/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfA3Test.java index 801d0052c..84983cae3 100644 --- a/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfA3Test.java +++ b/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfA3Test.java @@ -34,25 +34,24 @@ This file is part of the iText (R) project. import com.itextpdf.test.LogLevelConstants; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import static com.itextpdf.html2pdf.HtmlConverterTest.compareAndCheckCompliance; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HtmlConverterPdfA3Test extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/HtmlConverterPdfA3Test/"; public static final String RESOURCES_SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/fonts/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/HtmlConverterPdfA3Test/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -191,11 +190,11 @@ public void convertToPdfA3UnreferencedGlyphsTest() throws IOException { converterProperties.setFontProvider(fontProvider); try (FileOutputStream fOutput = new FileOutputStream(destinationPdf)) { - Exception e = Assert.assertThrows(PdfAConformanceException.class, () -> { + Exception e = Assertions.assertThrows(PdfAConformanceException.class, () -> { HtmlConverter.convertToPdf(html, fOutput, converterProperties); }); - Assert.assertEquals(MessageFormatUtil.format( + Assertions.assertEquals(MessageFormatUtil.format( PdfaExceptionMessageConstant.EMBEDDED_FONTS_SHALL_DEFINE_ALL_REFERENCED_GLYPHS), e.getMessage()); } @@ -247,10 +246,10 @@ public void convertToPdfA3UnreferencedEmojiTest() throws IOException { converterProperties.setFontProvider(fontProvider); try (FileOutputStream fOutput = new FileOutputStream(destinationPdf)) { - Exception e = Assert.assertThrows(PdfAConformanceException.class, () -> { + Exception e = Assertions.assertThrows(PdfAConformanceException.class, () -> { HtmlConverter.convertToPdf(html, fOutput, converterProperties); }); - Assert.assertEquals(MessageFormatUtil.format( + Assertions.assertEquals(MessageFormatUtil.format( PdfaExceptionMessageConstant.EMBEDDED_FONTS_SHALL_DEFINE_ALL_REFERENCED_GLYPHS), e.getMessage()); } diff --git a/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfA4Test.java b/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfA4Test.java index 259ad112b..67790f2be 100644 --- a/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfA4Test.java +++ b/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfA4Test.java @@ -39,26 +39,25 @@ This file is part of the iText (R) project. import com.itextpdf.test.LogLevelConstants; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import static com.itextpdf.html2pdf.HtmlConverterTest.compareAndCheckCompliance; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HtmlConverterPdfA4Test extends ExtendedITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/HtmlConverterPdfA4Test/"; public static final String RESOURCES_SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/fonts/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/HtmlConverterPdfA4Test/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -119,11 +118,11 @@ public void convertToPdfA4MetaDataInvalidTest() throws IOException { try (FileInputStream fOutput = new FileInputStream(sourceHtml); PdfWriter pdfWriter = new PdfWriter(destinationPdf); ) { - Exception e = Assert.assertThrows(PdfAConformanceException.class, () -> { + Exception e = Assertions.assertThrows(PdfAConformanceException.class, () -> { HtmlConverter.convertToPdf(fOutput, pdfWriter, converterProperties); }); - Assert.assertEquals(MessageFormatUtil.format( + Assertions.assertEquals(MessageFormatUtil.format( PdfaExceptionMessageConstant.THE_FILE_HEADER_SHALL_CONTAIN_RIGHT_PDF_VERSION, "2"), e.getMessage()); } @@ -175,11 +174,11 @@ public void convertToPdfA4UnreferencedGlyphsTest() throws IOException { converterProperties.setFontProvider(fontProvider); try (FileOutputStream fOutput = new FileOutputStream(destinationPdf)) { - Exception e = Assert.assertThrows(PdfAConformanceException.class, () -> { + Exception e = Assertions.assertThrows(PdfAConformanceException.class, () -> { HtmlConverter.convertToPdf(html, fOutput, converterProperties); }); - Assert.assertEquals(MessageFormatUtil.format( + Assertions.assertEquals(MessageFormatUtil.format( PdfaExceptionMessageConstant.EMBEDDED_FONTS_SHALL_DEFINE_ALL_REFERENCED_GLYPHS), e.getMessage()); } @@ -205,10 +204,10 @@ public void convertToPdfA4UnreferencedEmojiTest() throws IOException { converterProperties.setFontProvider(fontProvider); try (FileOutputStream fOutput = new FileOutputStream(destinationPdf)) { - Exception e = Assert.assertThrows(PdfAConformanceException.class, () -> { + Exception e = Assertions.assertThrows(PdfAConformanceException.class, () -> { HtmlConverter.convertToPdf(html, fOutput, converterProperties); }); - Assert.assertEquals(MessageFormatUtil.format( + Assertions.assertEquals(MessageFormatUtil.format( PdfaExceptionMessageConstant.EMBEDDED_FONTS_SHALL_DEFINE_ALL_REFERENCED_GLYPHS), e.getMessage()); } @@ -273,10 +272,10 @@ public void convertToPdfAWithoutIcmProfileTest() throws IOException { try (FileInputStream fOutputHtml = new FileInputStream(sourceHtml); FileOutputStream fOutputDest = new FileOutputStream(destinationPdf); ) { - Exception e = Assert.assertThrows(PdfAConformanceException.class, () -> + Exception e = Assertions.assertThrows(PdfAConformanceException.class, () -> HtmlConverter.convertToPdf(fOutputHtml, fOutputDest, converterProperties)); - Assert.assertEquals(MessageFormatUtil.format( + Assertions.assertEquals(MessageFormatUtil.format( PdfaExceptionMessageConstant.DEVICEGRAY_SHALL_ONLY_BE_USED_IF_CURRENT_PDFA_OUTPUT_INTENT_OR_DEFAULTGRAY_IN_USAGE_CONTEXT), e.getMessage()); } diff --git a/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfAParameterizedTest.java b/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfAParameterizedTest.java index dd31f6d84..f0245d441 100644 --- a/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfAParameterizedTest.java +++ b/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfAParameterizedTest.java @@ -24,44 +24,31 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.pdf.PdfAConformanceLevel; import com.itextpdf.kernel.pdf.PdfOutputIntent; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.Arrays; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import static com.itextpdf.html2pdf.HtmlConverterTest.compareAndCheckCompliance; -@RunWith(Parameterized.class) -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HtmlConverterPdfAParameterizedTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/HtmlConverterPdfAParameterizedTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/HtmlConverterPdfAParameterizedTest/"; - private final String htmlName; - private final String testName; - - private final PdfAConformanceLevel conformanceLevel; - - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } - public HtmlConverterPdfAParameterizedTest(Object htmlName, Object testName, Object conformance) { - this.conformanceLevel = (PdfAConformanceLevel) conformance; - this.htmlName = (String) htmlName; - this.testName = (String) testName; - } // TODO DEVSIX-2449 z-index is not supported (zindex.html) - @Parameterized.Parameters(name = "{1}") - public static Iterable rotationRelatedProperties() { + public static Iterable RotationRelatedProperties() { return Arrays.asList(new Object[][]{ {"images.html", "pdfA4BasicImageTest", PdfAConformanceLevel.PDF_A_4}, {"imageJpeg2000.html", "pdfA4Jpeg2000Test", PdfAConformanceLevel.PDF_A_4}, @@ -121,8 +108,9 @@ public static Iterable rotationRelatedProperties() { }); } - @Test - public void convertToPdfA4Test() throws IOException, InterruptedException { + @ParameterizedTest(name = "{1}") + @MethodSource("RotationRelatedProperties") + public void convertToPdfA4Test(Object htmlName, Object testName, PdfAConformanceLevel conformanceLevel) throws IOException, InterruptedException { String sourceHtml = SOURCE_FOLDER + htmlName; String destinationPdf = DESTINATION_FOLDER + testName + ".pdf"; String cmpPdf = SOURCE_FOLDER + "cmp_" + testName + ".pdf"; diff --git a/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfUA2Test.java b/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfUA2Test.java index cb18eb694..dde170436 100644 --- a/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfUA2Test.java +++ b/src/test/java/com/itextpdf/html2pdf/HtmlConverterPdfUA2Test.java @@ -37,7 +37,6 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.xmp.XMPMetaFactory; import com.itextpdf.layout.font.FontProvider; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import com.itextpdf.test.pdfa.VeraPdfValidator; import java.io.ByteArrayInputStream; @@ -45,18 +44,18 @@ This file is part of the iText (R) project. import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HtmlConverterPdfUA2Test extends ExtendedITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/HtmlConverterPdfUA2Test/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/HtmlConverterPdfUA2Test/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -156,11 +155,11 @@ private void createSimplePdfUA2Document(PdfDocument pdfDocument) throws IOExcept private static void compareAndCheckCompliance(String destinationPdf, String cmpPdf, boolean isExpectedOk) throws IOException, InterruptedException { if (isExpectedOk) { - Assert.assertNull(new VeraPdfValidator().validate(destinationPdf)); + Assertions.assertNull(new VeraPdfValidator().validate(destinationPdf)); } else { - Assert.assertNotNull(new VeraPdfValidator().validate(destinationPdf)); + Assertions.assertNotNull(new VeraPdfValidator().validate(destinationPdf)); } - Assert.assertNull(new CompareTool().compareByContent(destinationPdf, cmpPdf, DESTINATION_FOLDER, + Assertions.assertNull(new CompareTool().compareByContent(destinationPdf, cmpPdf, DESTINATION_FOLDER, "diff_simple_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/HtmlConverterTest.java b/src/test/java/com/itextpdf/html2pdf/HtmlConverterTest.java index dfeeb6403..5028fffd0 100644 --- a/src/test/java/com/itextpdf/html2pdf/HtmlConverterTest.java +++ b/src/test/java/com/itextpdf/html2pdf/HtmlConverterTest.java @@ -35,30 +35,24 @@ This file is part of the iText (R) project. import com.itextpdf.pdfa.exceptions.PdfAConformanceException; import com.itextpdf.pdfa.exceptions.PdfaExceptionMessageConstant; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import com.itextpdf.test.pdfa.VeraPdfValidator; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; - -@Category(IntegrationTest.class) +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; + +@Tag("IntegrationTest") public class HtmlConverterTest extends ExtendedITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/HtmlConverterTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/HtmlConverterTest/"; - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); - - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -97,12 +91,13 @@ public void convertToPdfASimpleTest() throws IOException, InterruptedException { @Test public void cannotConvertHtmlToDocumentInReadingModeTest() throws IOException { - junitExpectedException.expect(Html2PdfException.class); - junitExpectedException.expectMessage(Html2PdfException.PDF_DOCUMENT_SHOULD_BE_IN_WRITING_MODE); + Exception exception = Assertions.assertThrows(Html2PdfException.class, () -> { + PdfDocument pdfDocument = createTempDoc(); + ConverterProperties properties = new ConverterProperties(); + Document document = HtmlConverter.convertToDocument("", pdfDocument, properties); + }); + Assertions.assertEquals(Html2PdfException.PDF_DOCUMENT_SHOULD_BE_IN_WRITING_MODE, exception.getMessage()); - PdfDocument pdfDocument = createTempDoc(); - ConverterProperties properties = new ConverterProperties(); - Document document = HtmlConverter.convertToDocument("", pdfDocument, properties); } @Test @@ -119,11 +114,11 @@ public void convertHtmlToDocumentIncorrectConverterPropertiesTest() throws IOExc new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1", new FileInputStream(SOURCE_FOLDER + "sRGB Color Space Profile.icm"))); - Exception e = Assert.assertThrows(PdfAConformanceException.class, () -> { + Exception e = Assertions.assertThrows(PdfAConformanceException.class, () -> { HtmlConverter.convertToPdf(sourceHtml, pdfDocument, converterProperties); }); - Assert.assertEquals(MessageFormatUtil.format( + Assertions.assertEquals(MessageFormatUtil.format( PdfaExceptionMessageConstant.THE_FILE_HEADER_SHALL_CONTAIN_RIGHT_PDF_VERSION, "2"), e.getMessage()); } @@ -142,11 +137,11 @@ public void convertHtmlToDocumentWithDifferentColorProfileTest() throws IOExcept new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1", new FileInputStream(SOURCE_FOLDER + "USWebUncoated.icc"))); - Exception e = Assert.assertThrows(PdfAConformanceException.class, () -> { + Exception e = Assertions.assertThrows(PdfAConformanceException.class, () -> { HtmlConverter.convertToPdf(sourceHtml, pdfDocument, converterProperties); }); - Assert.assertEquals(MessageFormatUtil.format( + Assertions.assertEquals(MessageFormatUtil.format( PdfaExceptionMessageConstant.THE_FILE_HEADER_SHALL_CONTAIN_RIGHT_PDF_VERSION, "2"), e.getMessage()); } @@ -161,10 +156,10 @@ private static PdfDocument createTempDoc() throws IOException { } protected static void compareAndCheckCompliance(String destinationPdf, String cmpPdf) throws IOException, InterruptedException { - Assert.assertNull(new CompareTool().compareByContent(destinationPdf, cmpPdf, DESTINATION_FOLDER, + Assertions.assertNull(new CompareTool().compareByContent(destinationPdf, cmpPdf, DESTINATION_FOLDER, "diff_simple_")); VeraPdfValidator veraPdfValidator = new VeraPdfValidator(); - Assert.assertNull(veraPdfValidator.validate(destinationPdf)); + Assertions.assertNull(veraPdfValidator.validate(destinationPdf)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/HtmlResourceResolverUnitTest.java b/src/test/java/com/itextpdf/html2pdf/HtmlResourceResolverUnitTest.java index 33150154b..63b315195 100644 --- a/src/test/java/com/itextpdf/html2pdf/HtmlResourceResolverUnitTest.java +++ b/src/test/java/com/itextpdf/html2pdf/HtmlResourceResolverUnitTest.java @@ -29,13 +29,12 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class HtmlResourceResolverUnitTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/ResourceResolverTest/"; @@ -49,14 +48,14 @@ public class HtmlResourceResolverUnitTest extends ExtendedITextTest { public void retrieveImageNullTest() { HtmlResourceResolver resourceResolver = createResolver(); PdfXObject image = resourceResolver.retrieveImage(null); - Assert.assertNull(image); + Assertions.assertNull(image); } @Test public void retrieveImageBase64Test() { HtmlResourceResolver resourceResolver = createResolver(); PdfXObject image = resourceResolver.retrieveImage(bLogo); - Assert.assertNotNull(image); + Assertions.assertNotNull(image); } @Test @@ -64,7 +63,7 @@ public void retrieveImageBase64Test() { public void retrieveImageIncorrectBase64Test() { HtmlResourceResolver resourceResolver = createResolver(); PdfXObject image = resourceResolver.retrieveImage(bLogoCorruptedData); - Assert.assertNull(image); + Assertions.assertNull(image); } private HtmlResourceResolver createResolver() { diff --git a/src/test/java/com/itextpdf/html2pdf/ProcessorContextTest.java b/src/test/java/com/itextpdf/html2pdf/ProcessorContextTest.java index 309813029..a9192c5b2 100644 --- a/src/test/java/com/itextpdf/html2pdf/ProcessorContextTest.java +++ b/src/test/java/com/itextpdf/html2pdf/ProcessorContextTest.java @@ -33,54 +33,51 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.node.IDocumentNode; import com.itextpdf.styledxmlparser.node.impl.jsoup.JsoupHtmlParser; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ProcessorContextTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/ProcessorContextTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/ProcessorContextTest/"; - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @Test public void doNotResetFontProviderTest() throws IOException { - junitExpectedException.expect(PdfException.class); - FileInputStream fileInputStream = new FileInputStream(sourceFolder + "justHelloWorld.html"); + Assertions.assertThrows(PdfException.class, () -> { + FileInputStream fileInputStream = new FileInputStream(sourceFolder + "justHelloWorld.html"); - IXmlParser parser = new JsoupHtmlParser(); + IXmlParser parser = new JsoupHtmlParser(); - IDocumentNode documentNode = parser.parse(fileInputStream, null); + IDocumentNode documentNode = parser.parse(fileInputStream, null); - ConverterProperties converterProperties = new ConverterProperties(); - converterProperties.setFontProvider(new DefaultFontProvider(false, true, false) { - @Override - public void reset() { - // Do nothing here. That should result in an exception. - } - }); + ConverterProperties converterProperties = new ConverterProperties(); + converterProperties.setFontProvider(new DefaultFontProvider(false, true, false) { + @Override + public void reset() { + // Do nothing here. That should result in an exception. + } + }); + + IHtmlProcessor processor = new DefaultHtmlProcessor(converterProperties); + Document doc1 = processor.processDocument(documentNode, new PdfDocument(new PdfWriter(new ByteArrayOutputStream()))); + doc1.close(); + Document doc2 = processor.processDocument(documentNode, new PdfDocument(new PdfWriter(new ByteArrayOutputStream()))); + doc2.close(); - IHtmlProcessor processor = new DefaultHtmlProcessor(converterProperties); - Document doc1 = processor.processDocument(documentNode, new PdfDocument(new PdfWriter(new ByteArrayOutputStream()))); - doc1.close(); - Document doc2 = processor.processDocument(documentNode, new PdfDocument(new PdfWriter(new ByteArrayOutputStream()))); - doc2.close(); + Assertions.assertTrue(false, "The test should have failed before that assert, since it's strictly forbidden not to reset the FontProvider instance after each html to pdf conversion."); + }); - Assert.assertTrue("The test should have failed before that assert, since it's strictly forbidden not to reset the FontProvider instance after each html to pdf conversion.", false); } } diff --git a/src/test/java/com/itextpdf/html2pdf/SurrogatePairsTest.java b/src/test/java/com/itextpdf/html2pdf/SurrogatePairsTest.java index 8a61462ff..85f16ee32 100644 --- a/src/test/java/com/itextpdf/html2pdf/SurrogatePairsTest.java +++ b/src/test/java/com/itextpdf/html2pdf/SurrogatePairsTest.java @@ -27,21 +27,20 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class SurrogatePairsTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/SurrogatePairsTests/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/SurrogatePairsTests/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @@ -52,7 +51,7 @@ public static void beforeClass() { public void surrogatePairFrom2Chars() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "surrogatePairFrom2Chars.html"), new File(destinationFolder + "surrogatePairFrom2Chars.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "surrogatePairFrom2Chars.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "surrogatePairFrom2Chars.pdf", sourceFolder + "cmp_surrogatePairFrom2Chars.pdf", destinationFolder)); } @@ -62,7 +61,7 @@ public void surrogatePairFrom2Chars() throws IOException, InterruptedException { public void surrogatePair2Pairs() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "surrogatePair2Pairs.html"), new File(destinationFolder + "surrogatePair2Pairs.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "surrogatePair2Pairs.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "surrogatePair2Pairs.pdf", sourceFolder + "cmp_surrogatePair2Pairs.pdf", destinationFolder)); } @@ -72,7 +71,7 @@ public void surrogatePair2Pairs() throws IOException, InterruptedException { public void surrogatePairFullCharacter() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "surrogatePairFullCharacter.html"), new File(destinationFolder + "surrogatePairFullCharacter.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "surrogatePairFullCharacter.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "surrogatePairFullCharacter.pdf", sourceFolder + "cmp_surrogatePairFullCharacter.pdf", destinationFolder)); } @@ -84,7 +83,7 @@ public void surrogatePairFullCharacter() throws IOException, InterruptedExceptio public void surrogatePairCombingFullSurrs() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "surrogatePairCombingFullSurrs.html"), new File(destinationFolder + "surrogatePairCombingFullSurrs.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "surrogatePairCombingFullSurrs.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "surrogatePairCombingFullSurrs.pdf", sourceFolder + "cmp_surrogatePairCombingFullSurrs.pdf", destinationFolder)); } @@ -96,7 +95,7 @@ public void surrogatePairCombingFullSurrs() throws IOException, InterruptedExcep public void surrogatePairCombingFullSurrsWithNoSurrs() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "surrogatePairCombingFullSurrsWithNoSurrs.html"), new File(destinationFolder + "surrogatePairCombingFullSurrsWithNoSurrs.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "surrogatePairCombingFullSurrsWithNoSurrs.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "surrogatePairCombingFullSurrsWithNoSurrs.pdf", sourceFolder + "cmp_surrogatePairCombingFullSurrsWithNoSurrs.pdf", destinationFolder)); } @@ -106,7 +105,7 @@ public void surrogatePairCombingFullSurrsWithNoSurrs() throws IOException, Inter public void surrogatePairCombinationOf3TypesPairs() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "surrogatePairCombinationOf3TypesPairs.html"), new File(destinationFolder + "surrogatePairCombinationOf3TypesPairs.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "surrogatePairCombinationOf3TypesPairs.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "surrogatePairCombinationOf3TypesPairs.pdf", sourceFolder + "cmp_surrogatePairCombinationOf3TypesPairs.pdf", destinationFolder)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/actions/Html2PdfEventsHandlingTest.java b/src/test/java/com/itextpdf/html2pdf/actions/Html2PdfEventsHandlingTest.java index 123331813..47b9de7f4 100644 --- a/src/test/java/com/itextpdf/html2pdf/actions/Html2PdfEventsHandlingTest.java +++ b/src/test/java/com/itextpdf/html2pdf/actions/Html2PdfEventsHandlingTest.java @@ -55,21 +55,20 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -@Category(IntegrationTest.class) +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; + +@Tag("IntegrationTest") public class Html2PdfEventsHandlingTest extends ExtendedITextTest { private static final TestConfigurationEvent CONFIGURATION_ACCESS = new TestConfigurationEvent(); private static StoreEventsHandler handler; @@ -77,19 +76,19 @@ public class Html2PdfEventsHandlingTest extends ExtendedITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/actions/Html2PdfEventsHandlingTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/actions/Html2PdfEventsHandlingTest/"; - @Before + @BeforeEach public void setUpHandler() { handler = new StoreEventsHandler(); EventManager.getInstance().register(handler); } - @After + @AfterEach public void resetHandler() { EventManager.getInstance().unregister(handler); handler = null; } - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -115,27 +114,27 @@ public void twoDifferentElementsToOneDocumentTest() throws IOException { List events = CONFIGURATION_ACCESS.getPublicEvents(docSequenceId); // Confirmed 3 events, but only 2 events (1 core + 1 pdfHtml) will be reported because // ReportingHandler don't report similar events for one sequenceId - Assert.assertEquals(3, events.size()); + Assertions.assertEquals(3, events.size()); - Assert.assertTrue(events.get(0) instanceof ConfirmedEventWrapper); + Assertions.assertTrue(events.get(0) instanceof ConfirmedEventWrapper); ConfirmedEventWrapper confirmedEventWrapper = (ConfirmedEventWrapper) events.get(0); - Assert.assertTrue(confirmedEventWrapper.getEvent() instanceof ITextCoreProductEvent); - Assert.assertEquals(ITextCoreProductEvent.PROCESS_PDF, confirmedEventWrapper.getEvent().getEventType()); + Assertions.assertTrue(confirmedEventWrapper.getEvent() instanceof ITextCoreProductEvent); + Assertions.assertEquals(ITextCoreProductEvent.PROCESS_PDF, confirmedEventWrapper.getEvent().getEventType()); - Assert.assertTrue(events.get(1) instanceof ConfirmedEventWrapper); + Assertions.assertTrue(events.get(1) instanceof ConfirmedEventWrapper); confirmedEventWrapper = (ConfirmedEventWrapper) events.get(1); - Assert.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); - Assert.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); + Assertions.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); + Assertions.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); - Assert.assertTrue(events.get(2) instanceof ConfirmedEventWrapper); + Assertions.assertTrue(events.get(2) instanceof ConfirmedEventWrapper); confirmedEventWrapper = (ConfirmedEventWrapper) events.get(2); - Assert.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); - Assert.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); + Assertions.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); + Assertions.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); try (PdfDocument pdfDocument = new PdfDocument(new PdfReader(new ByteArrayInputStream(baos.toByteArray())))) { String expectedProdLine = createExpectedProducerLine( new ConfirmedEventWrapper[] {getCoreEvent(), getPdfHtmlEvent()}); - Assert.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); + Assertions.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); } } @@ -148,28 +147,28 @@ public void setOfElementsToOneDocumentTest() throws IOException { docSequenceId = pdfDocument.getDocumentIdWrapper(); String html = "

Hello world first!

Some text

Some second text

"; List lstFirst = HtmlConverter.convertToElements(html); - Assert.assertEquals(3, lstFirst.size()); + Assertions.assertEquals(3, lstFirst.size()); addElementsToDocument(document, lstFirst); } List events = CONFIGURATION_ACCESS.getPublicEvents(docSequenceId); - Assert.assertEquals(2, events.size()); + Assertions.assertEquals(2, events.size()); - Assert.assertTrue(events.get(0) instanceof ConfirmedEventWrapper); + Assertions.assertTrue(events.get(0) instanceof ConfirmedEventWrapper); ConfirmedEventWrapper confirmedEventWrapper = (ConfirmedEventWrapper) events.get(0); - Assert.assertTrue(confirmedEventWrapper.getEvent() instanceof ITextCoreProductEvent); - Assert.assertEquals(ITextCoreProductEvent.PROCESS_PDF, confirmedEventWrapper.getEvent().getEventType()); + Assertions.assertTrue(confirmedEventWrapper.getEvent() instanceof ITextCoreProductEvent); + Assertions.assertEquals(ITextCoreProductEvent.PROCESS_PDF, confirmedEventWrapper.getEvent().getEventType()); - Assert.assertTrue(events.get(1) instanceof ConfirmedEventWrapper); + Assertions.assertTrue(events.get(1) instanceof ConfirmedEventWrapper); confirmedEventWrapper = (ConfirmedEventWrapper) events.get(1); - Assert.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); - Assert.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); + Assertions.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); + Assertions.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); try (PdfDocument pdfDocument = new PdfDocument(new PdfReader(new ByteArrayInputStream(baos.toByteArray())))) { String expectedProdLine = createExpectedProducerLine( new ConfirmedEventWrapper[] {getCoreEvent(), getPdfHtmlEvent()}); - Assert.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); + Assertions.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); } } @@ -183,22 +182,22 @@ public void convertHtmlToDocumentTest() throws IOException { } List events = CONFIGURATION_ACCESS.getPublicEvents(docId); - Assert.assertEquals(2, events.size()); + Assertions.assertEquals(2, events.size()); - Assert.assertTrue(events.get(0) instanceof ConfirmedEventWrapper); + Assertions.assertTrue(events.get(0) instanceof ConfirmedEventWrapper); ConfirmedEventWrapper confirmedEventWrapper = (ConfirmedEventWrapper) events.get(0); - Assert.assertTrue(confirmedEventWrapper.getEvent() instanceof ITextCoreProductEvent); - Assert.assertEquals(ITextCoreProductEvent.PROCESS_PDF, confirmedEventWrapper.getEvent().getEventType()); + Assertions.assertTrue(confirmedEventWrapper.getEvent() instanceof ITextCoreProductEvent); + Assertions.assertEquals(ITextCoreProductEvent.PROCESS_PDF, confirmedEventWrapper.getEvent().getEventType()); - Assert.assertTrue(events.get(1) instanceof ConfirmedEventWrapper); + Assertions.assertTrue(events.get(1) instanceof ConfirmedEventWrapper); confirmedEventWrapper = (ConfirmedEventWrapper) events.get(1); - Assert.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); - Assert.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); + Assertions.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); + Assertions.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); try (PdfDocument pdfDocument = new PdfDocument(new PdfReader(DESTINATION_FOLDER + outFileName))) { String expectedProdLine = createExpectedProducerLine( new ConfirmedEventWrapper[] {getCoreEvent(), getPdfHtmlEvent()}); - Assert.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); + Assertions.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); } } @@ -212,7 +211,7 @@ public void convertHtmlToDocAndAddElementsToDocTest() throws IOException { String html = "

Hello world first!

Some text

Some second text

"; List lstFirst = HtmlConverter.convertToElements(html); - Assert.assertEquals(3, lstFirst.size()); + Assertions.assertEquals(3, lstFirst.size()); addElementsToDocument(document, lstFirst); } @@ -220,27 +219,27 @@ public void convertHtmlToDocAndAddElementsToDocTest() throws IOException { List events = CONFIGURATION_ACCESS.getPublicEvents(docId); // Confirmed 3 events, but only 2 events (1 core + 1 pdfHtml) will be reported because // ReportingHandler don't report similar events for one sequenceId - Assert.assertEquals(3, events.size()); + Assertions.assertEquals(3, events.size()); - Assert.assertTrue(events.get(0) instanceof ConfirmedEventWrapper); + Assertions.assertTrue(events.get(0) instanceof ConfirmedEventWrapper); ConfirmedEventWrapper confirmedEventWrapper = (ConfirmedEventWrapper) events.get(0); - Assert.assertTrue(confirmedEventWrapper.getEvent() instanceof ITextCoreProductEvent); - Assert.assertEquals(ITextCoreProductEvent.PROCESS_PDF, confirmedEventWrapper.getEvent().getEventType()); + Assertions.assertTrue(confirmedEventWrapper.getEvent() instanceof ITextCoreProductEvent); + Assertions.assertEquals(ITextCoreProductEvent.PROCESS_PDF, confirmedEventWrapper.getEvent().getEventType()); - Assert.assertTrue(events.get(1) instanceof ConfirmedEventWrapper); + Assertions.assertTrue(events.get(1) instanceof ConfirmedEventWrapper); confirmedEventWrapper = (ConfirmedEventWrapper) events.get(1); - Assert.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); - Assert.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); + Assertions.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); + Assertions.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); - Assert.assertTrue(events.get(2) instanceof ConfirmedEventWrapper); + Assertions.assertTrue(events.get(2) instanceof ConfirmedEventWrapper); confirmedEventWrapper = (ConfirmedEventWrapper) events.get(2); - Assert.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); - Assert.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); + Assertions.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); + Assertions.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); try (PdfDocument pdfDocument = new PdfDocument(new PdfReader(DESTINATION_FOLDER + outFileName))) { String expectedProdLine = createExpectedProducerLine( new ConfirmedEventWrapper[] {getCoreEvent(), getPdfHtmlEvent()}); - Assert.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); + Assertions.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); } } @@ -251,14 +250,14 @@ public void convertHtmlToPdfTest() throws IOException { new PdfWriter(DESTINATION_FOLDER + outFileName)); List events = handler.getEvents(); - Assert.assertEquals(1, events.size()); + Assertions.assertEquals(1, events.size()); AbstractProductProcessITextEvent event = events.get(0).getConfirmedEvent(); - Assert.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, event.getEventType()); + Assertions.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, event.getEventType()); try (PdfDocument pdfDocument = new PdfDocument(new PdfReader(DESTINATION_FOLDER + outFileName))) { String expectedProdLine = createExpectedProducerLine(new ConfirmedEventWrapper[] {getPdfHtmlEvent()}); - Assert.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); + Assertions.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); } } @@ -270,18 +269,18 @@ public void convertHtmlToPdfWithExistPdfTest() throws IOException { } List events = handler.getEvents(); - Assert.assertEquals(2, events.size()); + Assertions.assertEquals(2, events.size()); AbstractProductProcessITextEvent event = events.get(0).getConfirmedEvent(); - Assert.assertEquals(ITextCoreProductEvent.PROCESS_PDF, event.getEventType()); + Assertions.assertEquals(ITextCoreProductEvent.PROCESS_PDF, event.getEventType()); event = events.get(1).getConfirmedEvent(); - Assert.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, event.getEventType()); + Assertions.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, event.getEventType()); try (PdfDocument pdfDocument = new PdfDocument(new PdfReader(DESTINATION_FOLDER + outFileName))) { String expectedProdLine = createExpectedProducerLine( new ConfirmedEventWrapper[] {getCoreEvent(), getPdfHtmlEvent()}); - Assert.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); + Assertions.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); } } @@ -305,22 +304,22 @@ public void nestedElementToDocumentTest() throws IOException { List events = CONFIGURATION_ACCESS.getPublicEvents(docSequenceId); - Assert.assertEquals(2, events.size()); + Assertions.assertEquals(2, events.size()); - Assert.assertTrue(events.get(0) instanceof ConfirmedEventWrapper); + Assertions.assertTrue(events.get(0) instanceof ConfirmedEventWrapper); ConfirmedEventWrapper confirmedEventWrapper = (ConfirmedEventWrapper) events.get(0); - Assert.assertTrue(confirmedEventWrapper.getEvent() instanceof ITextCoreProductEvent); - Assert.assertEquals(ITextCoreProductEvent.PROCESS_PDF, confirmedEventWrapper.getEvent().getEventType()); + Assertions.assertTrue(confirmedEventWrapper.getEvent() instanceof ITextCoreProductEvent); + Assertions.assertEquals(ITextCoreProductEvent.PROCESS_PDF, confirmedEventWrapper.getEvent().getEventType()); - Assert.assertTrue(events.get(1) instanceof ConfirmedEventWrapper); + Assertions.assertTrue(events.get(1) instanceof ConfirmedEventWrapper); confirmedEventWrapper = (ConfirmedEventWrapper) events.get(1); - Assert.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); - Assert.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); + Assertions.assertTrue(confirmedEventWrapper.getEvent() instanceof PdfHtmlProductEvent); + Assertions.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, confirmedEventWrapper.getEvent().getEventType()); try (PdfDocument pdfDocument = new PdfDocument(new PdfReader(new ByteArrayInputStream(baos.toByteArray())))) { String expectedProdLine = createExpectedProducerLine( new ConfirmedEventWrapper[] {getCoreEvent(), getPdfHtmlEvent()}); - Assert.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); + Assertions.assertEquals(expectedProdLine, pdfDocument.getDocumentInfo().getProducer()); } } @@ -372,7 +371,7 @@ private static class HtmlTestMetaInfo implements IMetaInfo {} private void validatePdfProducerLine(String filePath, String expected) throws IOException { try (PdfDocument pdfDocument = new PdfDocument(new PdfReader(filePath))) { - Assert.assertEquals(expected, pdfDocument.getDocumentInfo().getProducer()); + Assertions.assertEquals(expected, pdfDocument.getDocumentInfo().getProducer()); } } @@ -408,7 +407,7 @@ private static void addElementsToDocument(Document document, List elem } else if (elem instanceof AreaBreak) { document.add((AreaBreak) elem); } else { - Assert.fail( + Assertions.fail( "The #convertToElements method gave element which is unsupported as root element, it's unexpected."); } } diff --git a/src/test/java/com/itextpdf/html2pdf/actions/events/PdfHtmlProductEventTest.java b/src/test/java/com/itextpdf/html2pdf/actions/events/PdfHtmlProductEventTest.java index dbbe75765..9cc632eb6 100644 --- a/src/test/java/com/itextpdf/html2pdf/actions/events/PdfHtmlProductEventTest.java +++ b/src/test/java/com/itextpdf/html2pdf/actions/events/PdfHtmlProductEventTest.java @@ -27,28 +27,27 @@ This file is part of the iText (R) project. import com.itextpdf.commons.actions.confirmations.EventConfirmationType; import com.itextpdf.commons.actions.sequence.SequenceId; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class PdfHtmlProductEventTest extends ExtendedITextTest { @Test public void convertElementsEventTest() { SequenceId sequenceId = new SequenceId(); PdfHtmlProductEvent event = PdfHtmlProductEvent.createConvertHtmlEvent(sequenceId, new PdfHtmlTestMetaInfo("meta data")); - Assert.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, event.getEventType()); - Assert.assertEquals(ProductNameConstant.PDF_HTML, event.getProductName()); - Assert.assertEquals(EventConfirmationType.ON_CLOSE, event.getConfirmationType()); - Assert.assertEquals(sequenceId, event.getSequenceId()); + Assertions.assertEquals(PdfHtmlProductEvent.CONVERT_HTML, event.getEventType()); + Assertions.assertEquals(ProductNameConstant.PDF_HTML, event.getProductName()); + Assertions.assertEquals(EventConfirmationType.ON_CLOSE, event.getConfirmationType()); + Assertions.assertEquals(sequenceId, event.getSequenceId()); - Assert.assertEquals(PdfHtmlProductData.getInstance().getPublicProductName(), event.getProductData().getPublicProductName()); - Assert.assertEquals(PdfHtmlProductData.getInstance().getProductName(), event.getProductData().getProductName()); - Assert.assertEquals(PdfHtmlProductData.getInstance().getVersion(), event.getProductData().getVersion()); - Assert.assertEquals(PdfHtmlProductData.getInstance().getSinceCopyrightYear(), event.getProductData().getSinceCopyrightYear()); - Assert.assertEquals(PdfHtmlProductData.getInstance().getToCopyrightYear(), event.getProductData().getToCopyrightYear()); + Assertions.assertEquals(PdfHtmlProductData.getInstance().getPublicProductName(), event.getProductData().getPublicProductName()); + Assertions.assertEquals(PdfHtmlProductData.getInstance().getProductName(), event.getProductData().getProductName()); + Assertions.assertEquals(PdfHtmlProductData.getInstance().getVersion(), event.getProductData().getVersion()); + Assertions.assertEquals(PdfHtmlProductData.getInstance().getSinceCopyrightYear(), event.getProductData().getSinceCopyrightYear()); + Assertions.assertEquals(PdfHtmlProductData.getInstance().getToCopyrightYear(), event.getProductData().getToCopyrightYear()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/DefaultTagWorkerFactoryTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/DefaultTagWorkerFactoryTest.java index dee4c9acf..8c845b2d5 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/DefaultTagWorkerFactoryTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/DefaultTagWorkerFactoryTest.java @@ -25,34 +25,24 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ConverterProperties; import com.itextpdf.html2pdf.attach.ITagWorker; import com.itextpdf.html2pdf.attach.ProcessorContext; -import com.itextpdf.html2pdf.exceptions.TagWorkerInitializationException; -import com.itextpdf.commons.utils.MessageFormatUtil; -import com.itextpdf.html2pdf.attach.impl.DefaultTagWorkerMapping.ITagWorkerCreator; import com.itextpdf.layout.IPropertyContainer; import com.itextpdf.styledxmlparser.jsoup.nodes.Element; import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.IElementNode; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class DefaultTagWorkerFactoryTest extends ExtendedITextTest { - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); - @Test public void cannotGetTagWorkerForCustomTagViaReflection() { ITagWorker tagWorker = new TestTagWorkerFactory().getTagWorker(new JsoupElementNode(new Element(Tag.valueOf("custom-tag"), "")), new ProcessorContext(new ConverterProperties())); - Assert.assertEquals(TestClass.class, tagWorker.getClass()); + Assertions.assertEquals(TestClass.class, tagWorker.getClass()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/HtmlMetaInfoContainerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/HtmlMetaInfoContainerTest.java index 0d5b7c595..422f7bef3 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/HtmlMetaInfoContainerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/HtmlMetaInfoContainerTest.java @@ -28,13 +28,12 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ProcessorContextCreator; import com.itextpdf.html2pdf.attach.ProcessorContext; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class HtmlMetaInfoContainerTest extends ExtendedITextTest { @Test @@ -42,14 +41,14 @@ public void createAndGetMetaInfoTest() { TestMetaInfo metaInfo = new TestMetaInfo(); HtmlMetaInfoContainer metaInfoContainer = new HtmlMetaInfoContainer(metaInfo); - Assert.assertSame(metaInfo, metaInfoContainer.getMetaInfo()); + Assertions.assertSame(metaInfo, metaInfoContainer.getMetaInfo()); } @Test public void getNullMetaInfoTest() { HtmlMetaInfoContainer metaInfoContainer = new HtmlMetaInfoContainer(null); - Assert.assertNull(metaInfoContainer.getMetaInfo()); + Assertions.assertNull(metaInfoContainer.getMetaInfo()); } @Test @@ -57,10 +56,10 @@ public void processorContextCreatorCreatesContextWithHtmlMetaInfoTest() { ProcessorContext processorContext = ProcessorContextCreator.createProcessorContext(new ConverterProperties()); HtmlMetaInfoContainer htmlMetaInfoContainer = processorContext.getMetaInfoContainer(); - Assert.assertNotNull(htmlMetaInfoContainer); + Assertions.assertNotNull(htmlMetaInfoContainer); IMetaInfo metaInfo = htmlMetaInfoContainer.getMetaInfo(); - Assert.assertTrue(metaInfo.getClass().getName().startsWith(NamespaceConstant.PDF_HTML + ".")); + Assertions.assertTrue(metaInfo.getClass().getName().startsWith(NamespaceConstant.PDF_HTML + ".")); } private static class TestMetaInfo implements IMetaInfo { diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/OutlineHandlerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/OutlineHandlerTest.java index a50565326..fd6d890f7 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/OutlineHandlerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/OutlineHandlerTest.java @@ -38,25 +38,23 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.IElementNode; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; -@Category(IntegrationTest.class) +@org.junit.jupiter.api.Tag("IntegrationTest") public class OutlineHandlerTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/attach/impl/OutlineHandlerTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/attach/impl/OutlineHandlerTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -80,9 +78,9 @@ public void defaultDestinationPrefixTest() { outlineHandler.addOutlineAndDestToDocument(new PTagWorker(elementNode, context), elementNode, context); PdfOutline pdfOutline = context.getPdfDocument().getOutlines(false).getAllChildren().get(0); - Assert.assertEquals("p1", pdfOutline.getTitle()); + Assertions.assertEquals("p1", pdfOutline.getTitle()); PdfString pdfStringDest = (PdfString) pdfOutline.getDestination().getPdfObject(); - Assert.assertEquals("pdfHTML-iText-outline-1", pdfStringDest.toUnicodeString()); + Assertions.assertEquals("pdfHTML-iText-outline-1", pdfStringDest.toUnicodeString()); } @Test @@ -92,7 +90,7 @@ public void customDestinationPrefixTest() { OutlineHandler outlineHandler = new OutlineHandler().putAllMarksPriorityMappings(priorityMappings); outlineHandler.setDestinationNamePrefix("prefix-"); - Assert.assertEquals("prefix-", outlineHandler.getDestinationNamePrefix()); + Assertions.assertEquals("prefix-", outlineHandler.getDestinationNamePrefix()); ProcessorContext context = new ProcessorContext(new ConverterProperties().setOutlineHandler(outlineHandler)); context.reset(new PdfDocument(new PdfWriter(new ByteArrayOutputStream()))); @@ -107,9 +105,9 @@ public void customDestinationPrefixTest() { outlineHandler.addOutlineAndDestToDocument(new PTagWorker(elementNode, context), elementNode, context); PdfOutline pdfOutline = context.getPdfDocument().getOutlines(false).getAllChildren().get(0); - Assert.assertEquals("p1", pdfOutline.getTitle()); + Assertions.assertEquals("p1", pdfOutline.getTitle()); PdfString pdfStringDest = (PdfString) pdfOutline.getDestination().getPdfObject(); - Assert.assertEquals("prefix-1", pdfStringDest.toUnicodeString()); + Assertions.assertEquals("prefix-1", pdfStringDest.toUnicodeString()); } @Test @@ -122,7 +120,7 @@ public void defaultOutlineHandlerWithHTagHavingIdTest() throws IOException, Inte OutlineHandler outlineHandler = OutlineHandler.createStandardHandler(); HtmlConverter.convertToPdf(new File(inFile), new File(outFile), new ConverterProperties().setOutlineHandler(outlineHandler)); - Assert.assertNull(new CompareTool().compareByContent(outFile, cmpFile, DESTINATION_FOLDER, "diff_defaultOutlineHandlerWithHTagHavingIdTest")); + Assertions.assertNull(new CompareTool().compareByContent(outFile, cmpFile, DESTINATION_FOLDER, "diff_defaultOutlineHandlerWithHTagHavingIdTest")); } @Test @@ -136,7 +134,7 @@ public void resetOutlineHandlerTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(srcHtml), new File(outPdf), new ConverterProperties().setOutlineHandler(outlineHandler)); - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER, "diff_" + i)); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER, "diff_" + i)); } } @@ -149,7 +147,7 @@ public void capitalHeadingLevelTest() throws IOException, InterruptedException { OutlineHandler outlineHandler = OutlineHandler.createStandardHandler(); HtmlConverter.convertToPdf(new File(inFile), new File(outFile), new ConverterProperties().setOutlineHandler(outlineHandler)); - Assert.assertNull(new CompareTool().compareByContent(outFile, cmpFile, DESTINATION_FOLDER, + Assertions.assertNull(new CompareTool().compareByContent(outFile, cmpFile, DESTINATION_FOLDER, "diff_capitalHeadingLevelOne")); } @@ -165,7 +163,7 @@ public void classBasedOutlineTest() throws IOException, InterruptedException { .putAllMarksPriorityMappings(priorityMappings); HtmlConverter.convertToPdf(new File(inFile), new File(outFile), new ConverterProperties().setOutlineHandler(handler)); - Assert.assertNull(new CompareTool().compareByContent(outFile, cmpFile, DESTINATION_FOLDER, + Assertions.assertNull(new CompareTool().compareByContent(outFile, cmpFile, DESTINATION_FOLDER, "diff_ClassBasedOutline")); } @@ -177,7 +175,7 @@ public void overrideOutlineHandlerTest() throws IOException, InterruptedExceptio OutlineHandler handler = new ChangedOutlineHandler(); HtmlConverter.convertToPdf(new File(inFile), new File(outFile), new ConverterProperties().setOutlineHandler(handler)); - Assert.assertNull(new CompareTool().compareByContent(outFile, cmpFile, DESTINATION_FOLDER, + Assertions.assertNull(new CompareTool().compareByContent(outFile, cmpFile, DESTINATION_FOLDER, "diff_ChangedOutlineHandler")); } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/Html2PdfPropertyTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/Html2PdfPropertyTest.java index 4bb24228d..88bb5c5a9 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/Html2PdfPropertyTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/Html2PdfPropertyTest.java @@ -23,17 +23,16 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.attach.impl.layout; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.lang.reflect.Field; import com.itextpdf.commons.utils.MessageFormatUtil; import java.util.HashSet; import java.util.Set; -@Category(UnitTest.class) +@Tag("UnitTest") public class Html2PdfPropertyTest extends ExtendedITextTest { @Test @@ -47,7 +46,7 @@ public void propertyUniquenessTest() throws IllegalAccessException { maxFieldValue = Math.max(maxFieldValue, value); minFieldValue = Math.min(minFieldValue, value); if (fieldValues.contains(value)) { - Assert.fail(MessageFormatUtil.format("Multiple fields with same value: {0}", value)); + Assertions.fail(MessageFormatUtil.format("Multiple fields with same value: {0}", value)); } fieldValues.add(value); } @@ -55,7 +54,7 @@ public void propertyUniquenessTest() throws IllegalAccessException { for (int i = minFieldValue; i <= maxFieldValue; i++) { if (!fieldValues.contains(i)) { - Assert.fail(MessageFormatUtil.format("Missing value: {0}", i)); + Assertions.fail(MessageFormatUtil.format("Missing value: {0}", i)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/HtmlDocumentRendererIntegrationTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/HtmlDocumentRendererIntegrationTest.java index 5fafc6427..0c97b55b2 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/HtmlDocumentRendererIntegrationTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/HtmlDocumentRendererIntegrationTest.java @@ -23,19 +23,18 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.attach.impl.layout; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HtmlDocumentRendererIntegrationTest extends ExtendedHtmlConversionITextTest { private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/attach/impl/layout/HtmlDocumentRendererIntegrationTest/"; private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/attach/impl/layout/HtmlDocumentRendererIntegrationTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/HtmlDocumentRendererTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/HtmlDocumentRendererTest.java index aa45d171e..31b3d8766 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/HtmlDocumentRendererTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/HtmlDocumentRendererTest.java @@ -29,13 +29,12 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.pdf.canvas.PdfCanvas; import com.itextpdf.layout.Document; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class HtmlDocumentRendererTest extends ExtendedITextTest { @Test @@ -46,14 +45,14 @@ public void shouldAttemptTrimLastPageTest() { document.setRenderer(documentRenderer); pdfDocument.addNewPage(); - Assert.assertEquals(1, pdfDocument.getNumberOfPages()); + Assertions.assertEquals(1, pdfDocument.getNumberOfPages()); // For one-page documents it does not make sense to attempt to trim last page - Assert.assertFalse(documentRenderer.shouldAttemptTrimLastPage()); + Assertions.assertFalse(documentRenderer.shouldAttemptTrimLastPage()); pdfDocument.addNewPage(); - Assert.assertEquals(2, pdfDocument.getNumberOfPages()); + Assertions.assertEquals(2, pdfDocument.getNumberOfPages()); // If there are more than one page, we try to trim last page - Assert.assertTrue(documentRenderer.shouldAttemptTrimLastPage()); + Assertions.assertTrue(documentRenderer.shouldAttemptTrimLastPage()); } @Test @@ -67,11 +66,11 @@ public void trimLastPageIfNecessaryTest() { new PdfCanvas(pdfDocument.getLastPage()).moveTo(10, 10).lineTo(20, 20).stroke(); pdfDocument.addNewPage(); - Assert.assertEquals(3, pdfDocument.getNumberOfPages()); + Assertions.assertEquals(3, pdfDocument.getNumberOfPages()); documentRenderer.trimLastPageIfNecessary(); - Assert.assertEquals(2, pdfDocument.getNumberOfPages()); + Assertions.assertEquals(2, pdfDocument.getNumberOfPages()); documentRenderer.trimLastPageIfNecessary(); - Assert.assertEquals(2, pdfDocument.getNumberOfPages()); + Assertions.assertEquals(2, pdfDocument.getNumberOfPages()); } @Test @@ -81,7 +80,7 @@ public void estimatedNumberOfPagesInNextRendererEmptyDocumentTest() { HtmlDocumentRenderer documentRenderer = (HtmlDocumentRenderer) document.getRenderer(); HtmlDocumentRenderer nextRenderer = (HtmlDocumentRenderer) documentRenderer.getNextRenderer(); - Assert.assertEquals(0, nextRenderer.getEstimatedNumberOfPages()); + Assertions.assertEquals(0, nextRenderer.getEstimatedNumberOfPages()); } @Test @@ -91,6 +90,6 @@ public void estimatedNumberOfPagesInNextRendererDocumentWithTextChunkTest() { HtmlDocumentRenderer documentRenderer = (HtmlDocumentRenderer) document.getRenderer(); HtmlDocumentRenderer nextRenderer = (HtmlDocumentRenderer) documentRenderer.getNextRenderer(); - Assert.assertEquals(1, nextRenderer.getEstimatedNumberOfPages()); + Assertions.assertEquals(1, nextRenderer.getEstimatedNumberOfPages()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageCountRendererTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageCountRendererTest.java index ffde6d8c7..dc9eb2e29 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageCountRendererTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageCountRendererTest.java @@ -31,15 +31,14 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.UnitTest; import java.io.IOException; import java.util.ArrayList; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class PageCountRendererTest extends ExtendedITextTest { @Test @@ -51,7 +50,7 @@ public void getNextRendererShouldBeOverriddenTest() { // Nothing is overridden }; - Assert.assertEquals(PageCountRenderer.class, pageCountRenderer.getNextRenderer().getClass()); + Assertions.assertEquals(PageCountRenderer.class, pageCountRenderer.getNextRenderer().getClass()); } @Test @@ -61,10 +60,10 @@ public void getNextRendererShouldBeOverriddenTest() { public void createCopyShouldBeOverriddenTest() throws IOException { PageCountRenderer pageCountRenderer = new CustomPageCountRenderer(new PageCountElement()); - Assert.assertEquals(CustomPageCountRenderer.class, pageCountRenderer.getNextRenderer().getClass()); + Assertions.assertEquals(CustomPageCountRenderer.class, pageCountRenderer.getNextRenderer().getClass()); // This test checks for the log message being sent, so we should get there - Assert.assertTrue(true); + Assertions.assertTrue(true); } static class CustomPageCountRenderer extends PageCountRenderer { @@ -80,9 +79,9 @@ public IRenderer getNextRenderer() { // we need to call it from inside the class. TextRenderer copy = createCopy(new GlyphLine(new ArrayList()), PdfFontFactory.createFont()); - Assert.assertNotNull(copy); + Assertions.assertNotNull(copy); } catch (IOException e) { - Assert.fail("We do not expect PdfFontFactory#createFont() to throw an exception here."); + Assertions.fail("We do not expect PdfFontFactory#createFont() to throw an exception here."); } return new CustomPageCountRenderer((PageCountElement) this.modelElement); } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageSizeParserTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageSizeParserTest.java index b31b3505b..312a6c775 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageSizeParserTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageSizeParserTest.java @@ -27,12 +27,11 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class PageSizeParserTest extends ExtendedITextTest { private static final double EPS = 1e-9; @@ -74,7 +73,7 @@ public void incorrectPageSizeNameTest() { } private void assertSizesAreSame(PageSize a, PageSize b) { - Assert.assertEquals(a.getWidth(), b.getWidth(), EPS); - Assert.assertEquals(a.getHeight(), b.getHeight(), EPS); + Assertions.assertEquals(a.getWidth(), b.getWidth(), EPS); + Assertions.assertEquals(a.getHeight(), b.getHeight(), EPS); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageTargetCountElementTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageTargetCountElementTest.java index da1796a72..fce1a3a1d 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageTargetCountElementTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageTargetCountElementTest.java @@ -24,24 +24,23 @@ This file is part of the iText (R) project. import com.itextpdf.layout.renderer.IRenderer; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class PageTargetCountElementTest extends ExtendedITextTest { @Test public void constructorTest() { PageTargetCountElement element = new PageTargetCountElement("'aadad''''adad#####'''aaa"); - Assert.assertEquals("aadadadadaaa", element.getTarget()); + Assertions.assertEquals("aadadadadaaa", element.getTarget()); } @Test public void makeNewRendererTest() { PageTargetCountElement element = new PageTargetCountElement("'#target'"); IRenderer renderer = element.getRenderer(); - Assert.assertTrue(renderer instanceof PageTargetCountRenderer); + Assertions.assertTrue(renderer instanceof PageTargetCountRenderer); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageTargetCountRendererTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageTargetCountRendererTest.java index eb54a25bd..737dc3d66 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageTargetCountRendererTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/PageTargetCountRendererTest.java @@ -31,15 +31,14 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.UnitTest; import java.io.IOException; import java.util.ArrayList; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class PageTargetCountRendererTest extends ExtendedITextTest { @Test @@ -52,7 +51,7 @@ public void getNextRendererShouldBeOverriddenTest() { // Nothing is overridden }; - Assert.assertEquals(PageTargetCountRenderer.class, pageTargetCountRenderer.getNextRenderer().getClass()); + Assertions.assertEquals(PageTargetCountRenderer.class, pageTargetCountRenderer.getNextRenderer().getClass()); } @@ -64,10 +63,10 @@ public void createCopyShouldBeOverriddenTest() { PageTargetCountRenderer pageTargetCountRenderer = new CustomPageTargetCountRenderer(new PageTargetCountElement("test")); - Assert.assertEquals(CustomPageTargetCountRenderer.class, pageTargetCountRenderer.getNextRenderer().getClass()); + Assertions.assertEquals(CustomPageTargetCountRenderer.class, pageTargetCountRenderer.getNextRenderer().getClass()); // This test checks for the log message being sent, so we should get there - Assert.assertTrue(true); + Assertions.assertTrue(true); } static class CustomPageTargetCountRenderer extends PageTargetCountRenderer { @@ -83,9 +82,9 @@ public IRenderer getNextRenderer() { // we need to call it from inside the class. TextRenderer copy = createCopy(new GlyphLine(new ArrayList()), PdfFontFactory.createFont()); - Assert.assertNotNull(copy); + Assertions.assertNotNull(copy); } catch (IOException e) { - Assert.fail("We do not expect PdfFontFactory#createFont() to throw an exception here."); + Assertions.fail("We do not expect PdfFontFactory#createFont() to throw an exception here."); } return new CustomPageTargetCountRenderer((PageTargetCountElement) this.modelElement); } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/WidthDimensionContainerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/WidthDimensionContainerTest.java index ee505ed6e..61538bfee 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/WidthDimensionContainerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/layout/WidthDimensionContainerTest.java @@ -26,15 +26,14 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.css.CssContextNode; import com.itextpdf.styledxmlparser.node.INode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class WidthDimensionContainerTest extends ExtendedITextTest { @Test @@ -56,6 +55,6 @@ public INode parentNode() { WidthDimensionContainer widthDimensionContainer = new WidthDimensionContainer(cssContextNode, 500, paragraph.createRendererSubTree(), 0); - Assert.assertEquals(widthDimensionContainer.minContentDimension, 20, 0.0); + Assertions.assertEquals(widthDimensionContainer.minContentDimension, 20, 0.0); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/AbbrTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/AbbrTagWorkerTest.java index bed49f142..4abf04bd1 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/AbbrTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/AbbrTagWorkerTest.java @@ -33,13 +33,11 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class AbbrTagWorkerTest extends ExtendedITextTest { @Test @@ -55,8 +53,8 @@ public void langAttrInAbbrForTaggedPdfTest() { tagWorker.processEnd(node, processorContext); IPropertyContainer propertyContainer = tagWorker.getAllElements().get(0); - Assert.assertTrue(propertyContainer instanceof IAccessibleElement); + Assertions.assertTrue(propertyContainer instanceof IAccessibleElement); String lang = ((IAccessibleElement) propertyContainer).getAccessibilityProperties().getLanguage(); - Assert.assertEquals("en", lang); + Assertions.assertEquals("en", lang); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/BodyTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/BodyTagWorkerTest.java index 969d4a984..3d69f3665 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/BodyTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/BodyTagWorkerTest.java @@ -33,13 +33,11 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class BodyTagWorkerTest extends ExtendedITextTest { @Test @@ -55,8 +53,8 @@ public void langAttrInBodyForTaggedPdfTest() { BodyTagWorker tagWorker = new BodyTagWorker(node, processorContext); IPropertyContainer propertyContainer = tagWorker.getElementResult(); - Assert.assertTrue(propertyContainer instanceof IAccessibleElement); + Assertions.assertTrue(propertyContainer instanceof IAccessibleElement); String lang = ((IAccessibleElement) propertyContainer).getAccessibilityProperties().getLanguage(); - Assert.assertEquals("en", lang); + Assertions.assertEquals("en", lang); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/BrTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/BrTagWorkerTest.java index c2403f954..f83467d66 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/BrTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/BrTagWorkerTest.java @@ -34,15 +34,13 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class BrTagWorkerTest extends ExtendedITextTest { @Test @@ -60,8 +58,8 @@ public void langAttrInBrForTaggedPdfTest() { BrTagWorker tagWorker = new BrTagWorker(node, processorContext); IPropertyContainer propertyContainer = tagWorker.getElementResult(); - Assert.assertTrue(propertyContainer instanceof IAccessibleElement); + Assertions.assertTrue(propertyContainer instanceof IAccessibleElement); String lang = ((IAccessibleElement) propertyContainer).getAccessibilityProperties().getLanguage(); - Assert.assertEquals("en", lang); + Assertions.assertEquals("en", lang); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/DisplayTableRowTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/DisplayTableRowTagWorkerTest.java index 4dec5d89a..07678b761 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/DisplayTableRowTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/DisplayTableRowTagWorkerTest.java @@ -35,15 +35,13 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class DisplayTableRowTagWorkerTest extends ExtendedITextTest { @Test @@ -72,10 +70,10 @@ public void langAttrInDisplayTableRowForTaggedPdfTest() { TdTagWorker childTagWorker = new TdTagWorker(childNode, processorContext); tagWorker.processTagChild(childTagWorker, processorContext); IPropertyContainer propertyContainer = tagWorker.getElementResult(); - Assert.assertTrue(propertyContainer instanceof Table); + Assertions.assertTrue(propertyContainer instanceof Table); Cell cell = ((Table) propertyContainer).getCell(0, 0); - Assert.assertNotNull(cell); - Assert.assertEquals("en", cell.getAccessibilityProperties().getLanguage()); + Assertions.assertNotNull(cell); + Assertions.assertEquals("en", cell.getAccessibilityProperties().getLanguage()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/DisplayTableTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/DisplayTableTagWorkerTest.java index 5853d254e..51485bacb 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/DisplayTableTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/DisplayTableTagWorkerTest.java @@ -35,15 +35,13 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class DisplayTableTagWorkerTest extends ExtendedITextTest { @Test @@ -63,8 +61,8 @@ public void langAttrInDisplayTableForTaggedPdfTest() { tagWorker.processEnd(node, processorContext); IPropertyContainer propertyContainer = tagWorker.getElementResult(); - Assert.assertTrue(propertyContainer instanceof Table); + Assertions.assertTrue(propertyContainer instanceof Table); String lang = ((IAccessibleElement) propertyContainer).getAccessibilityProperties().getLanguage(); - Assert.assertEquals("en", lang); + Assertions.assertEquals("en", lang); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/DivTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/DivTagWorkerTest.java index 91818025e..428a16de6 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/DivTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/DivTagWorkerTest.java @@ -33,13 +33,11 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class DivTagWorkerTest extends ExtendedITextTest { @Test @@ -54,8 +52,8 @@ public void langAttrInDivForTaggedPdfTest() { DivTagWorker tagWorker = new DivTagWorker(node, processorContext); IPropertyContainer propertyContainer = tagWorker.getElementResult(); - Assert.assertTrue(propertyContainer instanceof IAccessibleElement); + Assertions.assertTrue(propertyContainer instanceof IAccessibleElement); String lang = ((IAccessibleElement) propertyContainer).getAccessibilityProperties().getLanguage(); - Assert.assertEquals("en", lang); + Assertions.assertEquals("en", lang); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/InputTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/InputTagWorkerTest.java index 85970171c..5623e2276 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/InputTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/InputTagWorkerTest.java @@ -24,28 +24,27 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.html.AttributeConstants; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class InputTagWorkerTest extends ExtendedITextTest { @Test public void testNumberInputPreprocessing() { - Assert.assertEquals("", InputTagWorker.preprocessInputValue("bear", AttributeConstants.NUMBER)); - Assert.assertEquals("4", InputTagWorker.preprocessInputValue("4", AttributeConstants.NUMBER)); - Assert.assertEquals("04", InputTagWorker.preprocessInputValue("04", AttributeConstants.NUMBER)); - Assert.assertEquals("", InputTagWorker.preprocessInputValue("4.", AttributeConstants.NUMBER)); - Assert.assertEquals("", InputTagWorker.preprocessInputValue(".", AttributeConstants.NUMBER)); - Assert.assertEquals(".9", InputTagWorker.preprocessInputValue(".9", AttributeConstants.NUMBER)); - Assert.assertEquals("4.4", InputTagWorker.preprocessInputValue("4.4", AttributeConstants.NUMBER)); - Assert.assertEquals("-4", InputTagWorker.preprocessInputValue("-4", AttributeConstants.NUMBER)); - Assert.assertEquals("", InputTagWorker.preprocessInputValue("", AttributeConstants.NUMBER)); - Assert.assertEquals("", InputTagWorker.preprocessInputValue("-", AttributeConstants.NUMBER)); - Assert.assertEquals("-.9", InputTagWorker.preprocessInputValue("-.9", AttributeConstants.NUMBER)); - Assert.assertEquals("", InputTagWorker.preprocessInputValue("0-.9", AttributeConstants.NUMBER)); + Assertions.assertEquals("", InputTagWorker.preprocessInputValue("bear", AttributeConstants.NUMBER)); + Assertions.assertEquals("4", InputTagWorker.preprocessInputValue("4", AttributeConstants.NUMBER)); + Assertions.assertEquals("04", InputTagWorker.preprocessInputValue("04", AttributeConstants.NUMBER)); + Assertions.assertEquals("", InputTagWorker.preprocessInputValue("4.", AttributeConstants.NUMBER)); + Assertions.assertEquals("", InputTagWorker.preprocessInputValue(".", AttributeConstants.NUMBER)); + Assertions.assertEquals(".9", InputTagWorker.preprocessInputValue(".9", AttributeConstants.NUMBER)); + Assertions.assertEquals("4.4", InputTagWorker.preprocessInputValue("4.4", AttributeConstants.NUMBER)); + Assertions.assertEquals("-4", InputTagWorker.preprocessInputValue("-4", AttributeConstants.NUMBER)); + Assertions.assertEquals("", InputTagWorker.preprocessInputValue("", AttributeConstants.NUMBER)); + Assertions.assertEquals("", InputTagWorker.preprocessInputValue("-", AttributeConstants.NUMBER)); + Assertions.assertEquals("-.9", InputTagWorker.preprocessInputValue("-.9", AttributeConstants.NUMBER)); + Assertions.assertEquals("", InputTagWorker.preprocessInputValue("0-.9", AttributeConstants.NUMBER)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/LiTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/LiTagWorkerTest.java index 20c5aec75..36bbd5a88 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/LiTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/LiTagWorkerTest.java @@ -34,15 +34,13 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class LiTagWorkerTest extends ExtendedITextTest { @Test @@ -61,8 +59,8 @@ public void langAttrInLiForTaggedPdfTest() { LiTagWorker tagWorker = new LiTagWorker(node, processorContext); IPropertyContainer propertyContainer = tagWorker.getElementResult(); - Assert.assertTrue(propertyContainer instanceof IAccessibleElement); + Assertions.assertTrue(propertyContainer instanceof IAccessibleElement); String lang = ((IAccessibleElement) propertyContainer).getAccessibilityProperties().getLanguage(); - Assert.assertEquals("en", lang); + Assertions.assertEquals("en", lang); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/PTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/PTagWorkerTest.java index 4431b307d..6cea7291d 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/PTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/PTagWorkerTest.java @@ -34,15 +34,13 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class PTagWorkerTest extends ExtendedITextTest { @Test @@ -61,8 +59,8 @@ public void langAttrInPForTaggedPdfTest() { tagWorker.processEnd(node, processorContext); IPropertyContainer propertyContainer = tagWorker.getElementResult(); - Assert.assertTrue(propertyContainer instanceof IAccessibleElement); + Assertions.assertTrue(propertyContainer instanceof IAccessibleElement); String lang = ((IAccessibleElement) propertyContainer).getAccessibilityProperties().getLanguage(); - Assert.assertEquals("en", lang); + Assertions.assertEquals("en", lang); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/PageCountWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/PageCountWorkerTest.java index f0162eef2..9c4a72f38 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/PageCountWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/PageCountWorkerTest.java @@ -30,12 +30,11 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.resolve.func.counter.PageTargetCountElementNode; import com.itextpdf.layout.IPropertyContainer; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class PageCountWorkerTest extends ExtendedITextTest { @Test @@ -43,23 +42,23 @@ public void pageTargetCountElementNodeTest() { final String target = "target"; PageCountWorker worker = new PageCountWorker(new PageTargetCountElementNode(null, target), null); IPropertyContainer container = worker.getElementResult(); - Assert.assertTrue(container instanceof PageTargetCountElement); - Assert.assertEquals(target, ((PageTargetCountElement) container).getTarget()); + Assertions.assertTrue(container instanceof PageTargetCountElement); + Assertions.assertEquals(target, ((PageTargetCountElement) container).getTarget()); } @Test public void pageCountElementNodeTest() { PageCountWorker worker = new PageCountWorker(new PageCountElementNode(false, null), null); IPropertyContainer container = worker.getElementResult(); - Assert.assertTrue(container instanceof PageCountElement); - Assert.assertEquals(PageCountType.CURRENT_PAGE_NUMBER, container.getProperty(Html2PdfProperty.PAGE_COUNT_TYPE)); + Assertions.assertTrue(container instanceof PageCountElement); + Assertions.assertEquals(PageCountType.CURRENT_PAGE_NUMBER, container.getProperty(Html2PdfProperty.PAGE_COUNT_TYPE)); } @Test public void pagesCountElementNodeTest() { PageCountWorker worker = new PageCountWorker(new PageCountElementNode(true, null), null); IPropertyContainer container = worker.getElementResult(); - Assert.assertTrue(container instanceof PageCountElement); - Assert.assertEquals(PageCountType.TOTAL_PAGE_COUNT, container.getProperty(Html2PdfProperty.PAGE_COUNT_TYPE)); + Assertions.assertTrue(container instanceof PageCountElement); + Assertions.assertEquals(PageCountType.TOTAL_PAGE_COUNT, container.getProperty(Html2PdfProperty.PAGE_COUNT_TYPE)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/PreTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/PreTagWorkerTest.java index 0c8935781..66ed987ae 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/PreTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/PreTagWorkerTest.java @@ -31,16 +31,15 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.node.IElementNode; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.util.HashMap; import java.util.List; import java.util.Map; -@Category(UnitTest.class) +@Tag("UnitTest") public class PreTagWorkerTest extends ExtendedITextTest { @Test @@ -59,8 +58,8 @@ public void processContentWithoutRNTest() { Div div = (Div) preTagWorker.getElementResult(); List children = ((Paragraph) div.getChildren().get(0)).getChildren(); for (IElement child : children) { - Assert.assertTrue(child instanceof Text); - Assert.assertEquals("\u200Dcontent", ((Text) child).getText()); + Assertions.assertTrue(child instanceof Text); + Assertions.assertEquals("\u200Dcontent", ((Text) child).getText()); } } @@ -80,8 +79,8 @@ public void processContentWithNTest() { Div div = (Div) preTagWorker.getElementResult(); List children = ((Paragraph) div.getChildren().get(0)).getChildren(); for (IElement child : children) { - Assert.assertTrue(child instanceof Text); - Assert.assertEquals("\u200D\n\u200Dcontent", ((Text) child).getText()); + Assertions.assertTrue(child instanceof Text); + Assertions.assertEquals("\u200D\n\u200Dcontent", ((Text) child).getText()); } } @@ -102,11 +101,11 @@ public void processContentWithRNTest() { List children = ((Paragraph) div.getChildren().get(0)).getChildren(); for (int i = 0; i < children.size(); i++) { IElement child = children.get(i); - Assert.assertTrue(child instanceof Text); + Assertions.assertTrue(child instanceof Text); if (i == 0) { - Assert.assertEquals("\u200Dcontent", ((Text) child).getText()); + Assertions.assertEquals("\u200Dcontent", ((Text) child).getText()); } else { - Assert.assertEquals("\u200D\r\n\u200Dcontent", ((Text) child).getText()); + Assertions.assertEquals("\u200D\r\n\u200Dcontent", ((Text) child).getText()); } } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/SpanTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/SpanTagWorkerTest.java index f98d1e08e..3af5692e2 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/SpanTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/SpanTagWorkerTest.java @@ -33,13 +33,11 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class SpanTagWorkerTest extends ExtendedITextTest { @Test @@ -55,8 +53,8 @@ public void langAttrInSpanForTaggedPdfTest() { tagWorker.processEnd(node, processorContext); IPropertyContainer propertyContainer = tagWorker.getAllElements().get(0); - Assert.assertTrue(propertyContainer instanceof IAccessibleElement); + Assertions.assertTrue(propertyContainer instanceof IAccessibleElement); String lang = ((IAccessibleElement) propertyContainer).getAccessibilityProperties().getLanguage(); - Assert.assertEquals("en", lang); + Assertions.assertEquals("en", lang); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/SvgTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/SvgTagWorkerTest.java index a24ceee99..9331c534b 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/SvgTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/SvgTagWorkerTest.java @@ -34,13 +34,11 @@ This file is part of the iText (R) project. import com.itextpdf.test.LogLevelConstants; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class SvgTagWorkerTest extends ExtendedITextTest { @Test @@ -55,7 +53,7 @@ public void noSvgRootTest() { ProcessorContext context = new ProcessorContext(properties); SvgTagWorker svgTagWorker = new SvgTagWorker(elementNode, context); - Assert.assertNull(svgTagWorker.getElementResult()); + Assertions.assertNull(svgTagWorker.getElementResult()); } @Test @@ -67,7 +65,7 @@ public void nullElementTest() { ProcessorContext context = new ProcessorContext(properties); SvgTagWorker svgTagWorker = new SvgTagWorker(null, context); - Assert.assertNull(svgTagWorker.getElementResult()); + Assertions.assertNull(svgTagWorker.getElementResult()); } @Test @@ -79,6 +77,6 @@ public void unableToProcessSvgImageTest() { ConverterProperties properties = new ConverterProperties(); ProcessorContext context = new ProcessorContext(properties); SvgTagWorker tagWorker = new SvgTagWorker(elementNode, context); - Assert.assertNull(tagWorker.getElementResult()); + Assertions.assertNull(tagWorker.getElementResult()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/UlOlTagWorkerTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/UlOlTagWorkerTest.java index 0fc04f6b8..62a87817f 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/UlOlTagWorkerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/tags/UlOlTagWorkerTest.java @@ -34,15 +34,13 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class UlOlTagWorkerTest extends ExtendedITextTest { @Test @@ -60,8 +58,8 @@ public void langAttrInUlOlForTaggedPdfTest() { UlOlTagWorker tagWorker = new UlOlTagWorker(node, processorContext); IPropertyContainer propertyContainer = tagWorker.getElementResult(); - Assert.assertTrue(propertyContainer instanceof IAccessibleElement); + Assertions.assertTrue(propertyContainer instanceof IAccessibleElement); String lang = ((IAccessibleElement) propertyContainer).getAccessibilityProperties().getLanguage(); - Assert.assertEquals("en", lang); + Assertions.assertEquals("en", lang); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/impl/util/WhiteSpaceCollapsingAndTrimmingTest.java b/src/test/java/com/itextpdf/html2pdf/attach/impl/util/WhiteSpaceCollapsingAndTrimmingTest.java index 9b943ef4e..1755a39bf 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/impl/util/WhiteSpaceCollapsingAndTrimmingTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/impl/util/WhiteSpaceCollapsingAndTrimmingTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.attach.impl.util; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class WhiteSpaceCollapsingAndTrimmingTest extends ExtendedHtmlConversionITextTest { private static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/attacher/impl/WhiteSpaceCollapsingAndTrimmingTest/"; private static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/attacher/impl/WhiteSpaceCollapsingAndTrimmingTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/util/LinkHelperTest.java b/src/test/java/com/itextpdf/html2pdf/attach/util/LinkHelperTest.java index 20545a3be..5bce9bab1 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/util/LinkHelperTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/util/LinkHelperTest.java @@ -38,12 +38,10 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class LinkHelperTest extends ExtendedITextTest { @Test @@ -58,8 +56,8 @@ public void createDestinationDestinationTest() { LinkHelper.createDestination(worker, elementNode, context); Object destination = worker.getElementResult().getProperty(Property.DESTINATION); Tuple2 destTuple = (Tuple2)destination; - Assert.assertEquals("some_id", destTuple.getFirst()); - Assert.assertEquals(new PdfString("some_id"), destTuple.getSecond().get(PdfName.D)); + Assertions.assertEquals("some_id", destTuple.getFirst()); + Assertions.assertEquals(new PdfString("some_id"), destTuple.getSecond().get(PdfName.D)); } @Test @@ -70,6 +68,6 @@ public void createDestinationIDTest() { JsoupElementNode elementNode = new JsoupElementNode(new Element(Tag.valueOf("a"), "", attributes)); ProcessorContext context = new ProcessorContext(new ConverterProperties()); LinkHelper.createDestination(worker, elementNode, context); - Assert.assertEquals("some_id", worker.getElementResult().getProperty(Property.ID)); + Assertions.assertEquals("some_id", worker.getElementResult().getProperty(Property.ID)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attach/util/WaitingInlineElementsHelperTest.java b/src/test/java/com/itextpdf/html2pdf/attach/util/WaitingInlineElementsHelperTest.java index e822de210..efec78e51 100644 --- a/src/test/java/com/itextpdf/html2pdf/attach/util/WaitingInlineElementsHelperTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attach/util/WaitingInlineElementsHelperTest.java @@ -31,14 +31,13 @@ This file is part of the iText (R) project. import com.itextpdf.layout.element.Tab; import com.itextpdf.layout.element.Text; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.util.List; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class WaitingInlineElementsHelperTest extends ExtendedITextTest { private final String capitalizeStyle = "capitalize"; @@ -55,7 +54,7 @@ public void capitalizeLeafTest() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("One", lineResult); + Assertions.assertEquals("One", lineResult); } @Test @@ -67,7 +66,7 @@ public void capitalizeLeafWithTruePropertyTest() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("One", lineResult); + Assertions.assertEquals("One", lineResult); } @Test @@ -81,7 +80,7 @@ public void capitalizeWithEmptyTextLeafTest() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("Onetwo", lineResult); + Assertions.assertEquals("Onetwo", lineResult); } @Test @@ -94,7 +93,7 @@ public void capitalizeTwoLeavesWithSpaceBeforeSecondTest() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("One Two", lineResult); + Assertions.assertEquals("One Two", lineResult); } @Test @@ -106,7 +105,7 @@ public void oneLeafWithFalsePropertyAndCapitalizeStyleTest() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("one", lineResult); + Assertions.assertEquals("one", lineResult); } @Test @@ -120,7 +119,7 @@ public void capitalizeWithTabBetweenLeavesTest() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("OneTwo", lineResult); + Assertions.assertEquals("OneTwo", lineResult); } @Test @@ -134,7 +133,7 @@ public void capitalizeWithLineSeparatorBetweenLeavesTest() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("OneTwo", lineResult); + Assertions.assertEquals("OneTwo", lineResult); } @Test @@ -148,7 +147,7 @@ public void capitalizeWithDivBetweenLeavesTest() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("OneTwo", lineResult); + Assertions.assertEquals("OneTwo", lineResult); } @Test @@ -160,7 +159,7 @@ public void capitalizeTest01() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("one", lineResult); + Assertions.assertEquals("one", lineResult); } @Test @@ -174,7 +173,7 @@ public void capitalizeTest02() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("One Two", lineResult); + Assertions.assertEquals("One Two", lineResult); } @Test @@ -187,7 +186,7 @@ public void capitalizeTest03() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("One two", lineResult); + Assertions.assertEquals("One two", lineResult); } @Test @@ -201,7 +200,7 @@ public void capitalizeTest04() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("One two Three", lineResult); + Assertions.assertEquals("One two Three", lineResult); } @Test @@ -214,7 +213,7 @@ public void capitalizeTest05() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("One Twothree Four", lineResult); + Assertions.assertEquals("One Twothree Four", lineResult); } @Test @@ -227,7 +226,7 @@ public void capitalizeTest06() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("onetwo Three", lineResult); + Assertions.assertEquals("onetwo Three", lineResult); } @Test @@ -241,7 +240,7 @@ public void capitalizeTest07() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("One Twothreefour Five", lineResult); + Assertions.assertEquals("One Twothreefour Five", lineResult); } @Test @@ -255,7 +254,7 @@ public void capitalizeTest08() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("One twothree", lineResult); + Assertions.assertEquals("One twothree", lineResult); } @Test @@ -268,7 +267,7 @@ public void capitalizeTest09() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("one Two", lineResult); + Assertions.assertEquals("one Two", lineResult); } @Test @@ -284,7 +283,7 @@ public void capitalizeAfterUnderScoreTest() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertNotEquals("( One_two) ( _one_two)", lineResult); + Assertions.assertNotEquals("( One_two) ( _one_two)", lineResult); } @Test @@ -304,7 +303,7 @@ public void capitalizeAfterDigitsTest() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertNotEquals("( One2two) ( One 2two) ( One-2two) ( One_2two)", lineResult); + Assertions.assertNotEquals("( One2two) ( One 2two) ( One-2two) ( One_2two)", lineResult); } @Test @@ -318,7 +317,7 @@ public void capitalizeAfterColonTest() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertNotEquals("One:two", lineResult); + Assertions.assertNotEquals("One:two", lineResult); } @Test @@ -335,7 +334,7 @@ public void capitalizeTest10() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("(One/Two) (One-Two) (One&Two)", lineResult); + Assertions.assertEquals("(One/Two) (One-Two) (One&Two)", lineResult); } @Test @@ -352,7 +351,7 @@ public void capitalizeTest11() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("(One: Two) (One;Two) (One?Two)", lineResult); + Assertions.assertEquals("(One: Two) (One;Two) (One?Two)", lineResult); } @Test @@ -366,7 +365,7 @@ public void capitalizeTest12() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertNotEquals("One@2two", lineResult); + Assertions.assertNotEquals("One@2two", lineResult); } @Test @@ -380,7 +379,7 @@ public void capitalizeTest13() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertNotEquals("_one_@Two", lineResult); + Assertions.assertNotEquals("_one_@Two", lineResult); } @Test @@ -394,7 +393,7 @@ public void capitalizeTest14() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertNotEquals("One'two'", lineResult); + Assertions.assertNotEquals("One'two'", lineResult); } @Test @@ -409,7 +408,7 @@ public void capitalizeTest15() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("( 4'Two') ( One2(Two))", lineResult); + Assertions.assertEquals("( 4'Two') ( One2(Two))", lineResult); } @Test @@ -426,7 +425,7 @@ public void capitalizeTest16() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("(!One!Two) ( One::Two) ( One:-Two)", lineResult); + Assertions.assertEquals("(!One!Two) ( One::Two) ( One:-Two)", lineResult); } @Test @@ -441,7 +440,7 @@ public void capitalizeTest17() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("( One:'Two') ( One(Two))", lineResult); + Assertions.assertEquals("( One:'Two') ( One(Two))", lineResult); } @Test @@ -456,7 +455,7 @@ public void capitalizeTest18() { inlineHelper.flushHangingLeaves(div); String lineResult = getLine(div); - Assert.assertEquals("( One,Two) ( One~Two)", lineResult); + Assertions.assertEquals("( One,Two) ( One~Two)", lineResult); } private Text createText(String text, boolean capitalizeProperty) { diff --git a/src/test/java/com/itextpdf/html2pdf/attribute/AlignAttributeTest.java b/src/test/java/com/itextpdf/html2pdf/attribute/AlignAttributeTest.java index 2485e134e..9ae574075 100644 --- a/src/test/java/com/itextpdf/html2pdf/attribute/AlignAttributeTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attribute/AlignAttributeTest.java @@ -30,23 +30,22 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.pdf.PdfWriter; import com.itextpdf.kernel.pdf.WriterProperties; import com.itextpdf.kernel.utils.CompareTool; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class AlignAttributeTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/attribute/AlignAttributeTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/attribute/AlignAttributeTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -78,7 +77,7 @@ public void imgAttrAlignLeftReadOrderPdfTest() throws IOException, InterruptedEx FileInputStream fileInputStream = new FileInputStream(htmlSource); HtmlConverter.convertToPdf(fileInputStream, pdfDocument, converterProperties); - Assert.assertNull(new CompareTool() + Assertions.assertNull(new CompareTool() .compareByContent(pdfDestinationFile, cmpPdfDestinationFile, destinationFolder)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/attribute/HeightTest.java b/src/test/java/com/itextpdf/html2pdf/attribute/HeightTest.java index 6c1030b0e..35a32241d 100644 --- a/src/test/java/com/itextpdf/html2pdf/attribute/HeightTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attribute/HeightTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.attribute; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HeightTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/attribute/HeightTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/attribute/HeightTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/attribute/LangAttributeTest.java b/src/test/java/com/itextpdf/html2pdf/attribute/LangAttributeTest.java index 2c5bade1a..14f15f7b0 100644 --- a/src/test/java/com/itextpdf/html2pdf/attribute/LangAttributeTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attribute/LangAttributeTest.java @@ -35,25 +35,24 @@ This file is part of the iText (R) project. import com.itextpdf.layout.element.IElement; import com.itextpdf.layout.element.Paragraph; import com.itextpdf.layout.element.Text; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.util.List; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.FileInputStream; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class LangAttributeTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/attribute/LangAttributeTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/attribute/LangAttributeTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -71,8 +70,8 @@ public void langAttrInElementForTaggedPdfTest() throws IOException { PdfDocument document = new PdfDocument(new PdfReader(outFile)); TagTreePointer tagPointer = new TagTreePointer(document); tagPointer.moveToKid(StandardRoles.P); - Assert.assertEquals("en", tagPointer.getProperties().getLanguage()); - Assert.assertNull(document.getCatalog().getLang()); + Assertions.assertEquals("en", tagPointer.getProperties().getLanguage()); + Assertions.assertNull(document.getCatalog().getLang()); document.close(); } @@ -90,24 +89,24 @@ public void langAttrInvalidTagsTest() throws IOException { PdfDocument document = new PdfDocument(new PdfReader(outFile)); TagTreePointer tagPointer = new TagTreePointer(document); tagPointer.moveToKid(1, StandardRoles.P); - Assert.assertEquals("a-DE", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("a-DE", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot().moveToKid(2, StandardRoles.P); - Assert.assertEquals("DE", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("DE", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot().moveToKid(3, StandardRoles.P); - Assert.assertEquals("de-419-DE", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("de-419-DE", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot().moveToKid(4, StandardRoles.P); - Assert.assertEquals("en-gb", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("en-gb", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot().moveToKid(5, StandardRoles.P); - Assert.assertEquals("fr-brai", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("fr-brai", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot().moveToKid(6, StandardRoles.P); - Assert.assertEquals("fr-BRAI", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("fr-BRAI", tagPointer.getProperties().getLanguage()); - Assert.assertNull(document.getCatalog().getLang()); + Assertions.assertNull(document.getCatalog().getLang()); document.close(); } @@ -125,37 +124,37 @@ public void langAttrEmptyTagTest() throws IOException { TagTreePointer tagPointer = new TagTreePointer(document); tagPointer.moveToKid(0); - Assert.assertEquals("", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("", tagPointer.getProperties().getLanguage()); tagPointer .moveToRoot() .moveToKid(1) .moveToKid(0) .moveToKid(StandardRoles.P); - Assert.assertEquals("", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("", tagPointer.getProperties().getLanguage()); tagPointer .moveToRoot() .moveToKid(1) .moveToKid(2) .moveToKid(StandardRoles.P); - Assert.assertEquals("", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("", tagPointer.getProperties().getLanguage()); tagPointer .moveToRoot() .moveToKid(2) .moveToKid(0) .moveToKid(StandardRoles.TD); - Assert.assertEquals("", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("", tagPointer.getProperties().getLanguage()); tagPointer .moveToRoot() .moveToKid(2) .moveToKid(1) .moveToKid(StandardRoles.TD); - Assert.assertEquals("", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("", tagPointer.getProperties().getLanguage()); - Assert.assertNull(document.getCatalog().getLang()); + Assertions.assertNull(document.getCatalog().getLang()); document.close(); } @@ -172,15 +171,15 @@ public void langAttrRegionSubtagTest() throws IOException { PdfDocument document = new PdfDocument(new PdfReader(outFile)); TagTreePointer tagPointer = new TagTreePointer(document); tagPointer.moveToKid(1, StandardRoles.P); - Assert.assertEquals("de-DE", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("de-DE", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot().moveToKid(2, StandardRoles.P); - Assert.assertEquals("en-US", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("en-US", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot().moveToKid(3, StandardRoles.P); - Assert.assertEquals("es-419", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("es-419", tagPointer.getProperties().getLanguage()); - Assert.assertNull(document.getCatalog().getLang()); + Assertions.assertNull(document.getCatalog().getLang()); document.close(); } @@ -198,15 +197,15 @@ public void langAttrScriptSubtagTest() throws IOException { PdfDocument document = new PdfDocument(new PdfReader(outFile)); TagTreePointer tagPointer = new TagTreePointer(document); tagPointer.moveToKid(1, StandardRoles.P); - Assert.assertEquals("fr-Brai", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("fr-Brai", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot().moveToKid(2, StandardRoles.P); - Assert.assertEquals("ru-Latn", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("ru-Latn", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot().moveToKid(3, StandardRoles.P); - Assert.assertEquals("sr-Cyrl", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("sr-Cyrl", tagPointer.getProperties().getLanguage()); - Assert.assertNull(document.getCatalog().getLang()); + Assertions.assertNull(document.getCatalog().getLang()); document.close(); } @@ -223,12 +222,12 @@ public void langAttrScriptRegionSubtagTest() throws IOException { PdfDocument document = new PdfDocument(new PdfReader(outFile)); TagTreePointer tagPointer = new TagTreePointer(document); tagPointer.moveToKid(1, StandardRoles.P); - Assert.assertEquals("zh-Hans-CN", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("zh-Hans-CN", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot().moveToKid(2, StandardRoles.P); - Assert.assertEquals("ru-Cyrl-BY", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("ru-Cyrl-BY", tagPointer.getProperties().getLanguage()); - Assert.assertNull( document.getCatalog().getLang()); + Assertions.assertNull( document.getCatalog().getLang()); document.close(); } @@ -247,21 +246,21 @@ public void langAttrInSvgForTaggedPdfTest() throws IOException { TagTreePointer tagPointer = new TagTreePointer(document); tagPointer.moveToKid(StandardRoles.FIGURE); - Assert.assertEquals("en", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("en", tagPointer.getProperties().getLanguage()); tagPointer .moveToRoot() .moveToKid(2, StandardRoles.P) .moveToKid(StandardRoles.FIGURE); - Assert.assertEquals("fr", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("fr", tagPointer.getProperties().getLanguage()); tagPointer .moveToRoot() .moveToKid(3, StandardRoles.P) .moveToKid(StandardRoles.FIGURE); - Assert.assertEquals("ru", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("ru", tagPointer.getProperties().getLanguage()); - Assert.assertNull(document.getCatalog().getLang()); + Assertions.assertNull(document.getCatalog().getLang()); document.close(); } @@ -279,32 +278,32 @@ public void langAttrInListsForTaggedPdfTest() throws IOException { TagTreePointer tagPointer = new TagTreePointer(document); tagPointer.moveToKid(0, StandardRoles.L); - Assert.assertEquals("en", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("en", tagPointer.getProperties().getLanguage()); tagPointer .moveToKid(2, StandardRoles.LI) .moveToKid(0, StandardRoles.LBODY); - Assert.assertEquals("", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot(); tagPointer.moveToKid(1, StandardRoles.L); tagPointer.getProperties().getLanguage(); - Assert.assertEquals("de", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("de", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot(); tagPointer .moveToKid(2, StandardRoles.L) .moveToKid(0, StandardRoles.LI) .moveToKid(0, StandardRoles.LBODY); - Assert.assertEquals("en", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("en", tagPointer.getProperties().getLanguage()); tagPointer.moveToRoot(); tagPointer .moveToKid(2, StandardRoles.L) .moveToKid(1, StandardRoles.LI) .moveToKid(0, StandardRoles.LBODY); - Assert.assertEquals("de", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("de", tagPointer.getProperties().getLanguage()); - Assert.assertNull(document.getCatalog().getLang()); + Assertions.assertNull(document.getCatalog().getLang()); document.close(); } @@ -325,20 +324,20 @@ public void langAttrInListWithBeforeStyleForTaggedPdfTest() throws IOException { .moveToKid(0, StandardRoles.L) .moveToKid(1, StandardRoles.LI) .moveToKid(0, StandardRoles.LBODY); - Assert.assertEquals("de", tagPointer.getProperties().getLanguage()); + Assertions.assertEquals("de", tagPointer.getProperties().getLanguage()); List kidsRoles = tagPointer.moveToKid(StandardRoles.P).getKidsRoles(); - Assert.assertTrue(StandardRoles.SPAN.equals(kidsRoles.get(0)) + Assertions.assertTrue(StandardRoles.SPAN.equals(kidsRoles.get(0)) && StandardRoles.SPAN.equals(kidsRoles.get(1))); - Assert.assertNull(document.getCatalog().getLang()); + Assertions.assertNull(document.getCatalog().getLang()); document.close(); } @Test public void langAttrInDivAndSpanForTagPdfTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInDivAndSpanForTagPdfTest"); - Assert.assertEquals("ru", doc.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("ru", doc.getCatalog().getLang().toUnicodeString()); doc.close(); } @@ -349,50 +348,50 @@ public void langAttrInDivAndSpanForConvertToElementsMethodTest() throws IOExcept List elemList = HtmlConverter.convertToElements(new FileInputStream(html)); Div div = (Div) elemList.get(0); - Assert.assertEquals("la", div.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("la", div.getAccessibilityProperties().getLanguage()); Paragraph p = (Paragraph) div.getChildren().get(0); - Assert.assertNull(p.getAccessibilityProperties().getLanguage()); + Assertions.assertNull(p.getAccessibilityProperties().getLanguage()); div = (Div) div.getChildren().get(1); - Assert.assertEquals("en", div.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("en", div.getAccessibilityProperties().getLanguage()); div = (Div) elemList.get(1); - Assert.assertEquals("ru", div.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("ru", div.getAccessibilityProperties().getLanguage()); p = (Paragraph) div.getChildren().get(0); - Assert.assertNull(p.getAccessibilityProperties().getLanguage()); + Assertions.assertNull(p.getAccessibilityProperties().getLanguage()); div = (Div) div.getChildren().get(1); - Assert.assertNull(div.getAccessibilityProperties().getLanguage()); + Assertions.assertNull(div.getAccessibilityProperties().getLanguage()); p = (Paragraph) elemList.get(2); Text text = (Text) p.getChildren().get(0); - Assert.assertNull(text.getAccessibilityProperties().getLanguage()); + Assertions.assertNull(text.getAccessibilityProperties().getLanguage()); text = (Text) p.getChildren().get(1); - Assert.assertEquals("ru", text.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("ru", text.getAccessibilityProperties().getLanguage()); text = (Text) p.getChildren().get(2); - Assert.assertEquals("en", text.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("en", text.getAccessibilityProperties().getLanguage()); text = (Text) p.getChildren().get(3); - Assert.assertEquals("ru", text.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("ru", text.getAccessibilityProperties().getLanguage()); text = (Text) p.getChildren().get(4); - Assert.assertNull(text.getAccessibilityProperties().getLanguage()); + Assertions.assertNull(text.getAccessibilityProperties().getLanguage()); } @Test public void langAttrInFormFieldsetAndLegendForTaggedPdfTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInFormFieldsetAndLegendForTaggedPdfTest"); - Assert.assertNull(doc.getCatalog().getLang()); + Assertions.assertNull(doc.getCatalog().getLang()); doc.close(); } @Test public void langAttrInInputAndTextareaForTaggedPdfTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInInputAndTextareaForTaggedPdfTest"); - Assert.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); doc.close(); } @Test public void langAttrInButtonForTaggedPdfTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInButtonForTaggedPdfTest"); - Assert.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); doc.close(); } @@ -412,9 +411,9 @@ public void langAttrInInputAndTextareaForTaggedPdfWithActoformTest() throws IOEx PdfDocument document = new PdfDocument(new PdfReader(outFile)); //compareByContent is used here to check the complete logical structure tree to notice all the differences. - Assert.assertNull(new CompareTool().compareByContent(outFile, cmp, destinationFolder, + Assertions.assertNull(new CompareTool().compareByContent(outFile, cmp, destinationFolder, "diff_forms")); - Assert.assertEquals("da", document.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("da", document.getCatalog().getLang().toUnicodeString()); document.close(); } @@ -435,9 +434,9 @@ public void langAttrInButtonForTaggedPdfWithActoformTest() throws IOException, I PdfDocument document = new PdfDocument(new PdfReader(outFile)); //compareByContent is used here to check the complete logical structure tree to notice all the differences. - Assert.assertNull(new CompareTool().compareByContent(outFile, cmp, destinationFolder, + Assertions.assertNull(new CompareTool().compareByContent(outFile, cmp, destinationFolder, "diff_forms")); - Assert.assertEquals("da", document.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("da", document.getCatalog().getLang().toUnicodeString()); document.close(); } @@ -445,63 +444,63 @@ public void langAttrInButtonForTaggedPdfWithActoformTest() throws IOException, I @Test public void langAttrInTableForTaggedPdfTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInTableForTaggedPdfTest"); - Assert.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); doc.close(); } @Test public void langAttrInTableWithColgroupForTaggedPdfTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInTableWithColgroupForTaggedPdfTest"); - Assert.assertNull(doc.getCatalog().getLang()); + Assertions.assertNull(doc.getCatalog().getLang()); doc.close(); } @Test public void langAttrInTableWithColgroupTheadAndTfootForTaggedPdfTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInTableWithColgroupTheadAndTfootForTaggedPdfTest"); - Assert.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); doc.close(); } @Test public void langAttrInTableWithTheadAndColgroupForTaggedPdfTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInTableWithTheadAndColgroupForTaggedPdfTest"); - Assert.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); doc.close(); } @Test public void langAttrInTableWithTheadTfootWithLangForTaggedPdfTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInTableWithTheadTfootWithLangForTaggedPdfTest"); - Assert.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); doc.close(); } @Test public void langAttrInTableWithTheadWithLangAndTfootForTaggedPdfTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInTableWithTheadWithLangAndTfootForTaggedPdfTest"); - Assert.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("da", doc.getCatalog().getLang().toUnicodeString()); doc.close(); } @Test public void langAttrInSelectsWithLangAndOneOptionForTaggedPdfTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInSelectsWithLangAndOneOptionForTaggedPdfTest"); - Assert.assertNull(doc.getCatalog().getLang()); + Assertions.assertNull(doc.getCatalog().getLang()); doc.close(); } @Test public void langAttrInSelectsWithSeveralOptionForTaggedPdfTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInSelectsWithSeveralOptionForTaggedPdfTest"); - Assert.assertNull(doc.getCatalog().getLang()); + Assertions.assertNull(doc.getCatalog().getLang()); doc.close(); } @Test public void langAttrInHtmlWithLangBodyWithoutLangTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInHtmlWithLangBodyWithoutLangTest"); - Assert.assertEquals("ru", doc.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("ru", doc.getCatalog().getLang().toUnicodeString()); doc.close(); } @@ -512,29 +511,29 @@ public void langAttrInHtmlWithLangBodyWithoutLangForConvertToElementsMethodTest( List elemList = HtmlConverter.convertToElements(new FileInputStream(html)); Paragraph p = (Paragraph) elemList.get(0); - Assert.assertEquals("ru", p.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("ru", p.getAccessibilityProperties().getLanguage()); p = (Paragraph) elemList.get(1); - Assert.assertEquals("en", p.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("en", p.getAccessibilityProperties().getLanguage()); Div div = (Div) elemList.get(2); - Assert.assertEquals("ru", div.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("ru", div.getAccessibilityProperties().getLanguage()); p = (Paragraph) elemList.get(3); - Assert.assertEquals("ru", p.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("ru", p.getAccessibilityProperties().getLanguage()); } @Test public void langAttrInHtmlWithoutLangBodyWithLangTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInHtmlWithoutLangBodyWithLangTest"); - Assert.assertEquals("ru", doc.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("ru", doc.getCatalog().getLang().toUnicodeString()); doc.close(); } @Test public void langAttrInHtmlWithLangBodyWithLangTest() throws IOException, InterruptedException { PdfDocument doc = compareResultWithDocument("langAttrInHtmlWithLangBodyWithLangTest"); - Assert.assertEquals("by", doc.getCatalog().getLang().toUnicodeString()); + Assertions.assertEquals("by", doc.getCatalog().getLang().toUnicodeString()); doc.close(); } @@ -545,16 +544,16 @@ public void langAttrInHtmlWithLangBodyWithLangForConvertToElementsMethodTest() t List elemList = HtmlConverter.convertToElements(new FileInputStream(html)); Paragraph p = (Paragraph) elemList.get(0); - Assert.assertEquals("by", p.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("by", p.getAccessibilityProperties().getLanguage()); p = (Paragraph) elemList.get(1); - Assert.assertEquals("en", p.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("en", p.getAccessibilityProperties().getLanguage()); Div div = (Div) elemList.get(2); - Assert.assertEquals("by", div.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("by", div.getAccessibilityProperties().getLanguage()); p = (Paragraph) elemList.get(3); - Assert.assertEquals("by", p.getAccessibilityProperties().getLanguage()); + Assertions.assertEquals("by", p.getAccessibilityProperties().getLanguage()); } private PdfDocument compareResultWithDocument(String fileName) throws IOException, InterruptedException { @@ -570,7 +569,7 @@ private PdfDocument compareResultWithDocument(String fileName) throws IOExceptio PdfDocument document = new PdfDocument(new PdfReader(outFile)); // compareByContent is used here to check the complete logical structure tree to notice all the differences. - Assert.assertNull(new CompareTool().compareByContent(outFile, cmp, destinationFolder, + Assertions.assertNull(new CompareTool().compareByContent(outFile, cmp, destinationFolder, "diff_test")); return document; diff --git a/src/test/java/com/itextpdf/html2pdf/attribute/NowrapAttributeTest.java b/src/test/java/com/itextpdf/html2pdf/attribute/NowrapAttributeTest.java index 94074537b..75e6dcf9b 100644 --- a/src/test/java/com/itextpdf/html2pdf/attribute/NowrapAttributeTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attribute/NowrapAttributeTest.java @@ -26,19 +26,18 @@ This file is part of the iText (R) project. import com.itextpdf.io.logs.IoLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class NowrapAttributeTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/attribute/NowrapAttributeTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/attribute/NowrapAttributeTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/attribute/StyleDirectionTest.java b/src/test/java/com/itextpdf/html2pdf/attribute/StyleDirectionTest.java index aa69f2c96..89a31dc6a 100644 --- a/src/test/java/com/itextpdf/html2pdf/attribute/StyleDirectionTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attribute/StyleDirectionTest.java @@ -26,21 +26,20 @@ This file is part of the iText (R) project. import com.itextpdf.io.logs.IoLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class StyleDirectionTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/attribute" + "/StyleDirectionTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/attribute/StyleDirectionTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/attribute/TextAlignTest.java b/src/test/java/com/itextpdf/html2pdf/attribute/TextAlignTest.java index cf627d089..33e0abb28 100644 --- a/src/test/java/com/itextpdf/html2pdf/attribute/TextAlignTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attribute/TextAlignTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.attribute; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class TextAlignTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/attribute/TextAlignTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/attribute/TextAlignTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/attribute/WidthTest.java b/src/test/java/com/itextpdf/html2pdf/attribute/WidthTest.java index 856205c3e..064c753bb 100644 --- a/src/test/java/com/itextpdf/html2pdf/attribute/WidthTest.java +++ b/src/test/java/com/itextpdf/html2pdf/attribute/WidthTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.attribute; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class WidthTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/attribute/WidthTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/attribute/WidthTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/AbsolutePositionTest.java b/src/test/java/com/itextpdf/html2pdf/css/AbsolutePositionTest.java index 8bf752755..cdae22168 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/AbsolutePositionTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/AbsolutePositionTest.java @@ -26,22 +26,21 @@ This file is part of the iText (R) project. import com.itextpdf.io.logs.IoLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class AbsolutePositionTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/AbsolutePositionTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/AbsolutePositionTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -52,7 +51,7 @@ public void absolutePosition01Test() throws IOException, InterruptedException { } @Test - @Ignore("DEVSIX-1616: Absolute position for elements that break across pages is not supported") + @Disabled("DEVSIX-1616: Absolute position for elements that break across pages is not supported") public void absolutePosition02Test() throws IOException, InterruptedException { convertToPdfAndCompare("absolutePositionTest02", sourceFolder, destinationFolder); } @@ -135,7 +134,7 @@ public void absolutePositionTest17() throws IOException, InterruptedException { convertToPdfAndCompare("absolutePositionTest17", sourceFolder, destinationFolder); } - @Ignore("DEVSIX-1818") + @Disabled("DEVSIX-1818") @Test public void absolutePositionTest18() throws IOException, InterruptedException { convertToPdfAndCompare("absolutePositionTest18", sourceFolder, destinationFolder); diff --git a/src/test/java/com/itextpdf/html2pdf/css/BackgroundBlendModeTest.java b/src/test/java/com/itextpdf/html2pdf/css/BackgroundBlendModeTest.java index 1754db236..af54547bb 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BackgroundBlendModeTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BackgroundBlendModeTest.java @@ -27,20 +27,19 @@ This file is part of the iText (R) project. import com.itextpdf.test.LogLevelConstants; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BackgroundBlendModeTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/BackgroundBlendModeTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/BackgroundBlendModeTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/BackgroundClipTest.java b/src/test/java/com/itextpdf/html2pdf/css/BackgroundClipTest.java index 03897b495..478f3efd3 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BackgroundClipTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BackgroundClipTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BackgroundClipTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/BackgroundClipTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/BackgroundClipTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/BackgroundColorWithFormattingElementsTest.java b/src/test/java/com/itextpdf/html2pdf/css/BackgroundColorWithFormattingElementsTest.java index 9e007fda6..547d03cfc 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BackgroundColorWithFormattingElementsTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BackgroundColorWithFormattingElementsTest.java @@ -23,14 +23,13 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BackgroundColorWithFormattingElementsTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css" @@ -38,7 +37,7 @@ public class BackgroundColorWithFormattingElementsTest extends ExtendedHtmlConve private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css" + "/BackgroundColorWithFormattingElementsTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/BackgroundOriginTest.java b/src/test/java/com/itextpdf/html2pdf/css/BackgroundOriginTest.java index abcbc28fa..1bcc81c8f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BackgroundOriginTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BackgroundOriginTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BackgroundOriginTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/BackgroundOriginTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/BackgroundOriginTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/BackgroundRepeatTest.java b/src/test/java/com/itextpdf/html2pdf/css/BackgroundRepeatTest.java index f0ba25233..a94ce358f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BackgroundRepeatTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BackgroundRepeatTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BackgroundRepeatTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/BackgroundRepeatTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/BackgroundRepeatTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/BackgroundTest.java b/src/test/java/com/itextpdf/html2pdf/css/BackgroundTest.java index 35e1e9c0e..26ac8640c 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BackgroundTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BackgroundTest.java @@ -29,22 +29,21 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.logs.StyledXmlParserLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BackgroundTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/BackgroundTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/BackgroundTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -53,7 +52,7 @@ public static void beforeClass() { public void backgroundSizeTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "backgroundsize01.html"), new File(destinationFolder + "backgroundsize01.pdf")); - Assert.assertNull(new CompareTool() + Assertions.assertNull(new CompareTool() .compareByContent(destinationFolder + "backgroundsize01.pdf", sourceFolder + "cmp_backgroundsize01.pdf", destinationFolder)); } @@ -238,7 +237,7 @@ public void backgroundSvgTest() throws IOException, InterruptedException { String testName = "backgroundSvgTest"; HtmlConverter.convertToPdf(new File(sourceFolder + testName + ".xht"), new File(destinationFolder + testName + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + testName + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + testName + ".pdf", sourceFolder + "cmp_" + testName + ".pdf", destinationFolder)); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/BlockFormattingContextTest.java b/src/test/java/com/itextpdf/html2pdf/css/BlockFormattingContextTest.java index 149506094..09b9ffd8b 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BlockFormattingContextTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BlockFormattingContextTest.java @@ -25,18 +25,17 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; import java.io.IOException; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BlockFormattingContextTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/BlockFormattingContextTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/BlockFormattingContextTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/BodyBackgroundTest.java b/src/test/java/com/itextpdf/html2pdf/css/BodyBackgroundTest.java index 4467b0f4c..c9215e8c3 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BodyBackgroundTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BodyBackgroundTest.java @@ -27,22 +27,21 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BodyBackgroundTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/BodyBackgroundTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/BodyBackgroundTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/BorderRadiusTest.java b/src/test/java/com/itextpdf/html2pdf/css/BorderRadiusTest.java index 3496db530..55454dff8 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BorderRadiusTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BorderRadiusTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BorderRadiusTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/BorderRadiusTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/BorderRadiusTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/BorderTest.java b/src/test/java/com/itextpdf/html2pdf/css/BorderTest.java index bfeeba7b0..a94619311 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BorderTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BorderTest.java @@ -30,21 +30,20 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.css.validate.impl.CssDeviceCmykAwareValidator; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BorderTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/BorderTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/BorderTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/BoxSizingTest.java b/src/test/java/com/itextpdf/html2pdf/css/BoxSizingTest.java index 0e645442c..7f3f34afe 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BoxSizingTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BoxSizingTest.java @@ -26,21 +26,20 @@ This file is part of the iText (R) project. import com.itextpdf.io.logs.IoLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BoxSizingTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/BoxSizingTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/BoxSizingTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/BrTagTest.java b/src/test/java/com/itextpdf/html2pdf/css/BrTagTest.java index 3671cbb22..889a43a25 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/BrTagTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/BrTagTest.java @@ -27,23 +27,22 @@ This file is part of the iText (R) project. import com.itextpdf.layout.element.Paragraph; import com.itextpdf.layout.properties.Property; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.util.List; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; /** * This test handles the case where a br tag causes the pdf to no longer be pdf/A compliant * The underlying problem turns out to be that the inserted Text IElement has no font, and uses the default (Helvetica) font. * The font does not get embedded, and as such, it breaks the compliancy. */ -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BrTagTest extends ExtendedITextTest { - @BeforeClass + @BeforeAll public static void beforeClass() { } @@ -59,10 +58,10 @@ public void test() { ""; List elements = HtmlConverter.convertToElements(input); - Assert.assertEquals(3, elements.size()); - Assert.assertTrue(elements.get(1) instanceof Paragraph); - Assert.assertEquals(1, ((Paragraph)elements.get(1)).getChildren().size()); + Assertions.assertEquals(3, elements.size()); + Assertions.assertTrue(elements.get(1) instanceof Paragraph); + Assertions.assertEquals(1, ((Paragraph)elements.get(1)).getChildren().size()); IElement iElement = ((Paragraph) elements.get(1)).getChildren().get(0); - Assert.assertArrayEquals(new String[] {"freesans"}, iElement.getProperty(Property.FONT)); + Assertions.assertArrayEquals(new String[] {"freesans"}, iElement.getProperty(Property.FONT)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/ClearTest.java b/src/test/java/com/itextpdf/html2pdf/css/ClearTest.java index 6996238a2..9bf6429d0 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/ClearTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/ClearTest.java @@ -23,22 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ClearTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/ClearTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/ClearTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/ContinuousContainerTest.java b/src/test/java/com/itextpdf/html2pdf/css/ContinuousContainerTest.java index 5c58a25c7..0bec28616 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/ContinuousContainerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/ContinuousContainerTest.java @@ -24,19 +24,18 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ConverterProperties; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ContinuousContainerTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/ContinuousContainerTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/ContinuousContainerTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CounterTest.java b/src/test/java/com/itextpdf/html2pdf/css/CounterTest.java index 377e9d52a..0b4f2fa1a 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CounterTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CounterTest.java @@ -27,20 +27,19 @@ This file is part of the iText (R) project. import com.itextpdf.test.LogLevelConstants; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CounterTest extends ExtendedHtmlConversionITextTest{ public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/CounterTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/CounterTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssCaseSensitivityTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssCaseSensitivityTest.java index ab1b70a3f..c27dbbecd 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssCaseSensitivityTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssCaseSensitivityTest.java @@ -23,26 +23,25 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssCaseSensitivityTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CssCaseSensitivityTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/CssCaseSensitivityTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @Test - @Ignore("DEVSIX-2430") + @Disabled("DEVSIX-2430") public void listTypeTest01() throws IOException, InterruptedException { convertToPdfAndCompare("listType01", sourceFolder, destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssCollapsingMarginsTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssCollapsingMarginsTest.java index ead956588..27280d3a5 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssCollapsingMarginsTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssCollapsingMarginsTest.java @@ -26,21 +26,20 @@ This file is part of the iText (R) project. import com.itextpdf.io.util.UrlUtil; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssCollapsingMarginsTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CssCollapsingMarginsTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/CssCollapsingMarginsTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @@ -354,7 +353,7 @@ private void test(String in, String out, String diff) throws IOException, Interr HtmlConverter.convertToPdf(srcFile, destFile); System.out.println("html: " + UrlUtil.getNormalizedFileUriString(srcFile.getAbsolutePath()) + "\n"); - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, diff)); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, diff)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssEmptySelectorTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssEmptySelectorTest.java index 2c3e1653f..0bb54a0c1 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssEmptySelectorTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssEmptySelectorTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssEmptySelectorTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CssEmptySelectorTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/CssEmptySelectorTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssFormsTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssFormsTest.java index fefd24e6a..a90858805 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssFormsTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssFormsTest.java @@ -28,21 +28,20 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssFormsTest extends ExtendedITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/CssFormsTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/CssFormsTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -150,6 +149,6 @@ private void runTest(String testName) throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(htmlName), new File(outFileName)); printPathToConsole(htmlName, "html: "); - Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, DESTINATION_FOLDER)); + Assertions.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, DESTINATION_FOLDER)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssInheritanceTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssInheritanceTest.java index 36ad5b3ca..cf429b9fa 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssInheritanceTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssInheritanceTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssInheritanceTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CssInheritanceTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/CssInheritanceTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssNthChildSelectorTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssNthChildSelectorTest.java index 23b26e2f2..12a1f7210 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssNthChildSelectorTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssNthChildSelectorTest.java @@ -24,21 +24,20 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssNthChildSelectorTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CssNthChildSelectorTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/CssNthChildSelectorTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssNthOfTypeSelectorTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssNthOfTypeSelectorTest.java index 0f2fc9f10..c07574b6f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssNthOfTypeSelectorTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssNthOfTypeSelectorTest.java @@ -24,21 +24,20 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssNthOfTypeSelectorTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CssNthOfTypeSelectorTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/CssNthOfTypeSelectorTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssOpacityTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssOpacityTest.java index 9c2b75948..66f35a15f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssOpacityTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssOpacityTest.java @@ -23,19 +23,18 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssOpacityTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CssOpacityTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/CssOpacityTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssOutlineTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssOutlineTest.java index 4839a8191..410df735a 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssOutlineTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssOutlineTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssOutlineTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CssOutlineTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/CssOutlineTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssRemUnitValueTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssRemUnitValueTest.java index 24653a736..e2d340727 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssRemUnitValueTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssRemUnitValueTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssRemUnitValueTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CssRemUnitValueTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/CssRemUnitValueTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssRootSelectorTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssRootSelectorTest.java index c81c87307..fb1aca45f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssRootSelectorTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssRootSelectorTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssRootSelectorTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CssRootSelectorTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/CssRootSelectorTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssStyleSheetParserTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssStyleSheetParserTest.java index e824bd3ae..da80e2c67 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssStyleSheetParserTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssStyleSheetParserTest.java @@ -27,15 +27,14 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.css.CssStyleSheet; import com.itextpdf.styledxmlparser.css.parse.CssStyleSheetParser; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.FileInputStream; import java.io.IOException; -@Category(UnitTest.class) +@Tag("UnitTest") public class CssStyleSheetParserTest extends ExtendedITextTest { private static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CssStyleSheetParserTest/"; @@ -45,7 +44,7 @@ public class CssStyleSheetParserTest extends ExtendedITextTest { public void testDefaultCss() throws IOException { String cmpFile = sourceFolder + "cmp_default.css"; CssStyleSheet styleSheet = CssStyleSheetParser.parse(ResourceUtil.getResourceStream(DEFAULT_CSS_PATH)); - Assert.assertEquals(getCssFileContents(cmpFile), styleSheet.toString()); + Assertions.assertEquals(getCssFileContents(cmpFile), styleSheet.toString()); } private String getCssFileContents(String filePath) throws IOException { diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssStylesResolvingTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssStylesResolvingTest.java index 5a3c5adeb..691a8340a 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssStylesResolvingTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssStylesResolvingTest.java @@ -36,7 +36,6 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.node.impl.jsoup.JsoupHtmlParser; import com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.io.FileInputStream; import java.io.IOException; @@ -46,16 +45,16 @@ This file is part of the iText (R) project. import java.util.Set; import java.util.TreeSet; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class CssStylesResolvingTest extends ExtendedITextTest { private static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CssElementStylesResolvingTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { } @@ -311,12 +310,12 @@ private void test(String fileName, String elementPath, String... expectedStyles) IElementNode element = findElement(document, elementPath); if (element == null) { - Assert.fail(MessageFormatUtil.format("Element at path \"{0}\" was not found.", elementPath)); + Assertions.fail(MessageFormatUtil.format("Element at path \"{0}\" was not found.", elementPath)); } Map elementStyles = element.getStyles(); Set expectedStylesSet = new HashSet<>(Arrays.asList(expectedStyles)); Set actualStylesSet = stylesMapToHashSet(elementStyles); - Assert.assertTrue(getDifferencesMessage(expectedStylesSet, actualStylesSet), setsAreEqual(expectedStylesSet, actualStylesSet)); + Assertions.assertTrue(setsAreEqual(expectedStylesSet, actualStylesSet), getDifferencesMessage(expectedStylesSet, actualStylesSet)); } private IElementNode findElement(INode root, String ancestryPath) { diff --git a/src/test/java/com/itextpdf/html2pdf/css/CssTransformTest.java b/src/test/java/com/itextpdf/html2pdf/css/CssTransformTest.java index 957795943..82cc7c1d3 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/CssTransformTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/CssTransformTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssTransformTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/CssTransformTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/CssTransformTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java b/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java index 7047835cb..17ba42006 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/DeviceCmykTest.java @@ -30,15 +30,14 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.css.validate.impl.CssDeviceCmykAwareValidator; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class DeviceCmykTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css" @@ -46,13 +45,13 @@ public class DeviceCmykTest extends ExtendedHtmlConversionITextTest { private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css" + "/DeviceCmykTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); CssDeclarationValidationMaster.setValidator(new CssDeviceCmykAwareValidator()); } - @AfterClass + @AfterAll public static void after() { CssDeclarationValidationMaster.setValidator(new CssDefaultValidator()); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/DirectionTest.java b/src/test/java/com/itextpdf/html2pdf/css/DirectionTest.java index be53725fc..db84f9470 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/DirectionTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/DirectionTest.java @@ -32,21 +32,20 @@ This file is part of the iText (R) project. import com.itextpdf.test.LogLevelConstants; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class DirectionTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/DirectionTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/DirectionTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -57,20 +56,20 @@ public static void beforeClass() { LogLevelConstants.WARN) }) public void simpleLtrDocTest() throws IOException { - Assert.assertTrue(getTextFromDocument(convertToHtmlDocument("SimpleLtrDoc"), + Assertions.assertTrue(getTextFromDocument(convertToHtmlDocument("SimpleLtrDoc"), 1).contains("123456789.")); } @Test public void simpleLtrElementDocTest() throws IOException { - Assert.assertTrue(getTextFromDocument(convertToHtmlDocument("SimpleLtrElementDoc"), + Assertions.assertTrue(getTextFromDocument(convertToHtmlDocument("SimpleLtrElementDoc"), 1).contains("123456789.")); } //TODO DEVSIX-1920: RTL ignored. Change test after fix @Test public void simpleRtlElementDocTest() throws IOException { - Assert.assertFalse(getTextFromDocument(convertToHtmlDocument("SimpleRtlElementDoc"), + Assertions.assertFalse(getTextFromDocument(convertToHtmlDocument("SimpleRtlElementDoc"), 1).contains(".Right to left text")); } @@ -81,7 +80,7 @@ public void simpleRtlElementDocTest() throws IOException { LogLevelConstants.WARN) }) public void ltrInRtlDocTest() throws IOException { - Assert.assertFalse(getTextFromDocument(convertToHtmlDocument("LtrInRtlDoc"), + Assertions.assertFalse(getTextFromDocument(convertToHtmlDocument("LtrInRtlDoc"), 1).contains("!Right to left text")); } @@ -92,7 +91,7 @@ public void ltrInRtlDocTest() throws IOException { LogLevelConstants.WARN) }) public void rtlInLtrDocTest() throws IOException { - Assert.assertFalse(getTextFromDocument(convertToHtmlDocument("RtlInLtrDoc"), + Assertions.assertFalse(getTextFromDocument(convertToHtmlDocument("RtlInLtrDoc"), 1).contains("!Right to left text")); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/DisplayFlexTest.java b/src/test/java/com/itextpdf/html2pdf/css/DisplayFlexTest.java index 3413b2c4e..c4cdd3642 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/DisplayFlexTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/DisplayFlexTest.java @@ -39,29 +39,24 @@ This file is part of the iText (R) project. import com.itextpdf.layout.renderer.FlexContainerRenderer; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.FileInputStream; import java.io.IOException; import java.util.List; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; - -@Category(IntegrationTest.class) +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; + +@Tag("IntegrationTest") public class DisplayFlexTest extends ExtendedHtmlConversionITextTest { private static final float EPS = 1e-6f; private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/DisplayFlexTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/DisplayFlexTest/"; - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -72,9 +67,9 @@ public void displayFlexCommonTest() throws IOException { List elements = convertToElements(name); IElement flexContainer = elements.get(0); - Assert.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); + Assertions.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); List flexContainerChildren = ((Div) flexContainer).getChildren(); - Assert.assertEquals(11, flexContainerChildren.size()); + Assertions.assertEquals(11, flexContainerChildren.size()); IElement element0 = flexContainerChildren.get(0); assertDiv(element0, "block"); @@ -92,34 +87,34 @@ public void displayFlexCommonTest() throws IOException { assertDiv(element4, "span"); IElement element5 = flexContainerChildren.get(5); - Assert.assertTrue(element5 instanceof Image); + Assertions.assertTrue(element5 instanceof Image); IElement element6 = flexContainerChildren.get(6); - Assert.assertTrue(element6 instanceof Div); - Assert.assertEquals(1, ((Div) element6).getChildren().size()); - Assert.assertTrue(((Div) element6).getChildren().get(0) instanceof Paragraph); - Assert.assertEquals(3, ((Paragraph) ((Div) element6).getChildren().get(0)).getChildren().size()); - Assert.assertTrue(((Paragraph) ((Div) element6).getChildren().get(0)).getChildren().get(0) instanceof Text); - Assert.assertTrue(((Paragraph) ((Div) element6).getChildren().get(0)).getChildren().get(1) instanceof Text); - Assert.assertTrue(((Paragraph) ((Div) element6).getChildren().get(0)).getChildren().get(2) instanceof Text); - Assert.assertEquals("text with", + Assertions.assertTrue(element6 instanceof Div); + Assertions.assertEquals(1, ((Div) element6).getChildren().size()); + Assertions.assertTrue(((Div) element6).getChildren().get(0) instanceof Paragraph); + Assertions.assertEquals(3, ((Paragraph) ((Div) element6).getChildren().get(0)).getChildren().size()); + Assertions.assertTrue(((Paragraph) ((Div) element6).getChildren().get(0)).getChildren().get(0) instanceof Text); + Assertions.assertTrue(((Paragraph) ((Div) element6).getChildren().get(0)).getChildren().get(1) instanceof Text); + Assertions.assertTrue(((Paragraph) ((Div) element6).getChildren().get(0)).getChildren().get(2) instanceof Text); + Assertions.assertEquals("text with", ((Text) ((Paragraph) ((Div) element6).getChildren().get(0)).getChildren().get(0)).getText()); - Assert.assertEquals("\n", + Assertions.assertEquals("\n", ((Text) ((Paragraph) ((Div) element6).getChildren().get(0)).getChildren().get(1)).getText()); - Assert.assertEquals("br tag", + Assertions.assertEquals("br tag", ((Text) ((Paragraph) ((Div) element6).getChildren().get(0)).getChildren().get(2)).getText()); IElement element7 = flexContainerChildren.get(7); - Assert.assertTrue(element7 instanceof Image); + Assertions.assertTrue(element7 instanceof Image); IElement element8 = flexContainerChildren.get(8); assertDiv(element8, "div with page break"); IElement element9 = flexContainerChildren.get(9); - Assert.assertTrue(element9 instanceof HtmlPageBreak); + Assertions.assertTrue(element9 instanceof HtmlPageBreak); IElement element10 = flexContainerChildren.get(10); - Assert.assertTrue(element10 instanceof TextArea); + Assertions.assertTrue(element10 instanceof TextArea); } @Test @@ -135,15 +130,15 @@ public void nestedDivTest() throws IOException { } IElement flexContainer = elements.get(0); - Assert.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); - Assert.assertEquals(1, ((Div) flexContainer).getChildren().size()); + Assertions.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); + Assertions.assertEquals(1, ((Div) flexContainer).getChildren().size()); IElement element = ((Div) flexContainer).getChildren().get(0); - Assert.assertTrue(element instanceof Div); - Assert.assertEquals(3, ((Div) element).getChildren().size()); - Assert.assertTrue(((Div) element).getChildren().get(0) instanceof Paragraph); - Assert.assertTrue(((Div) element).getChildren().get(1) instanceof Div); - Assert.assertTrue(((Div) element).getChildren().get(2) instanceof Paragraph); + Assertions.assertTrue(element instanceof Div); + Assertions.assertEquals(3, ((Div) element).getChildren().size()); + Assertions.assertTrue(((Div) element).getChildren().get(0) instanceof Paragraph); + Assertions.assertTrue(((Div) element).getChildren().get(1) instanceof Div); + Assertions.assertTrue(((Div) element).getChildren().get(2) instanceof Paragraph); } @Test @@ -159,8 +154,8 @@ public void flexItemWhiteSpacePreTest() throws IOException { } IElement flexContainer = elements.get(0); - Assert.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); - Assert.assertEquals(1, ((Div) flexContainer).getChildren().size()); + Assertions.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); + Assertions.assertEquals(1, ((Div) flexContainer).getChildren().size()); IElement element = ((Div) flexContainer).getChildren().get(0); assertDiv(element, "\u200Dthe best world"); @@ -179,10 +174,10 @@ public void anonymousBlockInTheEndTest() throws IOException { } IElement flexContainer = elements.get(0); - Assert.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); - Assert.assertEquals(2, ((Div) flexContainer).getChildren().size()); + Assertions.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); + Assertions.assertEquals(2, ((Div) flexContainer).getChildren().size()); - Assert.assertTrue(((Div) flexContainer).getChildren().get(0) instanceof Div); + Assertions.assertTrue(((Div) flexContainer).getChildren().get(0) instanceof Div); IElement element = ((Div) flexContainer).getChildren().get(1); assertDiv(element, "anonymous block"); @@ -201,8 +196,8 @@ public void brTagTest() throws IOException { } IElement flexContainer = elements.get(0); - Assert.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); - Assert.assertEquals(1, ((Div) flexContainer).getChildren().size()); + Assertions.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); + Assertions.assertEquals(1, ((Div) flexContainer).getChildren().size()); IElement element = ((Div) flexContainer).getChildren().get(0); assertDiv(element, "hello"); } @@ -220,8 +215,8 @@ public void flexWrapTest() throws IOException { } IElement flexContainer = elements.get(0); - Assert.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); - Assert.assertTrue(flexContainer.hasProperty(Property.FLEX_WRAP)); + Assertions.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); + Assertions.assertTrue(flexContainer.hasProperty(Property.FLEX_WRAP)); } @Test @@ -238,9 +233,9 @@ public void overflowAtFlexContainerTest() throws IOException { } IElement flexContainer = elements.get(0); - Assert.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); - Assert.assertFalse(flexContainer.hasProperty(Property.OVERFLOW_X)); - Assert.assertFalse(flexContainer.hasProperty(Property.OVERFLOW_Y)); + Assertions.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); + Assertions.assertFalse(flexContainer.hasProperty(Property.OVERFLOW_X)); + Assertions.assertFalse(flexContainer.hasProperty(Property.OVERFLOW_Y)); } @Test @@ -256,8 +251,8 @@ public void collapsingMarginsAtFlexContainerTest() throws IOException { } IElement flexContainer = elements.get(0); - Assert.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); - Assert.assertTrue(flexContainer.hasProperty(Property.COLLAPSING_MARGINS)); + Assertions.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); + Assertions.assertTrue(flexContainer.hasProperty(Property.COLLAPSING_MARGINS)); } @Test @@ -273,11 +268,11 @@ public void overflowAtFlexItemTest() throws IOException { } IElement flexContainer = elements.get(0); - Assert.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); - Assert.assertEquals(1, ((Div) flexContainer).getChildren().size()); + Assertions.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); + Assertions.assertEquals(1, ((Div) flexContainer).getChildren().size()); - Assert.assertTrue(((Div) flexContainer).getChildren().get(0).hasProperty(Property.OVERFLOW_X)); - Assert.assertTrue(((Div) flexContainer).getChildren().get(0).hasProperty(Property.OVERFLOW_Y)); + Assertions.assertTrue(((Div) flexContainer).getChildren().get(0).hasProperty(Property.OVERFLOW_X)); + Assertions.assertTrue(((Div) flexContainer).getChildren().get(0).hasProperty(Property.OVERFLOW_Y)); } @Test @@ -293,29 +288,29 @@ public void displayFlexSpanContainerTest() throws IOException { } IElement flexContainer = elements.get(0); - Assert.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); + Assertions.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); } @Test //TODO DEVSIX-5087 remove this test when working on the ticket public void tempDisablePropertiesTest() throws IOException { List elements = convertToElements("tempDisableProperties"); - Assert.assertEquals(1, elements.size()); - Assert.assertTrue(elements.get(0).getRenderer() instanceof FlexContainerRenderer); + Assertions.assertEquals(1, elements.size()); + Assertions.assertTrue(elements.get(0).getRenderer() instanceof FlexContainerRenderer); - Assert.assertFalse(elements.get(0).hasProperty(Property.OVERFLOW_X)); - Assert.assertFalse(elements.get(0).hasProperty(Property.OVERFLOW_Y)); - Assert.assertFalse(elements.get(0).hasProperty(Property.FLOAT)); - Assert.assertFalse(elements.get(0).hasProperty(Property.CLEAR)); + Assertions.assertFalse(elements.get(0).hasProperty(Property.OVERFLOW_X)); + Assertions.assertFalse(elements.get(0).hasProperty(Property.OVERFLOW_Y)); + Assertions.assertFalse(elements.get(0).hasProperty(Property.FLOAT)); + Assertions.assertFalse(elements.get(0).hasProperty(Property.CLEAR)); } @Test public void disableFlexItemPropertiesTest() throws IOException { List elements = convertToElements("disableFlexItemProperties"); IElement flexItem = ((Div) elements.get(0)).getChildren().get(0); - Assert.assertFalse(flexItem.hasProperty(Property.FLOAT)); - Assert.assertFalse(flexItem.hasProperty(Property.CLEAR)); - Assert.assertFalse(flexItem.hasProperty(Property.VERTICAL_ALIGNMENT)); + Assertions.assertFalse(flexItem.hasProperty(Property.FLOAT)); + Assertions.assertFalse(flexItem.hasProperty(Property.CLEAR)); + Assertions.assertFalse(flexItem.hasProperty(Property.VERTICAL_ALIGNMENT)); } @Test @@ -331,14 +326,14 @@ public void flexItemPropertiesTest() throws IOException { } IElement flexContainer = elements.get(0); - Assert.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); - Assert.assertEquals(1, ((Div) flexContainer).getChildren().size()); + Assertions.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); + Assertions.assertEquals(1, ((Div) flexContainer).getChildren().size()); IElement flexItem = ((Div) flexContainer).getChildren().get(0); Float flexGrow = flexItem.getProperty(Property.FLEX_GROW); Float flexShrink = flexItem.getProperty(Property.FLEX_SHRINK); - Assert.assertEquals(2f, (float) flexGrow, EPS); - Assert.assertEquals(3f, (float) flexShrink, EPS); - Assert.assertEquals(UnitValue.createPointValue(200.338f), + Assertions.assertEquals(2f, (float) flexGrow, EPS); + Assertions.assertEquals(3f, (float) flexShrink, EPS); + Assertions.assertEquals(UnitValue.createPointValue(200.338f), flexItem.getProperty(Property.FLEX_BASIS)); } @@ -489,12 +484,12 @@ public void resolveStylesIfParentHasDisplayFlexStyleTest() throws IOException, I } private static void assertDiv(IElement element, String text) { - Assert.assertTrue(element instanceof Div); - Assert.assertEquals(1, ((Div) element).getChildren().size()); - Assert.assertTrue(((Div) element).getChildren().get(0) instanceof Paragraph); - Assert.assertEquals(1, ((Paragraph) ((Div) element).getChildren().get(0)).getChildren().size()); - Assert.assertTrue(((Paragraph) ((Div) element).getChildren().get(0)).getChildren().get(0) instanceof Text); - Assert.assertEquals(text, + Assertions.assertTrue(element instanceof Div); + Assertions.assertEquals(1, ((Div) element).getChildren().size()); + Assertions.assertTrue(((Div) element).getChildren().get(0) instanceof Paragraph); + Assertions.assertEquals(1, ((Paragraph) ((Div) element).getChildren().get(0)).getChildren().size()); + Assertions.assertTrue(((Paragraph) ((Div) element).getChildren().get(0)).getChildren().get(0) instanceof Text); + Assertions.assertEquals(text, ((Text) ((Paragraph) ((Div) element).getChildren().get(0)).getChildren().get(0)).getText()); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/DisplayTest.java b/src/test/java/com/itextpdf/html2pdf/css/DisplayTest.java index 021361dc6..2dd94b91a 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/DisplayTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/DisplayTest.java @@ -34,23 +34,22 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.FileInputStream; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class DisplayTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/DisplayTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/DisplayTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -74,7 +73,7 @@ public void displayTable02Test() throws IOException, InterruptedException { PdfDocument pdfDoc = new PdfDocument(new PdfWriter(DESTINATION_FOLDER + "display_table02.pdf")); pdfDoc.setDefaultPageSize(new PageSize(1500, 842)); HtmlConverter.convertToPdf(new FileInputStream(SOURCE_FOLDER + "display_table02.html"), pdfDoc); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "display_table02.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "display_table02.pdf", SOURCE_FOLDER + "cmp_display_table02.pdf", DESTINATION_FOLDER, "diff20_")); } @@ -348,7 +347,7 @@ public void inlineBlockInsideTableCellTest() throws IOException, InterruptedExce HtmlConverter.convertToPdf(new FileInputStream(SOURCE_FOLDER + "inlineBlockInsideTableCellTest.html"), pdfDocument, props); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "inlineBlockInsideTableCellTest.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "inlineBlockInsideTableCellTest.pdf", SOURCE_FOLDER + "cmp_inlineBlockInsideTableCell.pdf", DESTINATION_FOLDER, "diffinlineBlockInsideTableCellTest_")); diff --git a/src/test/java/com/itextpdf/html2pdf/css/FlexAlgoTest.java b/src/test/java/com/itextpdf/html2pdf/css/FlexAlgoTest.java index 0a970d0b8..f26584ec9 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FlexAlgoTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FlexAlgoTest.java @@ -23,14 +23,13 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FlexAlgoTest extends ExtendedHtmlConversionITextTest { private static boolean s = true; @@ -46,7 +45,7 @@ public class FlexAlgoTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/FlexAlgoTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/FlexAlgoTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FlexColumnReverseTest.java b/src/test/java/com/itextpdf/html2pdf/css/FlexColumnReverseTest.java index 0a8e1f915..420599b97 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FlexColumnReverseTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FlexColumnReverseTest.java @@ -23,21 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FlexColumnReverseTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/FlexColumnReverseTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/FlexColumnReverseTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FlexColumnTest.java b/src/test/java/com/itextpdf/html2pdf/css/FlexColumnTest.java index 4b43b5e0a..1435a9579 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FlexColumnTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FlexColumnTest.java @@ -23,21 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FlexColumnTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/FlexColumnTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/FlexColumnTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FlexIntrinsicAspectRatioTest.java b/src/test/java/com/itextpdf/html2pdf/css/FlexIntrinsicAspectRatioTest.java index d2ffe673c..d91eb90e8 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FlexIntrinsicAspectRatioTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FlexIntrinsicAspectRatioTest.java @@ -26,20 +26,19 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FlexIntrinsicAspectRatioTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/FlexIntrinsicAspectRatioTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/FlexIntrinsicAspectRatioTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FlexPagingTest.java b/src/test/java/com/itextpdf/html2pdf/css/FlexPagingTest.java index 3262acab7..3076322cc 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FlexPagingTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FlexPagingTest.java @@ -26,20 +26,19 @@ This file is part of the iText (R) project. import com.itextpdf.io.logs.IoLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FlexPagingTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/FlexPagingTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/FlexPagingTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FloatAndAlignmentTest.java b/src/test/java/com/itextpdf/html2pdf/css/FloatAndAlignmentTest.java index 5ec4b2fd1..40447eff8 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FloatAndAlignmentTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FloatAndAlignmentTest.java @@ -26,20 +26,19 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FloatAndAlignmentTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/FloatAndAlignmentTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/FloatAndAlignmentTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FloatAndFlexTest.java b/src/test/java/com/itextpdf/html2pdf/css/FloatAndFlexTest.java index ca307a38c..d257919e4 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FloatAndFlexTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FloatAndFlexTest.java @@ -28,22 +28,21 @@ This file is part of the iText (R) project. import com.itextpdf.layout.element.IElement; import com.itextpdf.layout.properties.Property; import com.itextpdf.layout.renderer.FlexContainerRenderer; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.FileInputStream; import java.io.IOException; import java.util.List; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FloatAndFlexTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/FloatAndFlexTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/FloatAndFlexTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -62,9 +61,9 @@ public void floatAtFlexContainerTest() throws IOException { } IElement flexContainer = elements.get(0); - Assert.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); - Assert.assertFalse(flexContainer.hasProperty(Property.FLOAT)); - Assert.assertFalse(flexContainer.hasProperty(Property.CLEAR)); + Assertions.assertTrue(flexContainer.getRenderer() instanceof FlexContainerRenderer); + Assertions.assertFalse(flexContainer.hasProperty(Property.FLOAT)); + Assertions.assertFalse(flexContainer.hasProperty(Property.CLEAR)); } @Test diff --git a/src/test/java/com/itextpdf/html2pdf/css/FloatTest.java b/src/test/java/com/itextpdf/html2pdf/css/FloatTest.java index e9cc213bb..fddb66b4a 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FloatTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FloatTest.java @@ -33,23 +33,22 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.css.media.MediaType; import com.itextpdf.styledxmlparser.css.util.CssDimensionParsingUtils; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.FileInputStream; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FloatTest extends ExtendedITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/FloatTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/FloatTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -732,7 +731,7 @@ public void responsiveIText() throws IOException, InterruptedException { String outName = "responsiveIText" + (pxWidth != null ? "_" + (int)(float)pxWidth : "") + ".pdf"; String cmpName = "cmp_" + outName; - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + outName, SOURCE_FOLDER + cmpName, + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + outName, SOURCE_FOLDER + cmpName, DESTINATION_FOLDER, "diffResponsive_")); } } @@ -749,7 +748,7 @@ public void splitFloatedListsTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new FileInputStream(htmlName), doc, new ConverterProperties().setBaseUri(SOURCE_FOLDER)); printPathToConsole(htmlName, "html: "); - Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, DESTINATION_FOLDER)); + Assertions.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, DESTINATION_FOLDER)); } @Test @@ -769,6 +768,6 @@ private void runTest(String testName, String diff) throws IOException, Interrupt String cmpFileName = SOURCE_FOLDER + "cmp_" + testName + ".pdf"; HtmlConverter.convertToPdf(new File(htmlName), new File(outFileName)); System.out.println("html: " + UrlUtil.getNormalizedFileUriString(htmlName) + "\n"); - Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, DESTINATION_FOLDER, diff)); + Assertions.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, DESTINATION_FOLDER, diff)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FontFaceTest.java b/src/test/java/com/itextpdf/html2pdf/css/FontFaceTest.java index 2e3d17b07..a4b103426 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FontFaceTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FontFaceTest.java @@ -37,23 +37,22 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FontFaceTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/FontFaceTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/FontFaceTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @@ -123,8 +122,8 @@ public void droidSerifLocalWithMediaRuleFontTest3() { } catch (Exception e) { exception = e.getMessage(); } - Assert.assertEquals("Font Provider with zero fonts shall fail", - Html2PdfException.FONT_PROVIDER_CONTAINS_ZERO_FONTS, exception); + Assertions.assertEquals(Html2PdfException.FONT_PROVIDER_CONTAINS_ZERO_FONTS, exception, + "Font Provider with zero fonts shall fail"); } @Test @@ -173,7 +172,7 @@ public void w3cProblemTest02() throws IOException, InterruptedException { return; } - Assert.fail("In w3c test suite this font is labeled as invalid, " + Assertions.fail("In w3c test suite this font is labeled as invalid, " + "so the invalid negative value is expected while creating a glyph."); } @@ -215,7 +214,7 @@ public void w3cProblemTest07() throws IOException, InterruptedException { return; } - Assert.fail("In w3c test suite this font is labeled as invalid, " + Assertions.fail("In w3c test suite this font is labeled as invalid, " + "so the invalid negative value is expected while creating a glyph."); } @@ -246,7 +245,7 @@ public void cannotProcessSpecifiedFontTest01() throws IOException, InterruptedEx } @Test - @Ignore("DEVSIX-1759") + @Disabled("DEVSIX-1759") public void fontFamilyTest01() throws IOException, InterruptedException { runTest("fontFamilyTest01"); } @@ -329,6 +328,12 @@ public void unusedFontWithUnicodeRangeTest() throws IOException, InterruptedExce runTest("unusedFontWithUnicodeRangeTest"); } + @Test + //TODO DEVSIX-2114: Support bolder / Lighter font weight + public void bolderAndLighterFontWeightTest() throws IOException, InterruptedException { + runTest("bolderLighterFontWeightTest"); + } + private void runTest(String name, FontProvider fontProvider) throws IOException, InterruptedException { String htmlPath = sourceFolder + name + ".html"; String pdfPath = destinationFolder + name + ".pdf"; @@ -340,8 +345,8 @@ private void runTest(String name, FontProvider fontProvider) throws IOException, .setMediaDeviceDescription(new MediaDeviceDescription(MediaType.PRINT)) .setFontProvider(fontProvider); HtmlConverter.convertToPdf(new File(htmlPath), new File(pdfPath), converterProperties); - Assert.assertFalse("Temporary font was found.", converterProperties.getFontProvider().getFontSet().contains("droid serif")); - Assert.assertNull(new CompareTool().compareByContent(pdfPath, cmpPdfPath, destinationFolder, diffPrefix)); + Assertions.assertFalse(converterProperties.getFontProvider().getFontSet().contains("droid serif"), "Temporary font was found."); + Assertions.assertNull(new CompareTool().compareByContent(pdfPath, cmpPdfPath, destinationFolder, diffPrefix)); } private void runTest(String name) throws IOException, InterruptedException { diff --git a/src/test/java/com/itextpdf/html2pdf/css/FontFamilyFallbackTest.java b/src/test/java/com/itextpdf/html2pdf/css/FontFamilyFallbackTest.java new file mode 100644 index 000000000..b502cb2e4 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/FontFamilyFallbackTest.java @@ -0,0 +1,113 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css; + +import com.itextpdf.html2pdf.ConverterProperties; +import com.itextpdf.html2pdf.HtmlConverter; +import com.itextpdf.io.font.FontProgram; +import com.itextpdf.io.font.FontProgramFactory; +import com.itextpdf.kernel.pdf.PdfDictionary; +import com.itextpdf.kernel.pdf.PdfDocument; +import com.itextpdf.kernel.pdf.PdfName; +import com.itextpdf.kernel.pdf.PdfReader; +import com.itextpdf.layout.font.FontProvider; +import com.itextpdf.test.ExtendedITextTest; + +import java.io.File; +import java.io.IOException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; + +@Tag("IntegrationTest") +public class FontFamilyFallbackTest extends ExtendedITextTest { + public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/FontFamilyFallbackTest/"; + public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/FontFamilyFallbackTest/"; + public static final String FONTSFOLDER = "./src/test/resources/com/itextpdf/html2pdf/fonts/"; + + + @BeforeAll + public static void beforeClass() { + createOrClearDestinationFolder(DESTINATION_FOLDER); + } + + @Test + public void noJapaneseGlyphsTest() throws IOException, InterruptedException { + String htmlPath = SOURCE_FOLDER + "glyphsNotFound.html"; + String pdfPath = DESTINATION_FOLDER + "glyphsNotFound.pdf"; + + FontProgram font = FontProgramFactory.createFont(FONTSFOLDER + + "Bokor-Regular.ttf"); + FontProgram backUpFont = FontProgramFactory.createFont(FONTSFOLDER + + "NotoSansJP-Bold.ttf"); + FontProvider dfp = new FontProvider(); + dfp.addFont(font); + dfp.addFont(backUpFont); + + ConverterProperties props = new ConverterProperties(); + props.setFontProvider(dfp); + HtmlConverter.convertToPdf(new File(htmlPath), new File(pdfPath), props); + + + String basefontName = ""; + int fontDictionarySize = 0; + try (PdfDocument resultPdf = new PdfDocument(new PdfReader(pdfPath))) { + PdfDictionary resources = resultPdf.getPage(1).getResources().getPdfObject(); + PdfDictionary fontDictionary = resources.getAsDictionary(PdfName.Font); + fontDictionarySize = fontDictionary.size(); + basefontName = fontDictionary.getAsDictionary(new PdfName("F1")) + .getAsName(PdfName.BaseFont).getValue(); + } + + Assertions.assertEquals(2, fontDictionarySize, "PDF contains a number of fonts different from expected."); + Assertions.assertTrue(basefontName.contains("NotoSansJP-Bold"), "Base font name is different from expected."); + } + + @Test + public void mixedEnglishJapaneseTest() throws IOException, InterruptedException { + String htmlPath = SOURCE_FOLDER + "mixedJapaneseEnglish.html"; + String pdfPath = DESTINATION_FOLDER + "mixedJapaneseEnglish.pdf"; + + FontProgram font = FontProgramFactory.createFont(FONTSFOLDER + + "Bokor-Regular.ttf"); + FontProgram backUpFont = FontProgramFactory.createFont(FONTSFOLDER + + "NotoSansJP-Bold.ttf"); + FontProvider dfp = new FontProvider(); + dfp.addFont(font); + dfp.addFont(backUpFont); + + ConverterProperties props = new ConverterProperties(); + props.setFontProvider(dfp); + HtmlConverter.convertToPdf(new File(htmlPath), new File(pdfPath), props); + + int fontDictionarySize = 0; + try (PdfDocument resultPdf = new PdfDocument(new PdfReader(pdfPath))) { + PdfDictionary resources = resultPdf.getPage(1).getResources().getPdfObject(); + PdfDictionary fontDictionary = resources.getAsDictionary(PdfName.Font); + fontDictionarySize = fontDictionary.size(); + } + + Assertions.assertEquals(2, fontDictionarySize, "PDF contains " + fontDictionarySize + " and not the expected 2."); + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/FontFamilyTest.java b/src/test/java/com/itextpdf/html2pdf/css/FontFamilyTest.java index 1732dfb39..df0824a5a 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FontFamilyTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FontFamilyTest.java @@ -23,23 +23,25 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.HtmlConverter; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FontFamilyTest extends ExtendedITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/FontFamilyTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/FontFamilyTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -50,6 +52,22 @@ public void hugeFontFamilyForDosAttackTest() throws IOException, InterruptedExce String cmpPdfPath = SOURCE_FOLDER + "cmp_hugeFontFamilyForDosAttackTest.pdf"; HtmlConverter.convertToPdf(new File(htmlPath), new File(pdfPath)); - Assert.assertNull(new CompareTool().compareByContent(pdfPath, cmpPdfPath, DESTINATION_FOLDER, "diff_")); + Assertions.assertNull(new CompareTool().compareByContent(pdfPath, cmpPdfPath, DESTINATION_FOLDER, "diff_")); + } + + @Test + @LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.UNABLE_TO_RETRIEVE_FONT, + count = 1) + }) + public void selectFontFromTTCTest() throws IOException, InterruptedException { + String htmlPath = SOURCE_FOLDER + "selectFontInGroup.html"; + String pdfPath = DESTINATION_FOLDER + "selectFontInGroup.pdf"; + String cmpPdfPath = SOURCE_FOLDER + "cmp_selectFontInGroup.pdf"; + + HtmlConverter.convertToPdf(new File(htmlPath), new File(pdfPath)); + //TODO DEVSIX-1104: Change cmp file after supporting ttc#id when selecting font from ttc + //Currently it will look for a font file where #{id} is part of the font path. + Assertions.assertNull(new CompareTool().compareByContent(pdfPath, cmpPdfPath, DESTINATION_FOLDER, "diff_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FontPropertyTest.java b/src/test/java/com/itextpdf/html2pdf/css/FontPropertyTest.java index 1c4dc946c..924a8d133 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FontPropertyTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FontPropertyTest.java @@ -23,19 +23,18 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FontPropertyTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/FontPropertyTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/FontPropertyTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FontRangeTest.java b/src/test/java/com/itextpdf/html2pdf/css/FontRangeTest.java new file mode 100644 index 000000000..d9b4d7ed4 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/FontRangeTest.java @@ -0,0 +1,83 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css; + +import com.itextpdf.html2pdf.ConverterProperties; +import com.itextpdf.html2pdf.HtmlConverter; +import com.itextpdf.html2pdf.resolver.font.DefaultFontProvider; +import com.itextpdf.io.font.FontProgram; +import com.itextpdf.io.font.FontProgramFactory; +import com.itextpdf.io.font.PdfEncodings; +import com.itextpdf.io.font.constants.StandardFonts; +import com.itextpdf.kernel.pdf.PdfDocument; +import com.itextpdf.kernel.pdf.PdfReader; +import com.itextpdf.kernel.pdf.PdfWriter; +import com.itextpdf.layout.font.FontProvider; +import com.itextpdf.layout.font.RangeBuilder; +import com.itextpdf.layout.font.selectorstrategy.BestMatchFontSelectorStrategy.BestMatchFontSelectorStrategyFactory; +import com.itextpdf.test.ExtendedITextTest; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; + +@Tag("IntegrationTest") +public class FontRangeTest extends ExtendedITextTest { + public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/FontRangeTest/"; + public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/FontRangeTest/"; + public static final String FONTS_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/fonts/"; + + @BeforeAll + public static void beforeClass() { + createOrClearDestinationFolder(DESTINATION_FOLDER); + } + + @Test + public void fontCharRangeTest() throws IOException { + char glyph = '\u00B6'; + String HTML = "Hello" + glyph + "World"; + String font = FONTS_FOLDER + "Bokor-Regular.ttf"; + String dest = DESTINATION_FOLDER + "fontRangeTest.pdf"; + + FontProvider fontProvider = new DefaultFontProvider(false, false, false); + FontProgram fontProgram = FontProgramFactory.createFont(font); + fontProvider.setFontSelectorStrategyFactory(new BestMatchFontSelectorStrategyFactory()); + fontProvider.addFont(fontProgram); + fontProvider.addFont(StandardFonts.HELVETICA, PdfEncodings.WINANSI, new RangeBuilder((int)glyph).create()); + + ConverterProperties properties = new ConverterProperties(); + properties.setFontProvider(fontProvider); + HtmlConverter.convertToPdf(HTML, new PdfWriter(dest),properties); + + PdfDocument pdfDocument = new PdfDocument(new PdfReader(dest)); + String contentStream = new String(pdfDocument.getPage(1).getFirstContentStream().getBytes(), StandardCharsets.UTF_8); + + //Currently we will find only one mention of our first font in the contentstream. + //Expected we would find it twice. /F1 for hello - /F2 for the glyph - /F1 again for world. + int count = contentStream.split("/F1").length -1; + Assertions.assertEquals(2, count, "The result does not find the expected number of occurrences."); + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/FontSelectorArialFontTest.java b/src/test/java/com/itextpdf/html2pdf/css/FontSelectorArialFontTest.java index 2377d8956..49be28c86 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FontSelectorArialFontTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FontSelectorArialFontTest.java @@ -30,24 +30,23 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription; import com.itextpdf.styledxmlparser.css.media.MediaType; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FontSelectorArialFontTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/FontSelectorArialFontTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/FontSelectorArialFontTest/"; public static final String SOURCE_HTML_NAME = "arialTest"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); createDestinationFolder(sourceFolder); @@ -79,6 +78,6 @@ private void runTest(String name, ConverterProperties converterProperties) throw String cmpPdfPath = sourceFolder + "cmp_" + name + ".pdf"; String diffPrefix = "diff_" + name + "_"; HtmlConverter.convertToPdf(new File(htmlPath), new File(pdfPath), converterProperties); - Assert.assertNull(new CompareTool().compareByContent(pdfPath, cmpPdfPath, destinationFolder, diffPrefix)); + Assertions.assertNull(new CompareTool().compareByContent(pdfPath, cmpPdfPath, destinationFolder, diffPrefix)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FontSelectorGenericFamiliesTest.java b/src/test/java/com/itextpdf/html2pdf/css/FontSelectorGenericFamiliesTest.java index 898b5076d..9dfc17228 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FontSelectorGenericFamiliesTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FontSelectorGenericFamiliesTest.java @@ -28,23 +28,22 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.layout.font.FontProvider; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") //TODO(DEVSIX-1034): serif, sans-serif font families are not supported //TODO(DEVSIX-1036): cursive, fantasy, system-ui font-families are not supported public class FontSelectorGenericFamiliesTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/FontSelectorGenericFamiliesTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/FontSelectorGenericFamiliesTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -65,6 +64,6 @@ public void runTest(String testName, FontProvider fontProvider) throws IOExcepti String srcHtml = sourceFolder + "genericFontFamilies.html"; ConverterProperties properties = new ConverterProperties().setFontProvider(fontProvider); HtmlConverter.convertToPdf(new File(srcHtml), new File(outPdf), properties); - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, "diff_" + testName + "_")); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, "diff_" + testName + "_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FontSelectorTimesFontTest.java b/src/test/java/com/itextpdf/html2pdf/css/FontSelectorTimesFontTest.java index 6477ac268..9eafede1c 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FontSelectorTimesFontTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FontSelectorTimesFontTest.java @@ -23,13 +23,12 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedFontPropertiesTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FontSelectorTimesFontTest extends ExtendedFontPropertiesTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/FontSelectorTimesFontTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/FontSelectorTimesFontTest/"; @@ -38,7 +37,7 @@ public class FontSelectorTimesFontTest extends ExtendedFontPropertiesTest { "500", "600", "700", "900"}; // TODO DEVSIX-2114 Add bolder/lighter font-weights once they are supported private static String[] FONT_STYLES = {"normal", "italic", "oblique"}; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FontSizeTest.java b/src/test/java/com/itextpdf/html2pdf/css/FontSizeTest.java index df81d3ae3..130971054 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/FontSizeTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/FontSizeTest.java @@ -26,21 +26,20 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.logs.StyledXmlParserLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FontSizeTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/FontSizeTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/FontSizeTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/FontStyleParameterizedTest.java b/src/test/java/com/itextpdf/html2pdf/css/FontStyleParameterizedTest.java new file mode 100644 index 000000000..636241974 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/FontStyleParameterizedTest.java @@ -0,0 +1,77 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css; + +import com.itextpdf.html2pdf.HtmlConverter; +import com.itextpdf.kernel.utils.CompareTool; +import com.itextpdf.test.ExtendedITextTest; +import com.itextpdf.test.annotations.type.IntegrationTest; + +import java.io.File; +import java.io.IOException; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.experimental.categories.Category; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +@RunWith(Parameterized.class) +@Category(IntegrationTest.class) +public class FontStyleParameterizedTest extends ExtendedITextTest { + public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/"; + public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/"; + private final String htmlName; + + @BeforeClass + public static void beforeClass() { + createDestinationFolder(DESTINATION_FOLDER); + } + + public FontStyleParameterizedTest(String htmlName) { + this.htmlName = htmlName; + } + + @Parameterized.Parameters(name = "{0}") + public static Iterable rotationRelatedProperties() { + return Arrays.asList(new Object[][]{ + {"fontWithSerifTest"}, + {"fontWithSansSerifTest"}, + {"monospaceFontTest"}, + {"cursiveFontTest"}, + {"fantasyFontTest"} + }); + } + + @Test + public void convertToPdfA4Test() throws IOException, InterruptedException { + String htmlPath = SOURCE_FOLDER + htmlName + ".html"; + String pdfPath = DESTINATION_FOLDER + htmlName + ".pdf"; + String cmpPdfPath = SOURCE_FOLDER + "cmp_" + htmlName + ".pdf"; + + HtmlConverter.convertToPdf(new File(htmlPath), new File(pdfPath)); + Assert.assertNull(new CompareTool().compareByContent(pdfPath, cmpPdfPath, DESTINATION_FOLDER, "diff_")); + + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/HeightTest.java b/src/test/java/com/itextpdf/html2pdf/css/HeightTest.java index a05e374dd..a88a49192 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/HeightTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/HeightTest.java @@ -26,22 +26,21 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HeightTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/HeightTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/HeightTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @@ -72,7 +71,7 @@ public void heightTest05() throws IOException, InterruptedException { } @Test - @Ignore("DEVSIX-1007") + @Disabled("DEVSIX-1007") public void heightTest06() throws IOException, InterruptedException { convertToPdfAndCompare("heightTest06", sourceFolder, destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/HorizontalAlignmentTest.java b/src/test/java/com/itextpdf/html2pdf/css/HorizontalAlignmentTest.java index 5f3b6b2ab..3c30bf959 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/HorizontalAlignmentTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/HorizontalAlignmentTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HorizontalAlignmentTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/HorizontalAlignment/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/HorizontalAlignment/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/HtmlCommentedTest.java b/src/test/java/com/itextpdf/html2pdf/css/HtmlCommentedTest.java index ff4c3c042..a3e8136e6 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/HtmlCommentedTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/HtmlCommentedTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HtmlCommentedTest extends ExtendedHtmlConversionITextTest{ public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/HtmlCommentedTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/HtmlCommentedTest/"; - @BeforeClass + @BeforeAll public static void initDestinationFolder() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/HyphenateTest.java b/src/test/java/com/itextpdf/html2pdf/css/HyphenateTest.java index 144a1ad7a..fbf278701 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/HyphenateTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/HyphenateTest.java @@ -25,22 +25,21 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HyphenateTest extends ExtendedITextTest { private static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/HyphenateTest/"; private static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/HyphenateTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -48,54 +47,54 @@ public static void beforeClass() { @Test public void test01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hyphenateTest01.html"), new File(destinationFolder + "hyphenateTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest01.pdf", sourceFolder + "cmp_hyphenateTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest01.pdf", sourceFolder + "cmp_hyphenateTest01.pdf", destinationFolder, "diff01_")); } @Test public void test02() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hyphenateTest02.html"), new File(destinationFolder + "hyphenateTest02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest02.pdf", sourceFolder + "cmp_hyphenateTest02.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest02.pdf", sourceFolder + "cmp_hyphenateTest02.pdf", destinationFolder, "diff01_")); } @Test public void test03() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hyphenateTest03.html"), new File(destinationFolder + "hyphenateTest03.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest03.pdf", sourceFolder + "cmp_hyphenateTest03.pdf", destinationFolder, "diff03_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest03.pdf", sourceFolder + "cmp_hyphenateTest03.pdf", destinationFolder, "diff03_")); } @Test public void test04() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hyphenateTest04.html"), new File(destinationFolder + "hyphenateTest04.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest04.pdf", sourceFolder + "cmp_hyphenateTest04.pdf", destinationFolder, "diff04_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest04.pdf", sourceFolder + "cmp_hyphenateTest04.pdf", destinationFolder, "diff04_")); } @Test public void test05() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hyphenateTest05.html"), new File(destinationFolder + "hyphenateTest05.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest05.pdf", sourceFolder + "cmp_hyphenateTest05.pdf", destinationFolder, "diff05_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest05.pdf", sourceFolder + "cmp_hyphenateTest05.pdf", destinationFolder, "diff05_")); } @Test public void test06() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hyphenateTest06.html"), new File(destinationFolder + "hyphenateTest06.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest06.pdf", sourceFolder + "cmp_hyphenateTest06.pdf", destinationFolder, "diff06_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest06.pdf", sourceFolder + "cmp_hyphenateTest06.pdf", destinationFolder, "diff06_")); } @Test public void test07Ru() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hyphenateTest07Ru.html"), new File(destinationFolder + "hyphenateTest07Ru.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest07Ru.pdf", sourceFolder + "cmp_hyphenateTest07Ru.pdf", destinationFolder, "diff07Ru_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest07Ru.pdf", sourceFolder + "cmp_hyphenateTest07Ru.pdf", destinationFolder, "diff07Ru_")); } @Test public void test08De() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hyphenateTest08De.html"), new File(destinationFolder + "hyphenateTest08De.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest08De.pdf", sourceFolder + "cmp_hyphenateTest08De.pdf", destinationFolder, "diff08De_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest08De.pdf", sourceFolder + "cmp_hyphenateTest08De.pdf", destinationFolder, "diff08De_")); } @Test public void test09NonBreakingHyphen() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hyphenateTest09NonBreakingHyphen.html"), new File(destinationFolder + "hyphenateTest09NonBreakingHyphen.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest09NonBreakingHyphen.pdf", sourceFolder + "cmp_hyphenateTest09NonBreakingHyphen.pdf", destinationFolder, "diff09NonBreakingHyphen_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hyphenateTest09NonBreakingHyphen.pdf", sourceFolder + "cmp_hyphenateTest09NonBreakingHyphen.pdf", destinationFolder, "diff09NonBreakingHyphen_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/ImagesDpiTest.java b/src/test/java/com/itextpdf/html2pdf/css/ImagesDpiTest.java index 30b58657b..ff9e7bc97 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/ImagesDpiTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/ImagesDpiTest.java @@ -25,21 +25,20 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ImagesDpiTest extends ExtendedITextTest { private static final String SRC = "./src/test/resources/com/itextpdf/html2pdf/css/ImagesDpiTest/"; private static final String DEST = "./target/test/com/itextpdf/html2pdf/css/ImagesDpiTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DEST); } @@ -72,7 +71,7 @@ public void imagesDpiFixedBlockSizeTest() throws IOException, InterruptedExcepti private void runTest(String testName) throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SRC + testName + ".html"), new File(DEST + testName + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(DEST + testName + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(DEST + testName + ".pdf", SRC + "cmp_" + testName + ".pdf", DEST)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/LineHeightTest.java b/src/test/java/com/itextpdf/html2pdf/css/LineHeightTest.java index dabe4a269..a17a7fdd5 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/LineHeightTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/LineHeightTest.java @@ -33,23 +33,22 @@ This file is part of the iText (R) project. import com.itextpdf.layout.font.FontProvider; import com.itextpdf.layout.properties.Leading; import com.itextpdf.layout.properties.Property; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.FileInputStream; import java.io.IOException; import java.util.List; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class LineHeightTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/LineHeightTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/LineHeightTest/"; private static final String RESOURCES = SOURCE_FOLDER + "fonts/"; - @BeforeClass + @BeforeAll public static void init() { createOrClearDestinationFolder(DESTINATION_FOLDER); initConverterProperties(); @@ -171,7 +170,7 @@ public void blockElementLineHeightTest() throws IOException, InterruptedExceptio @Test public void defaultLineHeightTest() { List elements = HtmlConverter.convertToElements("

Lorem Ipsum

"); - Assert.assertEquals(1.2f, elements.get(0).getProperty(Property.LEADING).getValue(), 1e-10); + Assertions.assertEquals(1.2f, elements.get(0).getProperty(Property.LEADING).getValue(), 1e-10); } @Test @@ -225,7 +224,7 @@ void testLineHeight(String name) throws IOException, InterruptedException { HtmlConverter.convertToPdf(fileInputStream, pdfDocument, converterProperties); } System.out.println("html: file://" + UrlUtil.toNormalizedURI(sourceHtml).getPath() + "\n"); - Assert.assertNull( + Assertions.assertNull( new CompareTool().compareByContent(destinationPdf, cmpPdf, DESTINATION_FOLDER, "diff_" + name + "_")); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/LinearGradientTest.java b/src/test/java/com/itextpdf/html2pdf/css/LinearGradientTest.java index 060557153..a5225caef 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/LinearGradientTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/LinearGradientTest.java @@ -28,23 +28,22 @@ This file is part of the iText (R) project. import com.itextpdf.test.LogLevelConstants; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class LinearGradientTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/LinearGradientTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/LinearGradientTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/ListCssTest.java b/src/test/java/com/itextpdf/html2pdf/css/ListCssTest.java index 71fbb9b82..0c9c9086b 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/ListCssTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/ListCssTest.java @@ -25,21 +25,20 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ListCssTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/ListCSSTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/ListCSSTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -47,7 +46,7 @@ public static void beforeClass() { @Test public void listCSSStartTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "orderedList.html"), new File(DESTINATION_FOLDER + "orderedList01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "orderedList01.pdf", SOURCE_FOLDER + "cmp_orderedList01.pdf", DESTINATION_FOLDER, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "orderedList01.pdf", SOURCE_FOLDER + "cmp_orderedList01.pdf", DESTINATION_FOLDER, "diff02_")); } @Test @@ -78,7 +77,7 @@ public void digitTypeTest() throws IOException, InterruptedException { //TODO: DEVSIX-6128 NullPointerException when trying to convert html with non-existing ol type. @Test public void unsupportedType() { - Assert.assertThrows(NullPointerException.class, + Assertions.assertThrows(NullPointerException.class, () -> convertToPdfAndCompare("unsupportedType", SOURCE_FOLDER, DESTINATION_FOLDER)); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/ListStyleImageLinearGradientTest.java b/src/test/java/com/itextpdf/html2pdf/css/ListStyleImageLinearGradientTest.java index a9f48b782..4d3ed2f9d 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/ListStyleImageLinearGradientTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/ListStyleImageLinearGradientTest.java @@ -28,22 +28,21 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ListStyleImageLinearGradientTest extends ExtendedITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/ListStyleImageLinearGradientTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/ListStyleImageLinearGradientTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -92,7 +91,7 @@ public void linearGradientDifferentFontSizeTest() throws IOException, Interrupte private void runTest(String testName) throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + testName + ".html"), new File(DESTINATION_FOLDER + testName + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + testName + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + testName + ".pdf", SOURCE_FOLDER + "cmp_" + testName + ".pdf", DESTINATION_FOLDER, "diff_" + testName)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/MarginTest.java b/src/test/java/com/itextpdf/html2pdf/css/MarginTest.java index 5a0f6cc61..1454f48a9 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/MarginTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/MarginTest.java @@ -26,20 +26,19 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class MarginTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/MarginTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/MarginTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/ObjectFitTest.java b/src/test/java/com/itextpdf/html2pdf/css/ObjectFitTest.java index d468aedf9..9f99b9cbd 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/ObjectFitTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/ObjectFitTest.java @@ -28,22 +28,21 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ObjectFitTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/ObjectFitTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/ObjectFitTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -51,7 +50,7 @@ public static void beforeClass() { @Test public void objectFitCasesTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "objectFit_test.html"), new File(destinationFolder + "objectFit_test.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "objectFit_test.pdf", sourceFolder + "cmp_objectFit_test.pdf", destinationFolder, "diff18_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "objectFit_test.pdf", sourceFolder + "cmp_objectFit_test.pdf", destinationFolder, "diff18_")); } @Test @@ -60,7 +59,7 @@ public void objectFitCasesTest() throws IOException, InterruptedException { public void objectFitUnexpectedValueTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "objectFit_test_unexpected.html"), new File(destinationFolder + "objectFit_test_unexpected.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "objectFit_test_unexpected.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "objectFit_test_unexpected.pdf", sourceFolder + "cmp_objectFit_test_unexpected.pdf", destinationFolder, "diff18_")); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/OpacityTest.java b/src/test/java/com/itextpdf/html2pdf/css/OpacityTest.java index 9c81ebfde..107163750 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/OpacityTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/OpacityTest.java @@ -23,19 +23,18 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class OpacityTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/OpacityTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/OpacityTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/OrphansTest.java b/src/test/java/com/itextpdf/html2pdf/css/OrphansTest.java index 15d488a37..3f6dc0ff5 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/OrphansTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/OrphansTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class OrphansTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/OrphansTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/OrphansTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/OrphansWidowsUnitTest.java b/src/test/java/com/itextpdf/html2pdf/css/OrphansWidowsUnitTest.java index 128e5066f..193bd7252 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/OrphansWidowsUnitTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/OrphansWidowsUnitTest.java @@ -39,16 +39,15 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.node.IElementNode; import com.itextpdf.styledxmlparser.node.IStylesContainer; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.io.FileInputStream; import java.io.IOException; import java.util.List; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class OrphansWidowsUnitTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/OrphansWidowsUnitTest/"; @@ -58,11 +57,11 @@ public void orphansDefaultValue() throws IOException { List elements = convertToElements("orphansDefaultValue"); Paragraph paragraph = (Paragraph) elements.get(0); - Assert.assertNotNull(paragraph); + Assertions.assertNotNull(paragraph); ParagraphOrphansControl orphansControl = paragraph.getProperty(Property.ORPHANS_CONTROL); - Assert.assertNotNull(orphansControl); - Assert.assertEquals(2, orphansControl.getMinOrphans()); + Assertions.assertNotNull(orphansControl); + Assertions.assertEquals(2, orphansControl.getMinOrphans()); } @Test @@ -70,11 +69,11 @@ public void orphansPropertyPresent() throws IOException { List elements = convertToElements("orphansPropertyPresent"); Paragraph paragraph = (Paragraph) elements.get(0); - Assert.assertNotNull(paragraph); + Assertions.assertNotNull(paragraph); ParagraphOrphansControl orphansControl = paragraph.getProperty(Property.ORPHANS_CONTROL); - Assert.assertNotNull(orphansControl); - Assert.assertEquals(3, orphansControl.getMinOrphans()); + Assertions.assertNotNull(orphansControl); + Assertions.assertEquals(3, orphansControl.getMinOrphans()); } @Test @@ -82,17 +81,17 @@ public void orphansPropertyInherited() throws IOException { List elements = convertToElements("orphansPropertyInherited"); Div div = (Div) elements.get(0); - Assert.assertNotNull(div); + Assertions.assertNotNull(div); ParagraphOrphansControl divOrphansControl = div.getProperty(Property.ORPHANS_CONTROL); - Assert.assertNotNull(divOrphansControl); - Assert.assertEquals(3, divOrphansControl.getMinOrphans()); + Assertions.assertNotNull(divOrphansControl); + Assertions.assertEquals(3, divOrphansControl.getMinOrphans()); Paragraph paragraph = (Paragraph) div.getChildren().get(0); - Assert.assertNotNull(paragraph); + Assertions.assertNotNull(paragraph); ParagraphOrphansControl paragraphOrphansControl = paragraph.getProperty(Property.ORPHANS_CONTROL); - Assert.assertNotNull(paragraphOrphansControl); - Assert.assertEquals(3, paragraphOrphansControl.getMinOrphans()); + Assertions.assertNotNull(paragraphOrphansControl); + Assertions.assertEquals(3, paragraphOrphansControl.getMinOrphans()); } @@ -101,24 +100,24 @@ public void orphansPropertyOneInheritedOneRedefined() throws IOException { List elements = convertToElements("orphansPropertyOneInheritedOneRedefined"); Div div = (Div) elements.get(0); - Assert.assertNotNull(div); + Assertions.assertNotNull(div); ParagraphOrphansControl divOrphansControl = div.getProperty(Property.ORPHANS_CONTROL); - Assert.assertNotNull(divOrphansControl); - Assert.assertEquals(3, divOrphansControl.getMinOrphans()); + Assertions.assertNotNull(divOrphansControl); + Assertions.assertEquals(3, divOrphansControl.getMinOrphans()); Paragraph paragraph = (Paragraph) div.getChildren().get(0); - Assert.assertNotNull(paragraph); + Assertions.assertNotNull(paragraph); ParagraphOrphansControl paragraphOrphansControl = paragraph.getProperty(Property.ORPHANS_CONTROL); - Assert.assertNotNull(paragraphOrphansControl); - Assert.assertEquals(3, paragraphOrphansControl.getMinOrphans()); + Assertions.assertNotNull(paragraphOrphansControl); + Assertions.assertEquals(3, paragraphOrphansControl.getMinOrphans()); Paragraph anotherParagraph = (Paragraph) div.getChildren().get(1); - Assert.assertNotNull(anotherParagraph); + Assertions.assertNotNull(anotherParagraph); ParagraphOrphansControl anotherParagraphOrphansControl = anotherParagraph.getProperty(Property.ORPHANS_CONTROL); - Assert.assertNotNull(anotherParagraphOrphansControl); - Assert.assertEquals(4, anotherParagraphOrphansControl.getMinOrphans()); + Assertions.assertNotNull(anotherParagraphOrphansControl); + Assertions.assertEquals(4, anotherParagraphOrphansControl.getMinOrphans()); } @@ -127,11 +126,11 @@ public void widowsDefaultValue() throws IOException { List elements = convertToElements("widowsDefaultValue"); Paragraph paragraph = (Paragraph) elements.get(0); - Assert.assertNotNull(paragraph); + Assertions.assertNotNull(paragraph); ParagraphWidowsControl widowsControl = paragraph.getProperty(Property.WIDOWS_CONTROL); - Assert.assertNotNull(widowsControl); - Assert.assertEquals(2, widowsControl.getMinWidows()); + Assertions.assertNotNull(widowsControl); + Assertions.assertEquals(2, widowsControl.getMinWidows()); } @Test @@ -139,11 +138,11 @@ public void widowsPropertyPresent() throws IOException { List elements = convertToElements("widowsPropertyPresent"); Paragraph paragraph = (Paragraph) elements.get(0); - Assert.assertNotNull(paragraph); + Assertions.assertNotNull(paragraph); ParagraphWidowsControl widowsControl = paragraph.getProperty(Property.WIDOWS_CONTROL); - Assert.assertNotNull(widowsControl); - Assert.assertEquals(3, widowsControl.getMinWidows()); + Assertions.assertNotNull(widowsControl); + Assertions.assertEquals(3, widowsControl.getMinWidows()); } @Test @@ -151,17 +150,17 @@ public void widowsPropertyInherited() throws IOException { List elements = convertToElements("widowsPropertyInherited"); Div div = (Div) elements.get(0); - Assert.assertNotNull(div); + Assertions.assertNotNull(div); ParagraphWidowsControl divWidowsControl = div.getProperty(Property.WIDOWS_CONTROL); - Assert.assertNotNull(divWidowsControl); - Assert.assertEquals(3, divWidowsControl.getMinWidows()); + Assertions.assertNotNull(divWidowsControl); + Assertions.assertEquals(3, divWidowsControl.getMinWidows()); Paragraph paragraph = (Paragraph) div.getChildren().get(0); - Assert.assertNotNull(paragraph); + Assertions.assertNotNull(paragraph); ParagraphWidowsControl paragraphWidowsControl = paragraph.getProperty(Property.WIDOWS_CONTROL); - Assert.assertNotNull(paragraphWidowsControl); - Assert.assertEquals(3, paragraphWidowsControl.getMinWidows()); + Assertions.assertNotNull(paragraphWidowsControl); + Assertions.assertEquals(3, paragraphWidowsControl.getMinWidows()); } @Test @@ -169,24 +168,24 @@ public void widowsPropertyOneInheritedOneRedefined() throws IOException { List elements = convertToElements("widowsPropertyOneInheritedOneRedefined"); Div div = (Div) elements.get(0); - Assert.assertNotNull(div); + Assertions.assertNotNull(div); ParagraphWidowsControl divWidowsControl = div.getProperty(Property.WIDOWS_CONTROL); - Assert.assertNotNull(divWidowsControl); - Assert.assertEquals(3, divWidowsControl.getMinWidows()); + Assertions.assertNotNull(divWidowsControl); + Assertions.assertEquals(3, divWidowsControl.getMinWidows()); Paragraph paragraph = (Paragraph) div.getChildren().get(0); - Assert.assertNotNull(paragraph); + Assertions.assertNotNull(paragraph); ParagraphWidowsControl paragraphWidowsControl = paragraph.getProperty(Property.WIDOWS_CONTROL); - Assert.assertNotNull(paragraphWidowsControl); - Assert.assertEquals(3, paragraphWidowsControl.getMinWidows()); + Assertions.assertNotNull(paragraphWidowsControl); + Assertions.assertEquals(3, paragraphWidowsControl.getMinWidows()); Paragraph anotherParagraph = (Paragraph) div.getChildren().get(1); - Assert.assertNotNull(anotherParagraph); + Assertions.assertNotNull(anotherParagraph); ParagraphWidowsControl anotherParagraphWidowsControl = anotherParagraph.getProperty(Property.WIDOWS_CONTROL); - Assert.assertNotNull(anotherParagraphWidowsControl); - Assert.assertEquals(4, anotherParagraphWidowsControl.getMinWidows()); + Assertions.assertNotNull(anotherParagraphWidowsControl); + Assertions.assertEquals(4, anotherParagraphWidowsControl.getMinWidows()); } @Test @@ -194,40 +193,40 @@ public void orphansWidowsParallelInheritance() throws IOException { List elements = convertToElements("orphansWidowsParallelInheritance"); Div level1Div = (Div) elements.get(0); - Assert.assertNotNull(level1Div); + Assertions.assertNotNull(level1Div); ParagraphOrphansControl level1DivOrphansControl = level1Div.getProperty(Property.ORPHANS_CONTROL); - Assert.assertNotNull(level1DivOrphansControl); - Assert.assertEquals(3, level1DivOrphansControl.getMinOrphans()); + Assertions.assertNotNull(level1DivOrphansControl); + Assertions.assertEquals(3, level1DivOrphansControl.getMinOrphans()); ParagraphWidowsControl level1DivWidowsControl = level1Div.getProperty(Property.WIDOWS_CONTROL); - Assert.assertNull(level1DivWidowsControl); + Assertions.assertNull(level1DivWidowsControl); Div level2Div = (Div) level1Div.getChildren().get(0); - Assert.assertNotNull(level2Div); + Assertions.assertNotNull(level2Div); ParagraphOrphansControl level2DivOrphansControl = level2Div.getProperty(Property.ORPHANS_CONTROL); - Assert.assertNotNull(level2DivOrphansControl); - Assert.assertEquals(3, level2DivOrphansControl.getMinOrphans()); + Assertions.assertNotNull(level2DivOrphansControl); + Assertions.assertEquals(3, level2DivOrphansControl.getMinOrphans()); ParagraphWidowsControl level2DivWidowsControl = level2Div.getProperty(Property.WIDOWS_CONTROL); - Assert.assertNotNull(level2DivWidowsControl); - Assert.assertEquals(5, level2DivWidowsControl.getMinWidows()); + Assertions.assertNotNull(level2DivWidowsControl); + Assertions.assertEquals(5, level2DivWidowsControl.getMinWidows()); Paragraph paragraph1 = (Paragraph) level2Div.getChildren().get(0); - Assert.assertNotNull(paragraph1); + Assertions.assertNotNull(paragraph1); ParagraphOrphansControl paragraph1OrphansControl = paragraph1.getProperty(Property.ORPHANS_CONTROL); - Assert.assertNotNull(paragraph1OrphansControl); - Assert.assertEquals(3, paragraph1OrphansControl.getMinOrphans()); + Assertions.assertNotNull(paragraph1OrphansControl); + Assertions.assertEquals(3, paragraph1OrphansControl.getMinOrphans()); ParagraphWidowsControl paragraph1WidowsControl = paragraph1.getProperty(Property.WIDOWS_CONTROL); - Assert.assertNotNull(paragraph1WidowsControl); - Assert.assertEquals(5, paragraph1WidowsControl.getMinWidows()); + Assertions.assertNotNull(paragraph1WidowsControl); + Assertions.assertEquals(5, paragraph1WidowsControl.getMinWidows()); Paragraph paragraph2 = (Paragraph) level2Div.getChildren().get(1); - Assert.assertNotNull(paragraph2); + Assertions.assertNotNull(paragraph2); ParagraphOrphansControl paragraph2OrphansControl = paragraph2.getProperty(Property.ORPHANS_CONTROL); - Assert.assertNotNull(paragraph2OrphansControl); - Assert.assertEquals(4, paragraph2OrphansControl.getMinOrphans()); + Assertions.assertNotNull(paragraph2OrphansControl); + Assertions.assertEquals(4, paragraph2OrphansControl.getMinOrphans()); ParagraphWidowsControl paragraph2WidowsControl = paragraph2.getProperty(Property.WIDOWS_CONTROL); - Assert.assertNotNull(paragraph2WidowsControl); - Assert.assertEquals(5, paragraph2WidowsControl.getMinWidows()); + Assertions.assertNotNull(paragraph2WidowsControl); + Assertions.assertEquals(5, paragraph2WidowsControl.getMinWidows()); } @Test @@ -240,15 +239,15 @@ public void alterOrphansWidowsTest() throws IOException { List elements = HtmlConverter.convertToElements(new FileInputStream(sourceFolder + "orphansWidows.html"), converterProperties); Div div = (Div) elements.get(0); - Assert.assertNotNull(div); + Assertions.assertNotNull(div); Paragraph paragraph = (Paragraph) div.getChildren().get(0); - Assert.assertNotNull(paragraph); + Assertions.assertNotNull(paragraph); ParagraphWidowsControl paragraphWidowsControl = paragraph.getProperty(Property.WIDOWS_CONTROL); - Assert.assertNotNull(paragraphWidowsControl); - Assert.assertEquals(3, paragraphWidowsControl.getMaxLinesToMove()); - Assert.assertTrue(paragraphWidowsControl.isOverflowOnWidowsViolation()); + Assertions.assertNotNull(paragraphWidowsControl); + Assertions.assertEquals(3, paragraphWidowsControl.getMaxLinesToMove()); + Assertions.assertTrue(paragraphWidowsControl.isOverflowOnWidowsViolation()); } private List convertToElements(String name) throws IOException { diff --git a/src/test/java/com/itextpdf/html2pdf/css/OverflowTest.java b/src/test/java/com/itextpdf/html2pdf/css/OverflowTest.java index 49dcd4a2f..67a67b7df 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/OverflowTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/OverflowTest.java @@ -30,22 +30,21 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.pdf.PdfDocument; import com.itextpdf.kernel.pdf.PdfWriter; import com.itextpdf.kernel.utils.CompareTool; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.FileInputStream; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class OverflowTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/OverflowTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/OverflowTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -155,7 +154,7 @@ private void runTest(String testName, PageSize pageSize) throws IOException, Int HtmlConverter.convertToPdf(new FileInputStream(SOURCE_FOLDER + testName + ".html"), pdfDocument, new ConverterProperties().setBaseUri(SOURCE_FOLDER)); System.out.println("html: " + UrlUtil.getNormalizedFileUriString(SOURCE_FOLDER + testName + ".html") + "\n"); - Assert.assertNull(new CompareTool() + Assertions.assertNull(new CompareTool() .compareByContent(DESTINATION_FOLDER + testName + ".pdf", SOURCE_FOLDER + "cmp_" + testName + ".pdf", DESTINATION_FOLDER, "diff_" + testName)); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/OverflowWrapTest.java b/src/test/java/com/itextpdf/html2pdf/css/OverflowWrapTest.java index 5606b8a04..0f55541d8 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/OverflowWrapTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/OverflowWrapTest.java @@ -34,25 +34,24 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.List; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class OverflowWrapTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/OverflowWrapTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/OverflowWrapTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -61,7 +60,7 @@ public static void beforeClass() { public void overflowWrapColoredBackgroundTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "overflowWrapColoredBackground.html"), new File(destinationFolder + "overflowWrapColoredBackground.pdf")); - Assert.assertNull(new CompareTool() + Assertions.assertNull(new CompareTool() .compareByContent(destinationFolder + "overflowWrapColoredBackground.pdf", sourceFolder + "cmp_overflowWrapColoredBackground.pdf", destinationFolder)); } @@ -70,7 +69,7 @@ public void overflowWrapColoredBackgroundTest() throws IOException, InterruptedE public void overflowXOverflowWrapTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "overflowXOverflowWrap.html"), new File(destinationFolder + "overflowXOverflowWrap.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "overflowXOverflowWrap.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "overflowXOverflowWrap.pdf", sourceFolder + "cmp_overflowXOverflowWrap.pdf", destinationFolder)); } @@ -78,7 +77,7 @@ public void overflowXOverflowWrapTest() throws IOException, InterruptedException public void whiteSpaceAndOverflowWrapTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "whiteSpaceAndOverflowWrap.html"), new File(destinationFolder + "whiteSpaceAndOverflowWrap.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "whiteSpaceAndOverflowWrap.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "whiteSpaceAndOverflowWrap.pdf", sourceFolder + "cmp_whiteSpaceAndOverflowWrap.pdf", destinationFolder)); } @@ -86,7 +85,7 @@ public void whiteSpaceAndOverflowWrapTest() throws IOException, InterruptedExcep public void whiteSpaceOnParentAndOverflowWrapOnChildTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "whiteSpaceOnParentAndOverflowWrapOnChildTest.html"), new File(destinationFolder + "whiteSpaceOnParentAndOverflowWrapOnChildTest.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "whiteSpaceOnParentAndOverflowWrapOnChildTest.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "whiteSpaceOnParentAndOverflowWrapOnChildTest.pdf", sourceFolder + "cmp_whiteSpaceOnParentAndOverflowWrapOnChildTest.pdf", destinationFolder)); } @@ -95,7 +94,7 @@ public void whiteSpaceOnParentAndOverflowWrapOnChildTest() throws IOException, I public void overflowWrapAndFloatTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "overflowWrapAndFloat.html"), new File(destinationFolder + "overflowWrapAndFloat.pdf")); - Assert.assertNull(new CompareTool() + Assertions.assertNull(new CompareTool() .compareByContent(destinationFolder + "overflowWrapAndFloat.pdf", sourceFolder + "cmp_overflowWrapAndFloat.pdf", destinationFolder)); } @@ -106,7 +105,7 @@ public void overflowWrapAndFloatTest() throws IOException, InterruptedException public void overflowWrapTableScenarioTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "overflowWrapTableScenario.html"), new File(destinationFolder + "overflowWrapTableScenario.pdf")); - Assert.assertNull(new CompareTool() + Assertions.assertNull(new CompareTool() .compareByContent(destinationFolder + "overflowWrapTableScenario.pdf", sourceFolder + "cmp_overflowWrapTableScenario.pdf", destinationFolder)); } @@ -115,7 +114,7 @@ public void overflowWrapTableScenarioTest() throws IOException, InterruptedExcep public void overflowWrapWordWrapInheritance() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "overflowWrapWordWrapInheritance.html"), new File(destinationFolder + "overflowWrapWordWrapInheritance.pdf")); - Assert.assertNull(new CompareTool() + Assertions.assertNull(new CompareTool() .compareByContent(destinationFolder + "overflowWrapWordWrapInheritance.pdf", sourceFolder + "cmp_overflowWrapWordWrapInheritance.pdf", destinationFolder)); } @@ -128,12 +127,12 @@ public void chosenOverflowWrapValue01() throws IOException { List elements = convertToElements("chosenOverflowWrapValue01"); Paragraph paragraph = (Paragraph) elements.get(0); - Assert.assertNotNull(paragraph); + Assertions.assertNotNull(paragraph); OverflowWrapPropertyValue overflowWrapPropertyValue = paragraph .getProperty(Property.OVERFLOW_WRAP); - Assert.assertNotNull(overflowWrapPropertyValue); - Assert.assertEquals(OverflowWrapPropertyValue.BREAK_WORD, overflowWrapPropertyValue); + Assertions.assertNotNull(overflowWrapPropertyValue); + Assertions.assertEquals(OverflowWrapPropertyValue.BREAK_WORD, overflowWrapPropertyValue); } @Test @@ -144,12 +143,12 @@ public void chosenOverflowWrapValue02() throws IOException { List elements = convertToElements("chosenOverflowWrapValue02"); Paragraph paragraph = (Paragraph) elements.get(0); - Assert.assertNotNull(paragraph); + Assertions.assertNotNull(paragraph); OverflowWrapPropertyValue overflowWrapPropertyValue = paragraph .getProperty(Property.OVERFLOW_WRAP); - Assert.assertNotNull(overflowWrapPropertyValue); - Assert.assertEquals(OverflowWrapPropertyValue.NORMAL, overflowWrapPropertyValue); + Assertions.assertNotNull(overflowWrapPropertyValue); + Assertions.assertEquals(OverflowWrapPropertyValue.NORMAL, overflowWrapPropertyValue); } @Test @@ -157,12 +156,12 @@ public void chosenOverflowWrapValue03() throws IOException { List elements = convertToElements("chosenOverflowWrapValue03"); Paragraph paragraph = (Paragraph) elements.get(0); - Assert.assertNotNull(paragraph); + Assertions.assertNotNull(paragraph); OverflowWrapPropertyValue overflowWrapPropertyValue = paragraph .getProperty(Property.OVERFLOW_WRAP); - Assert.assertNotNull(overflowWrapPropertyValue); - Assert.assertEquals(OverflowWrapPropertyValue.NORMAL, overflowWrapPropertyValue); + Assertions.assertNotNull(overflowWrapPropertyValue); + Assertions.assertEquals(OverflowWrapPropertyValue.NORMAL, overflowWrapPropertyValue); } @Test @@ -170,18 +169,18 @@ public void chosenOverflowWrapValueUnset01() throws IOException { List elements = convertToElements("chosenOverflowWrapValueUnset01"); Paragraph paragraph = (Paragraph) elements.get(0); - Assert.assertEquals(OverflowWrapPropertyValue.BREAK_WORD, + Assertions.assertEquals(OverflowWrapPropertyValue.BREAK_WORD, paragraph.getProperty(Property.OVERFLOW_WRAP)); Div divAndNestedParagraph = (Div) elements.get(1); - Assert.assertEquals(OverflowWrapPropertyValue.ANYWHERE, + Assertions.assertEquals(OverflowWrapPropertyValue.ANYWHERE, divAndNestedParagraph.getProperty(Property.OVERFLOW_WRAP)); paragraph = (Paragraph) divAndNestedParagraph.getChildren().get(0); - Assert.assertNull(paragraph.getProperty(Property.OVERFLOW_WRAP)); + Assertions.assertNull(paragraph.getProperty(Property.OVERFLOW_WRAP)); // todo DEVSIX-4723 replace assertNull above with the commented lines below -// Assert.assertEquals(OverflowWrapPropertyValue.ANYWHERE, +// Assertions.assertEquals(OverflowWrapPropertyValue.ANYWHERE, // paragraph.getProperty(Property.OVERFLOW_WRAP)); } @@ -190,7 +189,7 @@ public void chosenOverflowWrapValueUnset02() throws IOException { List elements = convertToElements("chosenOverflowWrapValueUnset02"); Paragraph paragraph = (Paragraph) elements.get(0); - Assert.assertEquals(OverflowWrapPropertyValue.NORMAL, + Assertions.assertEquals(OverflowWrapPropertyValue.NORMAL, paragraph.getProperty(Property.OVERFLOW_WRAP)); } @@ -202,23 +201,23 @@ public void overflowWrapWordWrapInheritanceAndInvalidValues() throws IOException List elements = convertToElements("overflowWrapWordWrapInheritanceAndInvalidValues"); Div div = (Div) elements.get(0); - Assert.assertEquals(OverflowWrapPropertyValue.ANYWHERE, + Assertions.assertEquals(OverflowWrapPropertyValue.ANYWHERE, div.getProperty(Property.OVERFLOW_WRAP)); List children = div.getChildren(); - Assert.assertEquals(2, children.size()); + Assertions.assertEquals(2, children.size()); Paragraph firstChild = (Paragraph) children.get(0); - Assert.assertNull(firstChild.getProperty(Property.OVERFLOW_WRAP)); + Assertions.assertNull(firstChild.getProperty(Property.OVERFLOW_WRAP)); Paragraph secondChild = (Paragraph) children.get(1); - Assert.assertEquals(OverflowWrapPropertyValue.BREAK_WORD, + Assertions.assertEquals(OverflowWrapPropertyValue.BREAK_WORD, secondChild.getProperty(Property.OVERFLOW_WRAP)); List innerChildren = secondChild.getChildren(); - Assert.assertEquals(2, children.size()); + Assertions.assertEquals(2, children.size()); Text innerChild = (Text) innerChildren.get(1); - Assert.assertEquals(OverflowWrapPropertyValue.BREAK_WORD, + Assertions.assertEquals(OverflowWrapPropertyValue.BREAK_WORD, innerChild.getProperty(Property.OVERFLOW_WRAP)); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/PaddingTest.java b/src/test/java/com/itextpdf/html2pdf/css/PaddingTest.java index 2f4ffa208..80754de8f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/PaddingTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/PaddingTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class PaddingTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/PaddingTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/PaddingTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/PageBreakTest.java b/src/test/java/com/itextpdf/html2pdf/css/PageBreakTest.java index 0e62a9cca..78be96735 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/PageBreakTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/PageBreakTest.java @@ -38,37 +38,31 @@ This file is part of the iText (R) project. import com.itextpdf.test.annotations.LogMessages; import com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription; import com.itextpdf.styledxmlparser.css.media.MediaType; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.FileInputStream; import java.util.List; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class PageBreakTest extends ExtendedHtmlConversionITextTest { - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); //Member of testing class. Add if it isn't there. - public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/PageBreakTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/PageBreakTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @Test - @Ignore("DEVSIX-4521: test currently results in endless loop") + @Disabled("DEVSIX-4521: test currently results in endless loop") public void breakInsideAndBreakAfterTest() throws IOException, InterruptedException { runTest("breakInsideAndBreakAfter"); } @@ -192,9 +186,8 @@ public void pageBreakAlwaysInsidePageBreakAvoidTest() @Test @LogMessages(messages = {@LogMessage(messageTemplate = IoLogMessageConstant.CLIP_ELEMENT)}) /* Test will fail after fix in DEVSIX-2024 */ - public void pageBreakInConstrainedDivTest() throws IOException, InterruptedException { - junitExpectedException.expect(UnsupportedOperationException.class); - runTest("pageBreakInConstrainedDivTest"); + public void pageBreakInConstrainedDivTest() { + Assertions.assertThrows(UnsupportedOperationException.class, () -> runTest("pageBreakInConstrainedDivTest")); } @Test @@ -249,7 +242,7 @@ private void runTest(String name) throws IOException, InterruptedException { String diffPrefix = "diff_" + name + "_"; HtmlConverter.convertToPdf(new File(htmlPath), new File(pdfPath), new ConverterProperties().setMediaDeviceDescription(new MediaDeviceDescription(MediaType.PRINT))); - Assert.assertNull(new CompareTool().compareByContent(pdfPath, cmpPdfPath, destinationFolder, diffPrefix)); + Assertions.assertNull(new CompareTool().compareByContent(pdfPath, cmpPdfPath, destinationFolder, diffPrefix)); } private void convertToElements(String name) throws IOException, InterruptedException { @@ -268,7 +261,7 @@ private void convertToElements(String name) throws IOException, InterruptedExcep } } - Assert.assertNull(new CompareTool().compareByContent(output, cmp, destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(output, cmp, destinationFolder)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/PageRuleTest.java b/src/test/java/com/itextpdf/html2pdf/css/PageRuleTest.java index 4b50a571f..eac6aabbf 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/PageRuleTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/PageRuleTest.java @@ -55,7 +55,6 @@ This file is part of the iText (R) project. import com.itextpdf.test.LogLevelConstants; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.FileInputStream; @@ -66,26 +65,21 @@ This file is part of the iText (R) project. import org.xml.sax.SAXException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class PageRuleTest extends ExtendedITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/PageRuleTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/PageRuleTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); - @Test public void marksCropCrossPageRuleTest() { runTest("marksCropCrossPageRuleTest"); @@ -625,7 +619,7 @@ public void marginBoxRunningNoImmediateFlush03() throws IOException, Interrupted doc.getRenderer().close(); int pagesNum = doc.getPdfDocument().getNumberOfPages(); - Assert.assertTrue(pagesNum > 1); + Assertions.assertTrue(pagesNum > 1); int k = 1; for (int i = pagesNum; i > 0 ; --i) { doc.getPdfDocument().movePage(pagesNum, k++); @@ -687,50 +681,49 @@ public void marginBoxMultilineTest04() { @Test public void wrongPageRuleCssStructureTest() { - junitExpectedException.expect(RuntimeException.class); - runTest("wrongPageRuleCssStructureTest"); + Assertions.assertThrows(RuntimeException.class, () -> runTest("wrongPageRuleCssStructureTest")); } @Test //TODO: DEVSIX-1570, SUP-2322. Remove junitExpectedException after the fix. public void pageCountTestTableAlignLeft() throws IOException { - junitExpectedException.expect(AssertionError.class); - - String expectedText = "Page 1 of 3"; - String nameAlignLeft = "htmlWithTableAlignLeft.html"; - String pdfOutputName = DESTINATION_FOLDER + nameAlignLeft + ".pdf"; + Assertions.assertThrows(AssertionError.class, () -> { + String expectedText = "Page 1 of 3"; + String nameAlignLeft = "htmlWithTableAlignLeft.html"; + String pdfOutputName = DESTINATION_FOLDER + nameAlignLeft + ".pdf"; - File pdfOutputAlignLeft = new File(pdfOutputName); - HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + nameAlignLeft), pdfOutputAlignLeft); + File pdfOutputAlignLeft = new File(pdfOutputName); + HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + nameAlignLeft), pdfOutputAlignLeft); - PdfDocument pdfDocument = new PdfDocument(new PdfReader(pdfOutputAlignLeft)); - String textFromPage = PdfTextExtractor.getTextFromPage(pdfDocument.getPage(1)); + PdfDocument pdfDocument = new PdfDocument(new PdfReader(pdfOutputAlignLeft)); + String textFromPage = PdfTextExtractor.getTextFromPage(pdfDocument.getPage(1)); - // Print the output file. No comparison will be made on the following line - ExtendedITextTest.printOutputPdfNameAndDir(pdfOutputName); + // Print the output file. No comparison will be made on the following line + ExtendedITextTest.printOutputPdfNameAndDir(pdfOutputName); - Assert.assertTrue("Page doesn't contain text " + expectedText, textFromPage.contains(expectedText)); + Assertions.assertTrue(textFromPage.contains(expectedText), "Page doesn't contain text " + expectedText); + }); } @Test //TODO: DEVSIX-1570, SUP-2322. Remove junitExpectedException after the fix. public void pageCountTestTableFloatLeft() throws IOException { - junitExpectedException.expect(AssertionError.class); + Assertions.assertThrows(AssertionError.class, () -> { + String expectedText = "Page 3 of 3"; + String nameFloatLeft = "htmlWithTableFloatLeft.html"; + String pdfOutputName = DESTINATION_FOLDER + nameFloatLeft + ".pdf"; - String expectedText = "Page 3 of 3"; - String nameFloatLeft = "htmlWithTableFloatLeft.html"; - String pdfOutputName = DESTINATION_FOLDER + nameFloatLeft + ".pdf"; + File pdfOutputFloatLeft = new File(pdfOutputName); + HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + nameFloatLeft), pdfOutputFloatLeft); - File pdfOutputFloatLeft = new File(pdfOutputName); - HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + nameFloatLeft), pdfOutputFloatLeft); + PdfDocument pdfDocument = new PdfDocument(new PdfReader(pdfOutputFloatLeft)); + String textFromPage = PdfTextExtractor.getTextFromPage(pdfDocument.getPage(3)); - PdfDocument pdfDocument = new PdfDocument(new PdfReader(pdfOutputFloatLeft)); - String textFromPage = PdfTextExtractor.getTextFromPage(pdfDocument.getPage(3)); + // Print the output file. No comparison will be made on the following line + ExtendedITextTest.printOutputPdfNameAndDir(pdfOutputName); - // Print the output file. No comparison will be made on the following line - ExtendedITextTest.printOutputPdfNameAndDir(pdfOutputName); - - Assert.assertTrue("Page doesn't contain text " + expectedText, textFromPage.contains(expectedText)); + Assertions.assertTrue(textFromPage.contains(expectedText), "Page doesn't contain text " + expectedText); + }); } private static class CustomFlushingTagWorkerFactory extends DefaultTagWorkerFactory { @@ -802,13 +795,13 @@ private void runTest(String name, ConverterProperties converterProperties, boole if (isTagged) { compareTool.compareTagStructures(pdfPath, cmpPdfPath); } - Assert.assertNull(compareTool.compareByContent(pdfPath, cmpPdfPath, DESTINATION_FOLDER, diffPrefix)); + Assertions.assertNull(compareTool.compareByContent(pdfPath, cmpPdfPath, DESTINATION_FOLDER, diffPrefix)); } private void compareResult(String name) throws InterruptedException, IOException { String pdfPath = DESTINATION_FOLDER + name + ".pdf"; String cmpPdfPath = SOURCE_FOLDER + "cmp_" + name + ".pdf"; String diffPrefix = "diff_" + name + "_"; - Assert.assertNull(new CompareTool().compareByContent(pdfPath, cmpPdfPath, DESTINATION_FOLDER, diffPrefix)); + Assertions.assertNull(new CompareTool().compareByContent(pdfPath, cmpPdfPath, DESTINATION_FOLDER, diffPrefix)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/PropertyValidationTest.java b/src/test/java/com/itextpdf/html2pdf/css/PropertyValidationTest.java index 2f81d0725..5c7198eca 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/PropertyValidationTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/PropertyValidationTest.java @@ -26,21 +26,20 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class PropertyValidationTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/PropertyValidationTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/PropertyValidationTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/PseudoElementsTest.java b/src/test/java/com/itextpdf/html2pdf/css/PseudoElementsTest.java index 74dc86ecd..56840d2e4 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/PseudoElementsTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/PseudoElementsTest.java @@ -26,19 +26,18 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class PseudoElementsTest extends ExtendedHtmlConversionITextTest { public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/PseudoElementsTest/"; public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/PseudoElementsTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/QuotesTest.java b/src/test/java/com/itextpdf/html2pdf/css/QuotesTest.java index d97b5ef80..3b460497c 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/QuotesTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/QuotesTest.java @@ -26,20 +26,19 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class QuotesTest extends ExtendedHtmlConversionITextTest { public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/QuotesTest/"; public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/QuotesTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/RelativeCssPathTest.java b/src/test/java/com/itextpdf/html2pdf/css/RelativeCssPathTest.java index 25e19725a..fabe3f378 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/RelativeCssPathTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/RelativeCssPathTest.java @@ -26,23 +26,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class RelativeCssPathTest extends ExtendedITextTest { public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/RelativeCssPathTest/"; public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/RelativeCssPathTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @@ -50,18 +49,18 @@ public static void beforeClass() { @Test public void relativeCssPath01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "css_relative.html"), new File(destinationFolder + "css_relative.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "css_relative.pdf", sourceFolder + "cmp_css_relative.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "css_relative.pdf", sourceFolder + "cmp_css_relative.pdf", destinationFolder, "diff01_")); } @Test public void relativeCssPath02Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "css_relative_base64.html"), new File(destinationFolder + "css_relative_base64.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "css_relative_base64.pdf", sourceFolder + "cmp_css_relative_base64.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "css_relative_base64.pdf", sourceFolder + "cmp_css_relative_base64.pdf", destinationFolder, "diff02_")); } @Test public void relativeImports01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "root/html/test.html"), new File(destinationFolder + "relativeImportsTest.pdf"), new ConverterProperties().setBaseUri(sourceFolder + "root/html/")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "relativeImportsTest.pdf", sourceFolder + "cmp_relativeImportsTest.pdf", destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "relativeImportsTest.pdf", sourceFolder + "cmp_relativeImportsTest.pdf", destinationFolder)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/TargetCounterTest.java b/src/test/java/com/itextpdf/html2pdf/css/TargetCounterTest.java index 9acb79325..2fdcd36b5 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/TargetCounterTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/TargetCounterTest.java @@ -43,22 +43,21 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.node.impl.jsoup.JsoupHtmlParser; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.FileInputStream; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class TargetCounterTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/TargetCounterTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/TargetCounterTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @@ -206,7 +205,7 @@ public IPropertyContainer getElementResult() { Document document = processor.processDocument(doc, pdfDocument); document.close(); - Assert.assertNull(new CompareTool().compareByContent(outPdfPath, + Assertions.assertNull(new CompareTool().compareByContent(outPdfPath, sourceFolder + "cmp_" + name + ".pdf", destinationFolder)); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/TextDecorationTest.java b/src/test/java/com/itextpdf/html2pdf/css/TextDecorationTest.java index 2a41bfec0..80b614309 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/TextDecorationTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/TextDecorationTest.java @@ -26,20 +26,19 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class TextDecorationTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/TextDecorationTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/TextDecorationTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/TextPropertiesTest.java b/src/test/java/com/itextpdf/html2pdf/css/TextPropertiesTest.java index dd86d07c6..50f1149cc 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/TextPropertiesTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/TextPropertiesTest.java @@ -28,21 +28,20 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.logs.StyledXmlParserLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class TextPropertiesTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/TextPropertiesTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/TextPropertiesTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @@ -347,7 +346,7 @@ public void enspEmspThinspTest08() throws IOException, InterruptedException { } @Test - @Ignore("DEVSIX-1442") + @Disabled("DEVSIX-1442") public void enspEmspThinspTest09() throws IOException, InterruptedException { convertToPdfAndCompare("enspEmspThinspTest09", sourceFolder, destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/VerticalAlignmentInlineBlockTest.java b/src/test/java/com/itextpdf/html2pdf/css/VerticalAlignmentInlineBlockTest.java index d5a2d5cb6..d4c116d76 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/VerticalAlignmentInlineBlockTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/VerticalAlignmentInlineBlockTest.java @@ -23,19 +23,18 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class VerticalAlignmentInlineBlockTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/VerticalAlignmentInlineBlockTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/VerticalAlignmentInlineBlockTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/VerticalAlignmentTest.java b/src/test/java/com/itextpdf/html2pdf/css/VerticalAlignmentTest.java index ef9e33711..1bfa47d5f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/VerticalAlignmentTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/VerticalAlignmentTest.java @@ -23,20 +23,18 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class VerticalAlignmentTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/VerticalAlignmentTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/VerticalAlignmentTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/VisibilityTest.java b/src/test/java/com/itextpdf/html2pdf/css/VisibilityTest.java index cfaff3a2a..db704e86c 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/VisibilityTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/VisibilityTest.java @@ -26,21 +26,20 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class VisibilityTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/VisibilityTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/VisibilityTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -102,7 +101,7 @@ public void visiblePropertyInFormDropdownListTest() throws IOException, Interrup ConverterProperties properties = new ConverterProperties(); properties.setCreateAcroForm(true); HtmlConverter.convertToPdf(new File(htmlFile), new File(outAcroPdf), properties); - Assert.assertNull(new CompareTool().compareByContent(outAcroPdf, sourceFolder + + Assertions.assertNull(new CompareTool().compareByContent(outAcroPdf, sourceFolder + "cmp_visiblePropertyInFormDropdownListTest.pdf", destinationFolder, "diff_dropdown")); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/WidowsTest.java b/src/test/java/com/itextpdf/html2pdf/css/WidowsTest.java index 8582a41ac..12e94b062 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/WidowsTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/WidowsTest.java @@ -26,20 +26,19 @@ This file is part of the iText (R) project. import com.itextpdf.io.logs.IoLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class WidowsTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/WidowsTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/WidowsTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/WidthTest.java b/src/test/java/com/itextpdf/html2pdf/css/WidthTest.java index 40750073e..3486e1cbf 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/WidthTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/WidthTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class WidthTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/WidthTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/WidthTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/WordBreakTest.java b/src/test/java/com/itextpdf/html2pdf/css/WordBreakTest.java index 667dfc80e..d90a4eb69 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/WordBreakTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/WordBreakTest.java @@ -31,23 +31,22 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class WordBreakTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/WordBreakTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/WordBreakTest/"; public static final String fontsFolder = "./src/test/resources/com/itextpdf/html2pdf/css/CJKFonts/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -62,7 +61,7 @@ public void wordBreakCommonScenarioTest() throws IOException, InterruptedExcepti HtmlConverter.convertToPdf(new File(sourceFolder + "wordBreakCommonScenario.html"), new File(destinationFolder + "wordBreakCommonScenario.pdf"), converterProperties); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "wordBreakCommonScenario.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "wordBreakCommonScenario.pdf", sourceFolder + "cmp_wordBreakCommonScenario.pdf", destinationFolder)); } @@ -76,7 +75,7 @@ public void overflowXWordBreakTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "overflowXWordBreak.html"), new File(destinationFolder + "overflowXWordBreak.pdf"), converterProperties); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "overflowXWordBreak.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "overflowXWordBreak.pdf", sourceFolder + "cmp_overflowXWordBreak.pdf", destinationFolder)); } @@ -84,7 +83,7 @@ public void overflowXWordBreakTest() throws IOException, InterruptedException { public void whiteSpaceAndWordBreakTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "whiteSpaceAndWordBreak.html"), new File(destinationFolder + "whiteSpaceAndWordBreak.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "whiteSpaceAndWordBreak.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "whiteSpaceAndWordBreak.pdf", sourceFolder + "cmp_whiteSpaceAndWordBreak.pdf", destinationFolder)); } @@ -98,7 +97,7 @@ public void wordBreakMidNumbersTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "wordBreakMidNumbers.html"), new File(destinationFolder + "wordBreakMidNumbers.pdf"), converterProperties); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "wordBreakMidNumbers.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "wordBreakMidNumbers.pdf", sourceFolder + "cmp_wordBreakMidNumbers.pdf", destinationFolder)); } @@ -106,7 +105,7 @@ public void wordBreakMidNumbersTest() throws IOException, InterruptedException { public void wordBreakMidPunctuationTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "wordBreakMidPunctuation.html"), new File(destinationFolder + "wordBreakMidPunctuation.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "wordBreakMidPunctuation.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "wordBreakMidPunctuation.pdf", sourceFolder + "cmp_wordBreakMidPunctuation.pdf", destinationFolder)); } @@ -114,7 +113,7 @@ public void wordBreakMidPunctuationTest() throws IOException, InterruptedExcepti public void wordBreakAllAndFloatTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "wordBreakAllAndFloat.html"), new File(destinationFolder + "wordBreakAllAndFloat.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "wordBreakAllAndFloat.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "wordBreakAllAndFloat.pdf", sourceFolder + "cmp_wordBreakAllAndFloat.pdf", destinationFolder)); } @@ -124,7 +123,7 @@ public void wordBreakAllAndFloatTest() throws IOException, InterruptedException public void wordBreakTableScenarioTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "wordBreakTableScenario.html"), new File(destinationFolder + "wordBreakTableScenario.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "wordBreakTableScenario.pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "wordBreakTableScenario.pdf", sourceFolder + "cmp_wordBreakTableScenario.pdf", destinationFolder)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/apply/impl/DefaultCssApplierFactoryTest.java b/src/test/java/com/itextpdf/html2pdf/css/apply/impl/DefaultCssApplierFactoryTest.java index fa1242918..ce40cb651 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/apply/impl/DefaultCssApplierFactoryTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/apply/impl/DefaultCssApplierFactoryTest.java @@ -32,24 +32,17 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.node.IStylesContainer; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class DefaultCssApplierFactoryTest extends ExtendedITextTest { - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); - @Test public void cannotGetCssApplierForCustomTagViaReflection() { ICssApplier cssApplier = new TestCssApplierFactory().getCssApplier(new JsoupElementNode(new Element(Tag.valueOf("custom-tag"), ""))); - Assert.assertEquals(TestClass.class, cssApplier.getClass()); + Assertions.assertEquals(TestClass.class, cssApplier.getClass()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/apply/util/BackgroundApplierUtilTest.java b/src/test/java/com/itextpdf/html2pdf/css/apply/util/BackgroundApplierUtilTest.java index 71774b782..c246b5a0d 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/apply/util/BackgroundApplierUtilTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/apply/util/BackgroundApplierUtilTest.java @@ -46,18 +46,17 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; -@Category(UnitTest.class) +@Tag("UnitTest") public class BackgroundApplierUtilTest extends ExtendedITextTest { private static final double EPS = 0.000001; @@ -69,11 +68,11 @@ public void backgroundColorTest() { IPropertyContainer container = new BodyHtmlStylesContainer() { @Override public void setProperty(int property, Object value) { - Assert.assertEquals(Property.BACKGROUND, property); - Assert.assertTrue(value instanceof Background); + Assertions.assertEquals(Property.BACKGROUND, property); + Assertions.assertTrue(value instanceof Background); Background backgroundValue = (Background) value; - Assert.assertEquals(new DeviceRgb(1.0f, 0.0f, 0.0f), backgroundValue.getColor()); - Assert.assertEquals(1.0f, backgroundValue.getOpacity(), EPS); + Assertions.assertEquals(new DeviceRgb(1.0f, 0.0f, 0.0f), backgroundValue.getColor()); + Assertions.assertEquals(1.0f, backgroundValue.getOpacity(), EPS); } }; Map props = new HashMap<>(); @@ -91,19 +90,19 @@ public void backgroundImageTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(1, values.size()); + Assertions.assertEquals(1, values.size()); for (Object value : values) { - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; PdfImageXObject pdfImage = image.getImage(); - Assert.assertNotNull(pdfImage); + Assertions.assertNotNull(pdfImage); PdfXObject expectedImage = innerContext.getResourceResolver().retrieveImage( CssUtils.extractUrl(innerImage)); - Assert.assertTrue(expectedImage instanceof PdfImageXObject); - Assert.assertEquals(Arrays.toString(((PdfImageXObject) expectedImage).getImageBytes()), + Assertions.assertTrue(expectedImage instanceof PdfImageXObject); + Assertions.assertEquals(Arrays.toString(((PdfImageXObject) expectedImage).getImageBytes()), Arrays.toString(pdfImage.getImageBytes())); } } @@ -125,7 +124,7 @@ public void backgroundInvalidImageTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.fail(); + Assertions.fail(); } }; Map props = new HashMap<>(); @@ -142,15 +141,15 @@ public void backgroundImageRepeatTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(1, values.size()); + Assertions.assertEquals(1, values.size()); for (Object value : values) { - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(BackgroundRepeatValue.NO_REPEAT, image.getRepeat().getXAxisRepeat()); - Assert.assertEquals(BackgroundRepeatValue.NO_REPEAT, image.getRepeat().getYAxisRepeat()); + Assertions.assertEquals(BackgroundRepeatValue.NO_REPEAT, image.getRepeat().getXAxisRepeat()); + Assertions.assertEquals(BackgroundRepeatValue.NO_REPEAT, image.getRepeat().getYAxisRepeat()); } } }; @@ -169,15 +168,15 @@ public void backgroundImageInvalidRepeatTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(1, values.size()); + Assertions.assertEquals(1, values.size()); for (Object value : values) { - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(BackgroundRepeatValue.REPEAT, image.getRepeat().getXAxisRepeat()); - Assert.assertEquals(BackgroundRepeatValue.REPEAT, image.getRepeat().getYAxisRepeat()); + Assertions.assertEquals(BackgroundRepeatValue.REPEAT, image.getRepeat().getXAxisRepeat()); + Assertions.assertEquals(BackgroundRepeatValue.REPEAT, image.getRepeat().getYAxisRepeat()); } } }; @@ -198,20 +197,20 @@ public void backgroundImagesTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(imagesArray.length, values.size()); + Assertions.assertEquals(imagesArray.length, values.size()); for (int i = 0; i < values.size(); i++) { Object value = values.get(i); - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; PdfImageXObject pdfImage = image.getImage(); - Assert.assertNotNull(pdfImage); + Assertions.assertNotNull(pdfImage); PdfXObject expectedImage = innerContext.getResourceResolver().retrieveImage( CssUtils.extractUrl(imagesArray[i])); - Assert.assertTrue(expectedImage instanceof PdfImageXObject); - Assert.assertEquals(Arrays.toString(((PdfImageXObject) expectedImage).getImageBytes()), + Assertions.assertTrue(expectedImage instanceof PdfImageXObject); + Assertions.assertEquals(Arrays.toString(((PdfImageXObject) expectedImage).getImageBytes()), Arrays.toString(pdfImage.getImageBytes())); } } @@ -231,16 +230,16 @@ public void backgroundImagesRepeatTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(imagesArray.length, values.size()); + Assertions.assertEquals(imagesArray.length, values.size()); for (int i = 0; i < values.size(); i++) { Object value = values.get(i); - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(BackgroundRepeatValue.NO_REPEAT, image.getRepeat().getXAxisRepeat()); - Assert.assertEquals(BackgroundRepeatValue.NO_REPEAT, image.getRepeat().getYAxisRepeat()); + Assertions.assertEquals(BackgroundRepeatValue.NO_REPEAT, image.getRepeat().getXAxisRepeat()); + Assertions.assertEquals(BackgroundRepeatValue.NO_REPEAT, image.getRepeat().getYAxisRepeat()); } } }; @@ -260,20 +259,20 @@ public void backgroundImagesRepeatsTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(imagesArray.length, values.size()); + Assertions.assertEquals(imagesArray.length, values.size()); for (int i = 0; i < values.size(); i++) { Object value = values.get(i); - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; if (i == 0) { - Assert.assertEquals(BackgroundRepeatValue.NO_REPEAT, image.getRepeat().getXAxisRepeat()); - Assert.assertEquals(BackgroundRepeatValue.NO_REPEAT, image.getRepeat().getYAxisRepeat()); + Assertions.assertEquals(BackgroundRepeatValue.NO_REPEAT, image.getRepeat().getXAxisRepeat()); + Assertions.assertEquals(BackgroundRepeatValue.NO_REPEAT, image.getRepeat().getYAxisRepeat()); } else { - Assert.assertEquals(BackgroundRepeatValue.REPEAT, image.getRepeat().getXAxisRepeat()); - Assert.assertEquals(BackgroundRepeatValue.REPEAT, image.getRepeat().getYAxisRepeat()); + Assertions.assertEquals(BackgroundRepeatValue.REPEAT, image.getRepeat().getXAxisRepeat()); + Assertions.assertEquals(BackgroundRepeatValue.REPEAT, image.getRepeat().getYAxisRepeat()); } } @@ -295,24 +294,24 @@ public void backgroundLinearGradientsTest() { @Override public void setProperty(int property, Object value) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(value instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(value instanceof List); List values = (List) value; - Assert.assertEquals(gradientsArray.size(), values.size()); + Assertions.assertEquals(gradientsArray.size(), values.size()); for (int i = 0; i < values.size(); ++i) { - Assert.assertTrue(values.get(i) instanceof BackgroundImage); + Assertions.assertTrue(values.get(i) instanceof BackgroundImage); AbstractLinearGradientBuilder builder = ((BackgroundImage) values.get(i)).getLinearGradientBuilder(); - Assert.assertTrue(builder instanceof StrategyBasedLinearGradientBuilder); + Assertions.assertTrue(builder instanceof StrategyBasedLinearGradientBuilder); StrategyBasedLinearGradientBuilder expectedGradientBuilder = CssGradientUtil.parseCssLinearGradient(gradientsArray.get(i), fontSize, fontSize); - Assert.assertNotNull(expectedGradientBuilder); + Assertions.assertNotNull(expectedGradientBuilder); StrategyBasedLinearGradientBuilder actualGradientBuilder = (StrategyBasedLinearGradientBuilder) builder; - Assert.assertEquals(expectedGradientBuilder.getSpreadMethod(), + Assertions.assertEquals(expectedGradientBuilder.getSpreadMethod(), actualGradientBuilder.getSpreadMethod()); - Assert.assertEquals(expectedGradientBuilder.getColorStops(), actualGradientBuilder.getColorStops()); + Assertions.assertEquals(expectedGradientBuilder.getColorStops(), actualGradientBuilder.getColorStops()); } } }; @@ -332,23 +331,23 @@ public void backgroundLinearGradientTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(1, values.size()); + Assertions.assertEquals(1, values.size()); for (Object value : values) { - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); AbstractLinearGradientBuilder builder = ((BackgroundImage) value).getLinearGradientBuilder(); - Assert.assertTrue(builder instanceof StrategyBasedLinearGradientBuilder); + Assertions.assertTrue(builder instanceof StrategyBasedLinearGradientBuilder); StrategyBasedLinearGradientBuilder expectedGradientBuilder = CssGradientUtil.parseCssLinearGradient(gradient, fontSize, fontSize); - Assert.assertNotNull(expectedGradientBuilder); + Assertions.assertNotNull(expectedGradientBuilder); StrategyBasedLinearGradientBuilder actualGradientBuilder = (StrategyBasedLinearGradientBuilder) builder; - Assert.assertEquals(expectedGradientBuilder.getSpreadMethod(), + Assertions.assertEquals(expectedGradientBuilder.getSpreadMethod(), actualGradientBuilder.getSpreadMethod()); - Assert.assertEquals(expectedGradientBuilder.getColorStops(), actualGradientBuilder.getColorStops()); + Assertions.assertEquals(expectedGradientBuilder.getColorStops(), actualGradientBuilder.getColorStops()); } } }; @@ -366,16 +365,16 @@ public void backgroundImagePositionTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(1, values.size()); + Assertions.assertEquals(1, values.size()); for (Object value : values) { - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(BackgroundPosition.PositionX.RIGHT, + Assertions.assertEquals(BackgroundPosition.PositionX.RIGHT, image.getBackgroundPosition().getPositionX()); - Assert.assertEquals(BackgroundPosition.PositionY.CENTER, + Assertions.assertEquals(BackgroundPosition.PositionY.CENTER, image.getBackgroundPosition().getPositionY()); } } @@ -396,16 +395,16 @@ public void backgroundImageInvalidPositionTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(1, values.size()); + Assertions.assertEquals(1, values.size()); for (Object value : values) { - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(BackgroundPosition.PositionX.LEFT, + Assertions.assertEquals(BackgroundPosition.PositionX.LEFT, image.getBackgroundPosition().getPositionX()); - Assert.assertEquals(BackgroundPosition.PositionY.TOP, image.getBackgroundPosition().getPositionY()); + Assertions.assertEquals(BackgroundPosition.PositionY.TOP, image.getBackgroundPosition().getPositionY()); } } }; @@ -424,16 +423,16 @@ public void backgroundImageEmptyPositionTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(1, values.size()); + Assertions.assertEquals(1, values.size()); for (Object value : values) { - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(BackgroundPosition.PositionX.LEFT, + Assertions.assertEquals(BackgroundPosition.PositionX.LEFT, image.getBackgroundPosition().getPositionX()); - Assert.assertEquals(BackgroundPosition.PositionY.TOP, image.getBackgroundPosition().getPositionY()); + Assertions.assertEquals(BackgroundPosition.PositionY.TOP, image.getBackgroundPosition().getPositionY()); } } }; @@ -454,16 +453,16 @@ public void backgroundImagesLeftBottomPositionTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(imagesArray.length, values.size()); + Assertions.assertEquals(imagesArray.length, values.size()); BackgroundPosition position = new BackgroundPosition().setPositionX(BackgroundPosition.PositionX.LEFT) .setPositionY(BackgroundPosition.PositionY.BOTTOM).setYShift(UnitValue.createPointValue(20)); for (Object value : values) { - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(position, image.getBackgroundPosition()); + Assertions.assertEquals(position, image.getBackgroundPosition()); } } }; @@ -484,16 +483,16 @@ public void backgroundImagesRightTopPositionTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(imagesArray.length, values.size()); + Assertions.assertEquals(imagesArray.length, values.size()); BackgroundPosition position = new BackgroundPosition().setPositionX(BackgroundPosition.PositionX.RIGHT) .setPositionY(BackgroundPosition.PositionY.TOP).setXShift(UnitValue.createPointValue(30)); for (Object value : values) { - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(position, image.getBackgroundPosition()); + Assertions.assertEquals(position, image.getBackgroundPosition()); } } }; @@ -514,16 +513,16 @@ public void backgroundImagesCenterCenterPositionTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(imagesArray.length, values.size()); + Assertions.assertEquals(imagesArray.length, values.size()); BackgroundPosition position = new BackgroundPosition().setPositionX(BackgroundPosition.PositionX.CENTER) .setPositionY(BackgroundPosition.PositionY.CENTER); for (Object value : values) { - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(position, image.getBackgroundPosition()); + Assertions.assertEquals(position, image.getBackgroundPosition()); } } }; @@ -544,10 +543,10 @@ public void backgroundImagesPositionMissedTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(imagesArray.length, values.size()); + Assertions.assertEquals(imagesArray.length, values.size()); BackgroundPosition[] positions = new BackgroundPosition[] { new BackgroundPosition().setPositionX(BackgroundPosition.PositionX.LEFT).setPositionY( BackgroundPosition.PositionY.CENTER), @@ -558,9 +557,9 @@ public void setProperty(int property, Object propertyValue) { }; for (int i = 0; i < values.size(); i++) { Object value = values.get(i); - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(positions[i], image.getBackgroundPosition()); + Assertions.assertEquals(positions[i], image.getBackgroundPosition()); } } }; @@ -581,10 +580,10 @@ public void backgroundImagesPositionsTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(imagesArray.length, values.size()); + Assertions.assertEquals(imagesArray.length, values.size()); BackgroundPosition[] positions = new BackgroundPosition[] { new BackgroundPosition(), new BackgroundPosition().setPositionY(BackgroundPosition.PositionY.BOTTOM), @@ -592,9 +591,9 @@ public void setProperty(int property, Object propertyValue) { }; for (int i = 0; i < values.size(); i++) { Object value = values.get(i); - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(positions[i], image.getBackgroundPosition()); + Assertions.assertEquals(positions[i], image.getBackgroundPosition()); } } }; @@ -614,15 +613,15 @@ public void backgroundClipOriginImageTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(1, values.size()); + Assertions.assertEquals(1, values.size()); for (Object value : values) { - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(BackgroundBox.CONTENT_BOX, image.getBackgroundClip()); - Assert.assertEquals(BackgroundBox.PADDING_BOX, image.getBackgroundOrigin()); + Assertions.assertEquals(BackgroundBox.CONTENT_BOX, image.getBackgroundClip()); + Assertions.assertEquals(BackgroundBox.PADDING_BOX, image.getBackgroundOrigin()); } } }; @@ -640,10 +639,10 @@ public void backgroundClipColorTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND, property); - Assert.assertTrue(propertyValue instanceof Background); + Assertions.assertEquals(Property.BACKGROUND, property); + Assertions.assertTrue(propertyValue instanceof Background); Background color = (Background) propertyValue; - Assert.assertEquals(BackgroundBox.CONTENT_BOX, color.getBackgroundClip()); + Assertions.assertEquals(BackgroundBox.CONTENT_BOX, color.getBackgroundClip()); } }; Map props = new HashMap<>(); @@ -661,16 +660,16 @@ public void backgroundClipOriginImagesTest() { @Override public void setProperty(int property, Object propertyValue) { - Assert.assertEquals(Property.BACKGROUND_IMAGE, property); - Assert.assertTrue(propertyValue instanceof List); + Assertions.assertEquals(Property.BACKGROUND_IMAGE, property); + Assertions.assertTrue(propertyValue instanceof List); List values = (List) propertyValue; - Assert.assertEquals(imagesArray.length, values.size()); + Assertions.assertEquals(imagesArray.length, values.size()); for (int i = 0; i < values.size(); i++) { Object value = values.get(i); - Assert.assertTrue(value instanceof BackgroundImage); + Assertions.assertTrue(value instanceof BackgroundImage); BackgroundImage image = (BackgroundImage) value; - Assert.assertEquals(BackgroundBox.CONTENT_BOX, image.getBackgroundClip()); - Assert.assertEquals(BackgroundBox.BORDER_BOX, image.getBackgroundOrigin()); + Assertions.assertEquals(BackgroundBox.CONTENT_BOX, image.getBackgroundClip()); + Assertions.assertEquals(BackgroundBox.BORDER_BOX, image.getBackgroundOrigin()); } } }; @@ -695,16 +694,16 @@ public void backgroundMultipleClipOriginImagesTest() { BackgroundApplierUtil.applyBackground(props, context, container); List backgroundImages = container.>getProperty( Property.BACKGROUND_IMAGE); - Assert.assertNotNull(backgroundImages); - Assert.assertEquals(2, backgroundImages.size()); + Assertions.assertNotNull(backgroundImages); + Assertions.assertEquals(2, backgroundImages.size()); BackgroundImage imageObj1 = backgroundImages.get(0); - Assert.assertNotNull(imageObj1); - Assert.assertEquals(BackgroundBox.CONTENT_BOX, imageObj1.getBackgroundClip()); - Assert.assertEquals(BackgroundBox.BORDER_BOX, imageObj1.getBackgroundOrigin()); + Assertions.assertNotNull(imageObj1); + Assertions.assertEquals(BackgroundBox.CONTENT_BOX, imageObj1.getBackgroundClip()); + Assertions.assertEquals(BackgroundBox.BORDER_BOX, imageObj1.getBackgroundOrigin()); BackgroundImage imageObj2 = backgroundImages.get(1); - Assert.assertNotNull(imageObj2); - Assert.assertEquals(BackgroundBox.PADDING_BOX, imageObj2.getBackgroundClip()); - Assert.assertEquals(BackgroundBox.CONTENT_BOX, imageObj2.getBackgroundOrigin()); + Assertions.assertNotNull(imageObj2); + Assertions.assertEquals(BackgroundBox.PADDING_BOX, imageObj2.getBackgroundClip()); + Assertions.assertEquals(BackgroundBox.CONTENT_BOX, imageObj2.getBackgroundOrigin()); } @Test @@ -721,19 +720,19 @@ public void backgroundClipOriginImagesColorTest() { props.put(CssConstants.BACKGROUND_ORIGIN, origins); BackgroundApplierUtil.applyBackground(props, context, container); Background background = container.getProperty(Property.BACKGROUND); - Assert.assertNotNull(background); - Assert.assertEquals(BackgroundBox.PADDING_BOX, background.getBackgroundClip()); + Assertions.assertNotNull(background); + Assertions.assertEquals(BackgroundBox.PADDING_BOX, background.getBackgroundClip()); List backgroundImages = container.>getProperty( Property.BACKGROUND_IMAGE); - Assert.assertNotNull(backgroundImages); - Assert.assertEquals(2, backgroundImages.size()); + Assertions.assertNotNull(backgroundImages); + Assertions.assertEquals(2, backgroundImages.size()); BackgroundImage imageObj1 = backgroundImages.get(0); - Assert.assertNotNull(imageObj1); - Assert.assertEquals(BackgroundBox.CONTENT_BOX, imageObj1.getBackgroundClip()); - Assert.assertEquals(BackgroundBox.BORDER_BOX, imageObj1.getBackgroundOrigin()); + Assertions.assertNotNull(imageObj1); + Assertions.assertEquals(BackgroundBox.CONTENT_BOX, imageObj1.getBackgroundClip()); + Assertions.assertEquals(BackgroundBox.BORDER_BOX, imageObj1.getBackgroundOrigin()); BackgroundImage imageObj2 = backgroundImages.get(1); - Assert.assertNotNull(imageObj2); - Assert.assertEquals(BackgroundBox.PADDING_BOX, imageObj2.getBackgroundClip()); - Assert.assertEquals(BackgroundBox.CONTENT_BOX, imageObj2.getBackgroundOrigin()); + Assertions.assertNotNull(imageObj2); + Assertions.assertEquals(BackgroundBox.PADDING_BOX, imageObj2.getBackgroundClip()); + Assertions.assertEquals(BackgroundBox.CONTENT_BOX, imageObj2.getBackgroundOrigin()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/apply/util/FlexApplierUtilTest.java b/src/test/java/com/itextpdf/html2pdf/css/apply/util/FlexApplierUtilTest.java index cf1a42e02..bce2f8f54 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/apply/util/FlexApplierUtilTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/apply/util/FlexApplierUtilTest.java @@ -37,15 +37,14 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.UnitTest; import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class FlexApplierUtilTest extends ExtendedITextTest { private static final float EPS = 1e-6f; @@ -58,7 +57,7 @@ public void applyFlexGrowTest() { IElement element = new Div(); FlexApplierUtil.applyFlexItemProperties(cssProps, context, element); Float flexGrow = element.getProperty(Property.FLEX_GROW); - Assert.assertEquals(20.568f, (float) flexGrow, EPS); + Assertions.assertEquals(20.568f, (float) flexGrow, EPS); } @Test @@ -69,7 +68,7 @@ public void applyFlexShrinkTest() { IElement element = new Div(); FlexApplierUtil.applyFlexItemProperties(cssProps, context, element); Float flexShrink = element.getProperty(Property.FLEX_SHRINK); - Assert.assertEquals(182.1932f, (float) flexShrink, EPS); + Assertions.assertEquals(182.1932f, (float) flexShrink, EPS); } @Test @@ -79,7 +78,7 @@ public void applyFlexBasisNullTest() { cssProps.put(CssConstants.FLEX_BASIS, null); IElement element = new Div(); FlexApplierUtil.applyFlexItemProperties(cssProps, context, element); - Assert.assertNull(element.getProperty(Property.FLEX_BASIS)); + Assertions.assertNull(element.getProperty(Property.FLEX_BASIS)); } @Test @@ -89,7 +88,7 @@ public void applyFlexBasisAutoTest() { cssProps.put(CssConstants.FLEX_BASIS, CssConstants.AUTO); IElement element = new Div(); FlexApplierUtil.applyFlexItemProperties(cssProps, context, element); - Assert.assertNull(element.getProperty(Property.FLEX_BASIS)); + Assertions.assertNull(element.getProperty(Property.FLEX_BASIS)); } @Test @@ -100,8 +99,8 @@ public void applyFlexBasisContentWidthTest() { cssProps.put(CssConstants.FLEX_BASIS, CssConstants.CONTENT); IElement element = new Div(); FlexApplierUtil.applyFlexItemProperties(cssProps, context, element); - Assert.assertFalse(element.hasProperty(Property.FLEX_BASIS)); - Assert.assertNull(element.getProperty(Property.FLEX_BASIS)); + Assertions.assertFalse(element.hasProperty(Property.FLEX_BASIS)); + Assertions.assertNull(element.getProperty(Property.FLEX_BASIS)); } @Test @@ -112,9 +111,9 @@ public void applyFlexBasisAbsoluteValueTest() { cssProps.put(CssConstants.FONT_SIZE, "0"); IElement element = new Div(); FlexApplierUtil.applyFlexItemProperties(cssProps, context, element); - Assert.assertEquals(UnitValue.createPointValue(20.45f), + Assertions.assertEquals(UnitValue.createPointValue(20.45f), element.getProperty(Property.FLEX_BASIS)); - Assert.assertEquals(UnitValue.createPointValue(20.45f), element.getProperty(Property.FLEX_BASIS)); + Assertions.assertEquals(UnitValue.createPointValue(20.45f), element.getProperty(Property.FLEX_BASIS)); } @@ -150,7 +149,7 @@ public void applyAlignItemsTest() { cssProps.put(CssConstants.ALIGN_ITEMS, alignItemsStrings[i]); IElement element = new Div(); FlexApplierUtil.applyFlexContainerProperties(cssProps, element); - Assert.assertEquals(alignItemsValues[i], (AlignmentPropertyValue) element.getProperty(Property.ALIGN_ITEMS)); + Assertions.assertEquals(alignItemsValues[i], (AlignmentPropertyValue) element.getProperty(Property.ALIGN_ITEMS)); } } @@ -187,7 +186,7 @@ public void applyJustifyContentTest() { cssProps.put(CssConstants.JUSTIFY_CONTENT, justifyContentStrings[i]); IElement element = new Div(); FlexApplierUtil.applyFlexContainerProperties(cssProps, element); - Assert.assertEquals(justifyContentValues[i], (JustifyContent) element.getProperty(Property.JUSTIFY_CONTENT)); + Assertions.assertEquals(justifyContentValues[i], (JustifyContent) element.getProperty(Property.JUSTIFY_CONTENT)); } } @@ -208,7 +207,7 @@ public void applyFlexWrapTest() { cssProps.put(CssConstants.FLEX_WRAP, wrapStrings[i]); IElement element = new Div(); FlexApplierUtil.applyFlexContainerProperties(cssProps, element); - Assert.assertEquals(wrapValues[i], (FlexWrapPropertyValue) element.getProperty(Property.FLEX_WRAP)); + Assertions.assertEquals(wrapValues[i], (FlexWrapPropertyValue) element.getProperty(Property.FLEX_WRAP)); } } @@ -219,7 +218,7 @@ public void applyAlignItemsUnsupportedValuesTest() { cssProps.put(CommonCssConstants.ALIGN_ITEMS, CssConstants.SAFE + " " + CommonCssConstants.FLEX_END); IElement element = new Div(); FlexApplierUtil.applyFlexContainerProperties(cssProps, element); - Assert.assertEquals(AlignmentPropertyValue.STRETCH, (AlignmentPropertyValue) element.getProperty(Property.ALIGN_ITEMS)); + Assertions.assertEquals(AlignmentPropertyValue.STRETCH, (AlignmentPropertyValue) element.getProperty(Property.ALIGN_ITEMS)); } @Test @@ -229,7 +228,7 @@ public void applyJustifyContentUnsupportedValuesTest() { cssProps.put(CssConstants.JUSTIFY_CONTENT, CommonCssConstants.SPACE_BETWEEN); IElement element = new Div(); FlexApplierUtil.applyFlexContainerProperties(cssProps, element); - Assert.assertEquals(JustifyContent.FLEX_START, (JustifyContent) element.getProperty(Property.JUSTIFY_CONTENT)); + Assertions.assertEquals(JustifyContent.FLEX_START, (JustifyContent) element.getProperty(Property.JUSTIFY_CONTENT)); } @Test @@ -255,7 +254,7 @@ public void applyFlexContainerUnsupportedPropertiesUnsupportedValuesTest() { } // This test checks that there are log messages so assertions are not required - Assert.assertTrue(true); + Assertions.assertTrue(true); } @Test @@ -270,7 +269,7 @@ public void applyFlexItemUnsupportedPropertiesUnsupportedValuesTest() { FlexApplierUtil.applyFlexItemProperties(cssProps, context, element); // This test checks that there are log messages so assertions are not required - Assert.assertTrue(true); + Assertions.assertTrue(true); } @Test @@ -291,7 +290,7 @@ public void applyFlexContainerUnsupportedPropertiesSupportedValuesTest() { } // This test checks that there are no log messages so assertions are not required - Assert.assertTrue(true); + Assertions.assertTrue(true); } @Test @@ -304,6 +303,6 @@ public void applyFlexItemUnsupportedPropertiesSupportedValuesTest() { FlexApplierUtil.applyFlexItemProperties(cssProps, context, element); // This test checks that there are no log messages so assertions are not required - Assert.assertTrue(true); + Assertions.assertTrue(true); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/apply/util/GridApplierUtilTest.java b/src/test/java/com/itextpdf/html2pdf/css/apply/util/GridApplierUtilTest.java new file mode 100644 index 000000000..a96fc6790 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/apply/util/GridApplierUtilTest.java @@ -0,0 +1,816 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.apply.util; + +import com.itextpdf.html2pdf.ConverterProperties; +import com.itextpdf.html2pdf.attach.ProcessorContext; +import com.itextpdf.html2pdf.css.CssConstants; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.layout.element.Div; +import com.itextpdf.layout.element.GridContainer; +import com.itextpdf.layout.element.IElement; +import com.itextpdf.layout.properties.Property; +import com.itextpdf.layout.properties.grid.AutoRepeatValue; +import com.itextpdf.layout.properties.grid.FitContentValue; +import com.itextpdf.layout.properties.grid.FixedRepeatValue; +import com.itextpdf.layout.properties.grid.GridFlow; +import com.itextpdf.layout.properties.grid.GridValue; +import com.itextpdf.layout.properties.grid.LengthValue; +import com.itextpdf.layout.properties.grid.MinMaxValue; +import com.itextpdf.layout.properties.grid.PercentValue; +import com.itextpdf.layout.properties.grid.PointValue; +import com.itextpdf.layout.properties.grid.TemplateValue; +import com.itextpdf.styledxmlparser.css.CommonCssConstants; +import com.itextpdf.styledxmlparser.jsoup.nodes.Element; +import com.itextpdf.styledxmlparser.node.IElementNode; +import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; +import com.itextpdf.test.ExtendedITextTest; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; + +@Tag("UnitTest") +public class GridApplierUtilTest extends ExtendedITextTest { + @Test + public void applyColumnStartTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, "2"); + IElement element = new Div(); + GridApplierUtil.applyGridItemProperties(cssProps, createStylesContainer(), element); + Integer columnStart = element.getProperty(Property.GRID_COLUMN_START); + Assertions.assertEquals(2, columnStart); + } + + @Test + public void applyColumnEndTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_END, "4"); + IElement element = new Div(); + GridApplierUtil.applyGridItemProperties(cssProps, createStylesContainer(), element); + Integer columnStart = element.getProperty(Property.GRID_COLUMN_END); + Assertions.assertEquals(4, columnStart); + } + + @Test + public void applyRowStartTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_ROW_START, "3"); + IElement element = new Div(); + GridApplierUtil.applyGridItemProperties(cssProps, createStylesContainer(), element); + Integer columnStart = element.getProperty(Property.GRID_ROW_START); + Assertions.assertEquals(3, columnStart); + } + + @Test + public void applyRowStartSpanTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_ROW_START, "span 3"); + IElement element = new Div(); + GridApplierUtil.applyGridItemProperties(cssProps, createStylesContainer(), element); + Integer rowSpan = element.getProperty(Property.GRID_ROW_SPAN); + Assertions.assertEquals(3, rowSpan); + } + + @Test + public void applyRowEndTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_ROW_END, "11"); + IElement element = new Div(); + GridApplierUtil.applyGridItemProperties(cssProps, createStylesContainer(), element); + Integer columnStart = element.getProperty(Property.GRID_ROW_END); + Assertions.assertEquals(11, columnStart); + } + + @Test + public void applyInvalidColumnStartTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, CssConstants.AUTO); + Div element = new Div(); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, createStylesContainer(), element); + GridApplierUtil.applyGridContainerProperties(new HashMap<>(), grid, new ProcessorContext(new ConverterProperties())); + + Integer columnStart = element.getProperty(Property.GRID_COLUMN_START); + Assertions.assertNull(columnStart); + } + + @Test + public void applyGridAreaBasicTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, "1 / 2 / 3 / 4"); + IElement element = new Div(); + GridApplierUtil.applyGridItemProperties(cssProps, createStylesContainer(), element); + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(2, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void applyGridAreaAutoTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, "auto / auto / auto / auto"); + IElement element = new Div(); + GridApplierUtil.applyGridItemProperties(cssProps, createStylesContainer(), element); + Assertions.assertNull(element.getProperty(Property.GRID_ROW_START)); + Assertions.assertNull(element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertNull(element.getProperty(Property.GRID_ROW_END)); + Assertions.assertNull(element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void applyGridAreaOrderTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, "1 / 2 / 3 / 4"); + cssProps.put(CssConstants.GRID_COLUMN_START, "1"); + IElement element = new Div(); + GridApplierUtil.applyGridItemProperties(cssProps, createStylesContainer(), element); + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void applyGridAreaOrder2Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, "1"); + cssProps.put(CssConstants.GRID_AREA, "1 / 2 / 3 / 4"); + IElement element = new Div(); + GridApplierUtil.applyGridItemProperties(cssProps, createStylesContainer(), element); + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void applyGridAreaOrder3Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, "auto / 2 / 3 / 4"); + cssProps.put(CssConstants.GRID_ROW_START, "1"); + IElement element = new Div(); + GridApplierUtil.applyGridItemProperties(cssProps, createStylesContainer(), element); + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(2, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void applyGridAreaOrder4Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_ROW_START, "1"); + cssProps.put(CssConstants.GRID_AREA, "auto / 2 / 3 / 4"); + IElement element = new Div(); + GridApplierUtil.applyGridItemProperties(cssProps, createStylesContainer(), element); + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(2, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void applyGridPropertiesToNotGrid() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, "1 / 2 / 3 / 4"); + IElement element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.remove(CssConstants.DISPLAY); + + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + Assertions.assertNull(element.getProperty(Property.GRID_ROW_START)); + Assertions.assertNull(element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertNull(element.getProperty(Property.GRID_ROW_END)); + Assertions.assertNull(element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void applyNoneGridTemplateAreasTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, CommonCssConstants.NONE); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_AREAS, CommonCssConstants.NONE); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(new HashMap<>(), grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertNull(element.getProperty(Property.GRID_ROW_START)); + Assertions.assertNull(element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertNull(element.getProperty(Property.GRID_ROW_END)); + Assertions.assertNull(element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void applyGridTemplateAreas1Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, "somename1"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_AREAS, "\"somename1 Somename1\" ' somename1 Somename1' ' somename1 Somename1'"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(2, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void applyGridTemplateAreasOrder1Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_ROW_END, "3"); + cssProps.put(CssConstants.GRID_AREA, "somename1"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_AREAS, "\"somename1 Somename1\" ' somename1 Somename1' ' somename1 Somename1'"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(2, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void applyGridTemplateAreasOrder2Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, "somename1"); + cssProps.put(CssConstants.GRID_ROW_END, "3"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_AREAS, "\"somename1 Somename1\" ' somename1 Somename1' ' somename1 Somename1'"); + + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(2, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void applyGridTemplateAreasInvalidNameTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, "1"); + IElement element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_AREAS, "'a b' '1 1'"); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertNull(element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertNull(element.getProperty(Property.GRID_ROW_END)); + Assertions.assertNull(element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + @LogMessages(messages = @LogMessage(messageTemplate = Html2PdfLogMessageConstant.GRID_TEMPLATE_AREAS_IS_INVALID, count = 2)) + public void applyInvalidGridTemplateAreas1Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, "b"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_AREAS, "'a b' 'b a'"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(2, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(2, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + @LogMessages(messages = @LogMessage(messageTemplate = Html2PdfLogMessageConstant.GRID_TEMPLATE_AREAS_IS_INVALID, count = 2)) + public void applyInvalidGridTemplateAreas2Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, "a"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_AREAS, "'a b a' 'a b a'"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(2, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void applyGridTemplateAreasWithDotsTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, "."); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_AREAS, "'. . a' '. . a'"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(new HashMap<>(), grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertNull(element.getProperty(Property.GRID_ROW_START)); + Assertions.assertNull(element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertNull(element.getProperty(Property.GRID_ROW_END)); + Assertions.assertNull(element.getProperty(Property.GRID_COLUMN_END)); + } + + // ------------------ Grid container tests ------------------ + @Test + public void containerAutoValuesTest() { + Map cssProps = new HashMap<>(); + cssProps.put(CssConstants.GRID_AUTO_COLUMNS, "11px"); + cssProps.put(CssConstants.GRID_AUTO_ROWS, "30%"); + IElement element = new Div(); + GridApplierUtil.applyGridContainerProperties(cssProps, element, new ProcessorContext(new ConverterProperties())); + Assertions.assertEquals(8.25f, element.getProperty(Property.GRID_AUTO_COLUMNS).getValue()); + Assertions.assertEquals(30.0f, element.getProperty(Property.GRID_AUTO_ROWS).getValue()); + } + + @Test + public void containerTemplateValuesTest() { + Map cssProps = new HashMap<>(); + cssProps.put(CssConstants.GRID_TEMPLATE_COLUMNS, "min-content 1.5fr auto 2fr 100px 20%"); + cssProps.put(CssConstants.GRID_TEMPLATE_ROWS, "10px 20pt 3em 5rem"); + IElement element = new Div(); + GridApplierUtil.applyGridContainerProperties(cssProps, element, new ProcessorContext(new ConverterProperties())); + List actualColValues = element.>getProperty(Property.GRID_TEMPLATE_COLUMNS); + Assertions.assertEquals(6, actualColValues.size()); + Assertions.assertEquals(actualColValues.get(0).getType(), GridValue.ValueType.MIN_CONTENT); + Assertions.assertEquals(actualColValues.get(1).getType(), GridValue.ValueType.FLEX); + Assertions.assertEquals(actualColValues.get(2).getType(), GridValue.ValueType.AUTO); + Assertions.assertEquals(actualColValues.get(3).getType(), GridValue.ValueType.FLEX); + Assertions.assertEquals(75.0f, ((PointValue)actualColValues.get(4)).getValue()); + Assertions.assertEquals(20.0f, ((PercentValue)actualColValues.get(5)).getValue()); + List actualRowValues = element.>getProperty(Property.GRID_TEMPLATE_ROWS); + Assertions.assertEquals(4, actualRowValues.size()); + Assertions.assertEquals(7.5f, ((PointValue)actualRowValues.get(0)).getValue()); + Assertions.assertEquals(20.0f, ((PointValue)actualRowValues.get(1)).getValue()); + Assertions.assertEquals(0.0f, ((PointValue)actualRowValues.get(2)).getValue()); + Assertions.assertEquals(60.0f, ((PointValue)actualRowValues.get(3)).getValue()); + } + + @Test + public void containerComplexTemplateValuesTest() { + Map cssProps = new HashMap<>(); + cssProps.put(CssConstants.GRID_TEMPLATE_COLUMNS, + "minmax(min-content, 1fr) fit-content(40%) fit-content(20px) repeat(2, fit-content(200px))"); + cssProps.put(CssConstants.GRID_TEMPLATE_ROWS, "repeat(3, 100px) repeat(auto-fit, minmax(100px, auto))"); + IElement element = new Div(); + GridApplierUtil.applyGridContainerProperties(cssProps, element, new ProcessorContext(new ConverterProperties())); + + List actualColValues = element.>getProperty(Property.GRID_TEMPLATE_COLUMNS); + Assertions.assertEquals(4, actualColValues.size()); + + Assertions.assertEquals(GridValue.ValueType.MINMAX, actualColValues.get(0).getType()); + Assertions.assertEquals(GridValue.ValueType.MIN_CONTENT, ((MinMaxValue)actualColValues.get(0)).getMin().getType()); + Assertions.assertEquals(GridValue.ValueType.FLEX, ((MinMaxValue)actualColValues.get(0)).getMax().getType()); + Assertions.assertEquals(GridValue.ValueType.FIT_CONTENT, actualColValues.get(1).getType()); + Assertions.assertEquals(GridValue.ValueType.PERCENT, ((FitContentValue)actualColValues.get(1)).getLength().getType()); + Assertions.assertEquals(GridValue.ValueType.FIT_CONTENT, actualColValues.get(2).getType()); + Assertions.assertEquals(GridValue.ValueType.POINT, ((FitContentValue)actualColValues.get(2)).getLength().getType()); + Assertions.assertEquals(GridValue.ValueType.FIXED_REPEAT, actualColValues.get(3).getType()); + Assertions.assertEquals(GridValue.ValueType.FIT_CONTENT, ((FixedRepeatValue)actualColValues.get(3)).getValues().get(0).getType()); + + List actualRowValues = element.>getProperty(Property.GRID_TEMPLATE_ROWS); + Assertions.assertEquals(2, actualRowValues.size()); + + Assertions.assertEquals(GridValue.ValueType.FIXED_REPEAT, actualRowValues.get(0).getType()); + Assertions.assertEquals(GridValue.ValueType.POINT, ((FixedRepeatValue)actualRowValues.get(0)).getValues().get(0).getType()); + Assertions.assertEquals(GridValue.ValueType.AUTO_REPEAT, actualRowValues.get(1).getType()); + Assertions.assertEquals(GridValue.ValueType.MINMAX, ((AutoRepeatValue)actualRowValues.get(1)).getValues().get(0).getType()); + } + + @Test + public void containerGapValuesTest() { + Map cssProps = new HashMap<>(); + cssProps.put(CssConstants.COLUMN_GAP, "11px"); + cssProps.put(CssConstants.ROW_GAP, "30%"); + IElement element = new Div(); + GridApplierUtil.applyGridContainerProperties(cssProps, element, new ProcessorContext(new ConverterProperties())); + Assertions.assertEquals(8.25f, element.getProperty(Property.COLUMN_GAP)); + Assertions.assertEquals(30, element.getProperty(Property.ROW_GAP)); + } + + @Test + public void containerGridGapValuesTest() { + Map cssProps = new HashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_GAP, "11px"); + cssProps.put(CssConstants.GRID_ROW_GAP, "30%"); + IElement element = new Div(); + GridApplierUtil.applyGridContainerProperties(cssProps, element, new ProcessorContext(new ConverterProperties())); + Assertions.assertEquals(8.25f, element.getProperty(Property.COLUMN_GAP)); + Assertions.assertEquals(30, element.getProperty(Property.ROW_GAP)); + } + + @Test + public void columnFlowTest() { + Map cssProps = new HashMap<>(); + cssProps.put(CssConstants.GRID_AUTO_FLOW, CommonCssConstants.COLUMN); + IElement element = new Div(); + GridApplierUtil.applyGridContainerProperties(cssProps, element, new ProcessorContext(new ConverterProperties())); + Assertions.assertEquals(GridFlow.COLUMN, element.getProperty(Property.GRID_FLOW)); + } + + @Test + public void nullFlowTest() { + Map cssProps = new HashMap<>(); + IElement element = new Div(); + GridApplierUtil.applyGridContainerProperties(cssProps, element, new ProcessorContext(new ConverterProperties())); + Assertions.assertEquals(GridFlow.ROW, element.getProperty(Property.GRID_FLOW)); + } + + @Test + public void denseFlowTest() { + Map cssProps = new HashMap<>(); + cssProps.put(CssConstants.GRID_AUTO_FLOW, CssConstants.DENSE); + IElement element = new Div(); + GridApplierUtil.applyGridContainerProperties(cssProps, element, new ProcessorContext(new ConverterProperties())); + Assertions.assertEquals(GridFlow.ROW_DENSE, element.getProperty(Property.GRID_FLOW)); + } + + @Test + public void columnDenseFlowTest() { + Map cssProps = new HashMap<>(); + cssProps.put(CssConstants.GRID_AUTO_FLOW, CommonCssConstants.COLUMN + " " + CssConstants.DENSE); + IElement element = new Div(); + GridApplierUtil.applyGridContainerProperties(cssProps, element, new ProcessorContext(new ConverterProperties())); + Assertions.assertEquals(GridFlow.COLUMN_DENSE, element.getProperty(Property.GRID_FLOW)); + } + + @Test + public void invalidFlowTest() { + Map cssProps = new HashMap<>(); + cssProps.put(CssConstants.GRID_AUTO_FLOW, "some text"); + IElement element = new Div(); + GridApplierUtil.applyGridContainerProperties(cssProps, element, new ProcessorContext(new ConverterProperties())); + Assertions.assertEquals(GridFlow.ROW, element.getProperty(Property.GRID_FLOW)); + } + + @Test + public void customIndentTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, " a "); + cssProps.put(CssConstants.GRID_COLUMN_END, "c"); + cssProps.put(CssConstants.GRID_ROW_START, " a "); + cssProps.put(CssConstants.GRID_ROW_END, "c"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_COLUMNS, "[a] 10px [ b c d ] 10px [e f]"); + parentStyles.put(CssConstants.GRID_TEMPLATE_ROWS, "[f] 10px [ e d c ] 10px [b a]"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(3, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(2, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(2, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void customIndentNthTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, "2 a"); + cssProps.put(CssConstants.GRID_COLUMN_END, "3 a"); + cssProps.put(CssConstants.GRID_ROW_START, "2 c"); + cssProps.put(CssConstants.GRID_ROW_END, "d"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_COLUMNS, "[a] 10px [b] 10px [a] 10px [a]"); + parentStyles.put(CssConstants.GRID_TEMPLATE_ROWS, "[c] 10px [c] 10px [c]"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(2, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertNull(element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void customIndentNegativeTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, "-3 a"); + cssProps.put(CssConstants.GRID_COLUMN_END, "-1 a"); + cssProps.put(CssConstants.GRID_ROW_START, "-3 c"); + cssProps.put(CssConstants.GRID_ROW_END, "-1 c"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_COLUMNS, "[a] 10px [b] 10px [a] 10px [a]"); + parentStyles.put(CssConstants.GRID_TEMPLATE_ROWS, "[c] 10px [c] 10px [c]"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + @LogMessages(messages = @LogMessage( + messageTemplate = Html2PdfLogMessageConstant.ADDING_GRID_LINES_TO_THE_LEFT_OR_TOP_IS_NOT_SUPPORTED)) + public void customIndentOutOfBoundsTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, "a"); + cssProps.put(CssConstants.GRID_COLUMN_END, "5 a"); + cssProps.put(CssConstants.GRID_ROW_START, "-5 c"); + cssProps.put(CssConstants.GRID_ROW_END, "-1 c"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_COLUMNS, "[a] 10px [b] 10px [a] 10px [a]"); + parentStyles.put(CssConstants.GRID_TEMPLATE_ROWS, "[c] 10px [c] 10px [c]"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + // Null for row start as we don't support negative starts + Assertions.assertNull(element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(6, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void customIndentOutOfBounds2Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, "a"); + cssProps.put(CssConstants.GRID_COLUMN_END, "5 a"); + cssProps.put(CssConstants.GRID_ROW_START, "c"); + cssProps.put(CssConstants.GRID_ROW_END, "2 c"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_COLUMNS, "[a] 10px 10px [a] 10px [b]"); + parentStyles.put(CssConstants.GRID_TEMPLATE_ROWS, "10px 10px [c] 10px [a]"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(3, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(5, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(7, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void customIndentGridAreaTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_AREA, "c / a 2 / c -2 / 5 a"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_COLUMNS, "[a] 10px [b] 10px [a] 10px [a]"); + parentStyles.put(CssConstants.GRID_TEMPLATE_ROWS, "[c] 10px [c] 10px [c]"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(2, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(6, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void customIndentSpan1Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, "a"); + cssProps.put(CssConstants.GRID_COLUMN_END, "span 2 a"); + cssProps.put(CssConstants.GRID_ROW_START, "span c"); + cssProps.put(CssConstants.GRID_ROW_END, "4"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_COLUMNS, "[a] 10px 10px [a] 10px [b]"); + parentStyles.put(CssConstants.GRID_TEMPLATE_ROWS, "10px 10px [c] 10px [a]"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(3, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(5, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void customIndentSpan2Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, "2 a"); + cssProps.put(CssConstants.GRID_COLUMN_END, "span 2 a"); + cssProps.put(CssConstants.GRID_ROW_START, "span 2 c"); + cssProps.put(CssConstants.GRID_ROW_END, "4"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_COLUMNS, "[a] 10px 10px [a] 10px [b]"); + parentStyles.put(CssConstants.GRID_TEMPLATE_ROWS, "10px 10px [c] 10px [a]"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + // Null for row start as we don't support negative starts + Assertions.assertNull(element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(6, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void customIndentSpan3Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, " 2 a-a"); + cssProps.put(CssConstants.GRID_COLUMN_END, "span 2 a-a"); + cssProps.put(CssConstants.GRID_ROW_START, "span 2 c"); + cssProps.put(CssConstants.GRID_ROW_END, "4"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_COLUMNS, "[a-a] 10px 10px [a-a] 10px [b-a]"); + parentStyles.put(CssConstants.GRID_TEMPLATE_ROWS, "10px 10px [c] 10px [a]"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + // Null for row start as we don't support negative starts + Assertions.assertNull(element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(6, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void gridAreaLinenamesTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, "a-start"); + cssProps.put(CssConstants.GRID_COLUMN_END, "span c-end 2"); + cssProps.put(CssConstants.GRID_ROW_START, "span a-start"); + cssProps.put(CssConstants.GRID_ROW_END, "c-end -1"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_AREAS, "'a a a b b c c c' 'a a a b b c c c' 'a a a b b c c c'"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + // Null for row start as we don't support negative starts + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(4, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(10, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void lineNamesInRepeatTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, "4 a"); + cssProps.put(CssConstants.GRID_COLUMN_END, "b 4"); + cssProps.put(CssConstants.GRID_ROW_START, "span start"); + cssProps.put(CssConstants.GRID_ROW_END, "c 2"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_COLUMNS, "[a] repeat(3, [a st] 10px 10px [a] 10px [b])"); + parentStyles.put(CssConstants.GRID_TEMPLATE_ROWS, "[start] repeat(2, 10px 10px [c] 10px [a])"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(1, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(6, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(6, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(11, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + public void lineNamesInRepeat2Test() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, "3 a"); + cssProps.put(CssConstants.GRID_COLUMN_END, "span nd 3"); + cssProps.put(CssConstants.GRID_ROW_START, "span c"); + cssProps.put(CssConstants.GRID_ROW_END, "a 8"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_COLUMNS, + "[a] 10px repeat( 2, 10px 10px [a] 10px [b]) repeat(3, [nd] auto)"); + parentStyles.put(CssConstants.GRID_TEMPLATE_ROWS, + "[start] 10px repeat( 5, 10px 10px [c] 10px [a]) auto [a] auto [a]"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(16, element.getProperty(Property.GRID_ROW_START)); + Assertions.assertEquals(7, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(20, element.getProperty(Property.GRID_ROW_END)); + Assertions.assertEquals(10, element.getProperty(Property.GRID_COLUMN_END)); + } + + @Test + @LogMessages(messages = @LogMessage( + messageTemplate = Html2PdfLogMessageConstant.LINENAMES_ARE_NOT_SUPPORTED_WITHIN_AUTO_REPEAT, count = 2)) + public void lineNamesInAutoRepeatTest() { + Map cssProps = new LinkedHashMap<>(); + cssProps.put(CssConstants.GRID_COLUMN_START, "a"); + cssProps.put(CssConstants.GRID_COLUMN_END, "c"); + Div element = new Div(); + IElementNode stylesContainer = createStylesContainer(); + Map parentStyles = ((JsoupElementNode) stylesContainer.parentNode()).getStyles(); + parentStyles.put(CssConstants.GRID_TEMPLATE_COLUMNS, "repeat(auto-fill, [a] 10%) [b] repeat(auto-fit, 1fr) [c]"); + GridContainer grid = new GridContainer(); + grid.add(element); + GridApplierUtil.applyGridItemProperties(cssProps, stylesContainer, element); + GridApplierUtil.applyGridContainerProperties(parentStyles, grid, new ProcessorContext(new ConverterProperties())); + + Assertions.assertEquals(1, element.getProperty(Property.GRID_COLUMN_START)); + Assertions.assertEquals(3, element.getProperty(Property.GRID_COLUMN_END)); + } + + private IElementNode createStylesContainer() { + Element element = new Element(com.itextpdf.styledxmlparser.jsoup.parser.Tag.valueOf("div"), ""); + Element parentElement = new Element(com.itextpdf.styledxmlparser.jsoup.parser.Tag.valueOf("div"), ""); + parentElement.appendChild(element); + IElementNode node = new JsoupElementNode(element); + IElementNode parentNode = new JsoupElementNode(parentElement); + parentNode.addChild(node); + Map styles = new HashMap<>(); + styles.put(CssConstants.DISPLAY, CssConstants.GRID); + parentNode.setStyles(styles); + + return node; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtilTest.java b/src/test/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtilTest.java index d75bf2e12..4e5b4fbd5 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtilTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/apply/util/OutlineApplierUtilTest.java @@ -26,13 +26,12 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.colors.DeviceCmyk; import com.itextpdf.layout.borders.Border; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class OutlineApplierUtilTest extends ExtendedITextTest { @Test @@ -40,7 +39,7 @@ public void grooveBorderColorTest() { Border border = OutlineApplierUtil.getCertainBorder("10px", "groove", "device-cmyk(0, 81%, 81%, 30%", 12.0f, 12.0f); Color expected = new DeviceCmyk(0, 81, 81, 30); - Assert.assertEquals(expected, border.getColor()); + Assertions.assertEquals(expected, border.getColor()); } @Test @@ -48,7 +47,7 @@ public void ridgeBorderColorTest() { Border border = OutlineApplierUtil.getCertainBorder("10px", "ridge", "device-cmyk(0, 81%, 81%, 30%", 12.0f, 12.0f); Color expected = new DeviceCmyk(0, 81, 81, 30); - Assert.assertEquals(expected, border.getColor()); + Assertions.assertEquals(expected, border.getColor()); } @Test @@ -56,7 +55,7 @@ public void insetBorderColorTest() { Border border = OutlineApplierUtil.getCertainBorder("10px", "inset", "device-cmyk(0, 81%, 81%, 30%", 12.0f, 12.0f); Color expected = new DeviceCmyk(0, 81, 81, 30); - Assert.assertEquals(expected, border.getColor()); + Assertions.assertEquals(expected, border.getColor()); } @Test @@ -64,7 +63,7 @@ public void outsetBorderColorTest() { Border border = OutlineApplierUtil.getCertainBorder("10px", "outset", "device-cmyk(0, 81%, 81%, 30%", 12.0f, 12.0f); Color expected = new DeviceCmyk(0, 81, 81, 30); - Assert.assertEquals(expected, border.getColor()); + Assertions.assertEquals(expected, border.getColor()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/apply/util/TextDecorationApplierUtilTest.java b/src/test/java/com/itextpdf/html2pdf/css/apply/util/TextDecorationApplierUtilTest.java index 8af3c094a..37bbba2fd 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/apply/util/TextDecorationApplierUtilTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/apply/util/TextDecorationApplierUtilTest.java @@ -27,17 +27,16 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.node.IElementNode; import com.itextpdf.styledxmlparser.node.INode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class TextDecorationApplierUtilTest extends ExtendedITextTest { private static IElementNode createNewNode(IElementNode parent, String color, String line, String decorationStyle) { @@ -62,9 +61,9 @@ public void textDecorationHasNoParentShouldNotAlterStyles() { IElementNode node = createNewNode(null, color, line, style); TextDecorationApplierUtil.propagateTextDecorationProperties(node); - Assert.assertEquals(color, node.getStyles().get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(line, node.getStyles().get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(style, node.getStyles().get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(color, node.getStyles().get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(line, node.getStyles().get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(style, node.getStyles().get(CssConstants.TEXT_DECORATION_STYLE)); } @Test @@ -81,9 +80,9 @@ public void parentNodeHasNoStyleMapDoesNothing() { parent.addChild(child1); TextDecorationApplierUtil.propagateTextDecorationProperties(child1); Map childStyles = child1.getStyles(); - Assert.assertEquals(colorChild1, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(lineChild1, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(styleChild1, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(colorChild1, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(lineChild1, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(styleChild1, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); } @@ -100,9 +99,9 @@ public void parentNoStyleAtAllDoesNotImpactChild() { parent.addChild(child1); TextDecorationApplierUtil.propagateTextDecorationProperties(child1); Map childStyles = child1.getStyles(); - Assert.assertEquals(colorChild1, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(lineChild1, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(styleChild1, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(colorChild1, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(lineChild1, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(styleChild1, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); } @Test @@ -125,9 +124,9 @@ public void parentOnlyHasColorChildStylesShouldBeMerged() { String expectedLineChild = "line-under"; String expectedStyleChild = "solid"; - Assert.assertEquals(expectedColorChild, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(expectedLineChild, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(expectedStyleChild, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(expectedColorChild, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(expectedLineChild, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(expectedStyleChild, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); } @Test @@ -148,9 +147,9 @@ public void parentOnlyHasLineOnlyChildStylesShouldBeMerged() { String expectedLineChild = "line-through line-under"; String expectedStyleChild = "solid solid"; - Assert.assertEquals(expectedColorChild, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(expectedLineChild, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(expectedStyleChild, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(expectedColorChild, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(expectedLineChild, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(expectedStyleChild, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); } @Test @@ -171,9 +170,9 @@ public void parentOnlyHasDecorationOnlyChildStylesShouldBeMerged() { String expectedLineChild = "line-under"; String expectedStyleChild = "solid"; - Assert.assertEquals(expectedColorChild, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(expectedLineChild, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(expectedStyleChild, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(expectedColorChild, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(expectedLineChild, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(expectedStyleChild, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); } @Test @@ -198,9 +197,9 @@ public void textDecorationShouldBeAppliedToChild() { String expectedColorChild = "red yellow"; String expectedLineChild = "line-through line-under"; String expectedStyleChild = "solid solid"; - Assert.assertEquals(expectedColorChild, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(expectedLineChild, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(expectedStyleChild, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(expectedColorChild, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(expectedLineChild, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(expectedStyleChild, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); } @Test @@ -216,9 +215,9 @@ public void textDecorationShouldBeAppliedToChildWithoutDuplicates() { TextDecorationApplierUtil.propagateTextDecorationProperties(child1); Map childStyles = child1.getStyles(); - Assert.assertEquals(colorParent, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(lineParent, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(styleParent, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(colorParent, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(lineParent, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(styleParent, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); } @Test @@ -242,9 +241,9 @@ public void textDecorationOneColor2StylesShouldBeAppliedToChild() { String expectedColorChild = "red red yellow"; String expectedLineChild = "line-through line-over line-under"; String expectedStyleChild = "solid solid solid"; - Assert.assertEquals(expectedColorChild, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(expectedLineChild, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(expectedStyleChild, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(expectedColorChild, childStyles.get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(expectedLineChild, childStyles.get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(expectedStyleChild, childStyles.get(CssConstants.TEXT_DECORATION_STYLE)); } @Test @@ -273,9 +272,9 @@ public void textDecorationShouldBeAppliedToChildAndSubChild() { String expectedColorChild = "red yellow"; String expectedLineChild = "line-through line-under"; String expectedStyleChild = "solid solid"; - Assert.assertEquals(expectedColorChild, child1Styles.get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(expectedLineChild, child1Styles.get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(expectedStyleChild, child1Styles.get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(expectedColorChild, child1Styles.get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(expectedLineChild, child1Styles.get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(expectedStyleChild, child1Styles.get(CssConstants.TEXT_DECORATION_STYLE)); TextDecorationApplierUtil.propagateTextDecorationProperties(subChild1); @@ -283,9 +282,9 @@ public void textDecorationShouldBeAppliedToChildAndSubChild() { String expectedColorSubChild = "red yellow pink"; String expectedLineSubChild = "line-through line-under line-over"; String expectedStyleSubChild = "solid solid solid"; - Assert.assertEquals(expectedColorSubChild, child1Styles.get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(expectedLineSubChild, child1Styles.get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(expectedStyleSubChild, child1Styles.get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(expectedColorSubChild, child1Styles.get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(expectedLineSubChild, child1Styles.get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(expectedStyleSubChild, child1Styles.get(CssConstants.TEXT_DECORATION_STYLE)); } @Test @@ -302,9 +301,9 @@ public void textDecorationShouldBeAppliedToChildAndSubChildWhenSecondChildDoesnt String expectedColorChild = "red"; String expectedLineChild = "line-through"; String expectedStyleChild = "solid"; - Assert.assertEquals(expectedColorChild, child1Styles.get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(expectedLineChild, child1Styles.get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(expectedStyleChild, child1Styles.get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(expectedColorChild, child1Styles.get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(expectedLineChild, child1Styles.get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(expectedStyleChild, child1Styles.get(CssConstants.TEXT_DECORATION_STYLE)); final String colorSubChild1 = "pink"; final String lineSubChild1 = "line-over"; @@ -318,9 +317,9 @@ public void textDecorationShouldBeAppliedToChildAndSubChildWhenSecondChildDoesnt String expectedColorSubChild = "red pink"; String expectedLineSubChild = "line-through line-over"; String expectedStyleSubChild = "solid solid"; - Assert.assertEquals(expectedColorSubChild, child1Styles.get(CssConstants.TEXT_DECORATION_COLOR)); - Assert.assertEquals(expectedLineSubChild, child1Styles.get(CssConstants.TEXT_DECORATION_LINE)); - Assert.assertEquals(expectedStyleSubChild, child1Styles.get(CssConstants.TEXT_DECORATION_STYLE)); + Assertions.assertEquals(expectedColorSubChild, child1Styles.get(CssConstants.TEXT_DECORATION_COLOR)); + Assertions.assertEquals(expectedLineSubChild, child1Styles.get(CssConstants.TEXT_DECORATION_LINE)); + Assertions.assertEquals(expectedStyleSubChild, child1Styles.get(CssConstants.TEXT_DECORATION_STYLE)); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/grid/GridAreaTest.java b/src/test/java/com/itextpdf/html2pdf/css/grid/GridAreaTest.java new file mode 100644 index 000000000..e7b42a29e --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/grid/GridAreaTest.java @@ -0,0 +1,165 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.grid; + +import com.itextpdf.html2pdf.ConverterProperties; +import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +import java.io.IOException; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; + +@Tag("IntegrationTest") +public class GridAreaTest extends ExtendedHtmlConversionITextTest { + public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/"; + public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/grid/GridAreaTest/"; + + + @BeforeAll + public static void beforeClass() { + createOrClearDestinationFolder(DESTINATION_FOLDER); + } + + @Test + public void basicGridArea1Test() throws IOException, InterruptedException { + runTest("basicGridArea1"); + } + + @Test + public void basicGridArea2Test() throws IOException, InterruptedException { + runTest("basicGridArea2"); + } + + @Test + public void templateAreasBasicTest() throws IOException, InterruptedException { + runTest("templateAreasBasic"); + } + + @Test + public void templateAreasShorthandBasicTest() throws IOException, InterruptedException { + runTest("templateAreasShorthandBasic"); + } + + @Test + public void templateAreasShorthandAdvancedTest() throws IOException, InterruptedException { + runTest("templateAreasShorthandAdvanced"); + } + + @Test + public void gridShorthandAdvancedTest() throws IOException, InterruptedException { + runTest("gridShorthandAdvanced"); + } + + @Test + public void templateShorthandWithoutLineNamesTest() throws IOException, InterruptedException { + runTest("templateShorthandWithoutLineNames"); + } + + @Test + public void templateAreasInvalidNameTest() throws IOException, InterruptedException { + runTest("templateAreasInvalidName"); + } + + @Test + public void templateAreasWithDotsTest() throws IOException, InterruptedException { + runTest("templateAreasWithDots"); + } + + @Test + public void templateAreasSwitchedPlacesTest() throws IOException, InterruptedException { + runTest("grid-area-switched-places"); + } + + @Test + public void differentRowSpanTest() throws IOException, InterruptedException { + runTest("differentRowSpanTest"); + } + + @Test + public void borderBoxTest() throws IOException, InterruptedException { + runTest("borderBoxTest"); + } + + @Test + public void borderBoxTest2() throws IOException, InterruptedException { + runTest("borderBoxTest2"); + } + + @Test + public void differentRowSpanOnSplitTest() throws IOException, InterruptedException { + runTest("differentRowSpanOnSplitTest"); + } + + @Test + public void differentRowSpanOnSplitTest2() throws IOException, InterruptedException { + runTest("differentRowSpanOnSplitTest2"); + } + + @Test + public void differentRowSpanWithGaps50OnSplitTest() throws IOException, InterruptedException { + runTest("differentRowSpanWithGaps50OnSplitTest"); + } + + @Test + public void differentRowSpanWithGaps100OnSplitTest() throws IOException, InterruptedException { + runTest("differentRowSpanWithGaps100OnSplitTest"); + } + + @Test + public void splitOn2ndRowGapTest() throws IOException, InterruptedException { + runTest("splitOn2ndRowGapTest"); + } + + @Test + @LogMessages(messages = @LogMessage(messageTemplate = Html2PdfLogMessageConstant.GRID_TEMPLATE_AREAS_IS_INVALID)) + public void invalidTemplateAreasTest() throws IOException, InterruptedException { + runTest("invalidTemplateAreas"); + } + + @Test + public void templateAreasStartAutoTest() throws IOException, InterruptedException { + runTest("templateAreasStartAuto"); + } + + @Test + public void templateAreasStartTest() throws IOException, InterruptedException { + // Here browser result seems strange. We specified only row starts but it somehow applies to column starts also. + // I'd expect the same result as for templateAreasStartAutoTest + runTest("templateAreasStart"); + } + + @Test + public void templateAreasStartEndTest() throws IOException, InterruptedException { + runTest("templateAreasStartEnd"); + } + + private void runTest(String testName) throws IOException, InterruptedException { + convertToPdfAndCompare(testName, + SOURCE_FOLDER, DESTINATION_FOLDER, false, + new ConverterProperties().setBaseUri(SOURCE_FOLDER)); + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/grid/GridGapTest.java b/src/test/java/com/itextpdf/html2pdf/css/grid/GridGapTest.java new file mode 100644 index 000000000..e26e1d946 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/grid/GridGapTest.java @@ -0,0 +1,209 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.grid; + +import com.itextpdf.html2pdf.ConverterProperties; +import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +import java.io.IOException; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; + +@Tag("IntegrationTest") +public class GridGapTest extends ExtendedHtmlConversionITextTest { + public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/"; + public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/grid/GridGapTest/"; + + @BeforeAll + public static void beforeClass() { + createOrClearDestinationFolder(DESTINATION_FOLDER); + } + + @Test + public void templateColsGapTest() throws IOException, InterruptedException { + runTest("template_cols_gap"); + } + + @Test + public void templateColsColGapTest() throws IOException, InterruptedException { + runTest("template_cols_col_gap"); + } + + @Test + public void template_rowsRowGapTest() throws IOException, InterruptedException { + runTest("template_rows_row_gap"); + } + + @Test + public void templateRowsGapTest() throws IOException, InterruptedException { + runTest("template_rows_gap"); + } + + @Test + public void templateRowsColsGapTest() throws IOException, InterruptedException { + runTest("template_rows_cols_gap"); + } + + @Test + public void templateRowsColsAutoRowsGapTest() throws IOException, InterruptedException { + runTest("template_rows_cols_auto_rows_gap"); + } + + @Test + public void templateRowsColsAutoColsGapTest() throws IOException, InterruptedException { + runTest("template_rows_cols_auto_cols_gap"); + } + + @Test + public void templateRowsColsBigCellGapTest1() throws IOException, InterruptedException { + runTest("template_rows_cols_big_cell_gap_1"); + } + + @Test + public void templateRowsColsBigCellGapTest2() throws IOException, InterruptedException { + runTest("template_rows_cols_big_cell_gap_2"); + } + + @Test + public void templateRowsColsVertCellGapTest1() throws IOException, InterruptedException { + runTest("template_rows_cols_vert_cell_gap_1"); + } + + @Test + public void templateRowsColsVertCellGapTest2() throws IOException, InterruptedException { + runTest("template_rows_cols_vert_cell_gap_2"); + } + + @Test + public void templateRowsColsHorzCellGapTest1() throws IOException, InterruptedException { + runTest("template_rows_cols_horz_cell_gap_1"); + } + + @Test + public void templateRowsColsHorzCellGapTest2() throws IOException, InterruptedException { + runTest("template_rows_cols_horz_cell_gap_2"); + } + + @Test + public void templateRowsColsFewBigCellGapTest1() throws IOException, InterruptedException { + runTest("template_rows_cols_few_big_cell_gap_1"); + } + + @Test + public void templateRowsColsFewBigCellGapTest2() throws IOException, InterruptedException { + runTest("template_rows_cols_few_big_cell_gap_2"); + } + + @Test + @LogMessages(messages = @LogMessage(messageTemplate = Html2PdfLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION, count = 2)) + public void diffUnitsTest() throws IOException, InterruptedException { + runTest("diff_units"); + } + + @Test + public void floatGapValueTest() throws IOException, InterruptedException { + runTest("float_gap_value"); + } + + @Test + public void largeColGapValueTest() throws IOException, InterruptedException { + runTest("large_col_gap_value"); + } + + @Test + public void largeRowGapValueTest() throws IOException, InterruptedException { + runTest("large_row_gap_value"); + } + + @Test + public void largeGapValueTest() throws IOException, InterruptedException { + runTest("large_gap_value"); + } + + @Test + public void marginTest() throws IOException, InterruptedException { + runTest("margin"); + } + + @Test + public void paddingTest() throws IOException, InterruptedException { + runTest("padding"); + } + + @Test + @LogMessages(messages = @LogMessage(messageTemplate = Html2PdfLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION)) + public void negativeColGapValueTest() throws IOException, InterruptedException { + runTest("negative_col_gap_value"); + } + + @Test + @LogMessages(messages = @LogMessage(messageTemplate = Html2PdfLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION)) + public void negativeRowGapValueTest() throws IOException, InterruptedException { + runTest("negative_row_gap_value"); + } + + @Test + @LogMessages(messages = @LogMessage(messageTemplate = Html2PdfLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION)) + public void negativeGapValueTest() throws IOException, InterruptedException { + runTest("negative_gap_value"); + } + + @Test + public void smallValuesGapTest() throws IOException, InterruptedException { + runTest("small_values_gap"); + } + + @Test + public void differentRowsColsGapTest() throws IOException, InterruptedException { + runTest("different_rows_cols_gap"); + } + + @Test + public void gridGapTest1() throws IOException, InterruptedException { + runTest("gridGapTest1"); + } + + @Test + public void gridGapTest2() throws IOException, InterruptedException { + runTest("gridGapTest2"); + } + + @Test + public void gridColumnGapTest() throws IOException, InterruptedException { + runTest("gridColumnGapTest"); + } + + @Test + public void gridRowGapTest() throws IOException, InterruptedException { + runTest("gridRowGapTest"); + } + + private void runTest(String testName) throws IOException, InterruptedException { + convertToPdfAndCompare(testName, SOURCE_FOLDER, DESTINATION_FOLDER, false, + new ConverterProperties().setBaseUri(SOURCE_FOLDER)); + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest.java b/src/test/java/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest.java new file mode 100644 index 000000000..0118d90cf --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest.java @@ -0,0 +1,229 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.grid; + +import com.itextpdf.html2pdf.ConverterProperties; +import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; +import com.itextpdf.layout.exceptions.LayoutExceptionMessageConstant; + +import java.io.IOException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; + +@Tag("IntegrationTest") +public class GridItemPlacementTest extends ExtendedHtmlConversionITextTest { + public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/"; + public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/"; + + @BeforeAll + public static void beforeClass() { + createOrClearDestinationFolder(DESTINATION_FOLDER); + } + + @Test + public void colStartEnd1Test() throws IOException, InterruptedException { + runTest("colStartEnd1"); + } + + @Test + public void colStartEnd2Test() throws IOException, InterruptedException { + runTest("colStartEnd2"); + } + + @Test + public void colStartEnd3Test() throws IOException, InterruptedException { + runTest("colStartEnd3"); + } + + @Test + public void colStartEnd4Test() throws IOException, InterruptedException { + runTest("colStartEnd4"); + } + + @Test + public void colStartEnd5Test() throws IOException, InterruptedException { + runTest("colStartEnd5"); + } + + @Test + public void fewCellsPlacement1Test() throws IOException, InterruptedException { + runTest("fewCellsPlacement1"); + } + + @Test + public void fewCellsPlacement2Test() throws IOException, InterruptedException { + runTest("fewCellsPlacement2"); + } + + @Test + public void fewCellsPlacement3Test() throws IOException, InterruptedException { + runTest("fewCellsPlacement3"); + } + + @Test + public void fewCellsPlacement4Test() throws IOException, InterruptedException { + runTest("fewCellsPlacement4"); + } + + @Test + public void fewCellsPlacement5Test() throws IOException, InterruptedException { + runTest("fewCellsPlacement5"); + } + + @Test + public void fewCellsPlacement6Test() throws IOException, InterruptedException { + runTest("fewCellsPlacement6"); + } + + @Test + public void fewCellsPlacement7Test() throws IOException, InterruptedException { + runTest("fewCellsPlacement7"); + } + + @Test + public void rowStartEnd1Test() throws IOException, InterruptedException { + runTest("rowStartEnd1"); + } + + @Test + public void rowStartEnd2Test() throws IOException, InterruptedException { + runTest("rowStartEnd2"); + } + + @Test + public void rowStartEnd3Test() throws IOException, InterruptedException { + runTest("rowStartEnd3"); + } + + @Test + public void rowStartEnd4Test() throws IOException, InterruptedException { + runTest("rowStartEnd4"); + } + + @Test + public void twoColumnSpans1Test() throws IOException, InterruptedException { + runTest("twoColumnSpans1"); + } + + @Test + public void twoColumnSpans2Test() throws IOException, InterruptedException { + runTest("twoColumnSpans2"); + } + + @Test + public void twoColumnSpans3Test() throws IOException, InterruptedException { + runTest("twoColumnSpans3"); + } + + @Test + public void twoRowSpans1Test() throws IOException, InterruptedException { + runTest("twoRowSpans1"); + } + + @Test + public void twoRowSpans2Test() throws IOException, InterruptedException { + runTest("twoRowSpans2"); + } + + @Test + public void twoRowSpans3Test() throws IOException, InterruptedException { + runTest("twoRowSpans3"); + } + + @Test + public void spanToNegativeStartTest() throws IOException, InterruptedException { + runTest("spanToNegativeStartTest"); + } + + @Test + public void spanToNegativeStartWithExplicitTemplatesTest() throws IOException, InterruptedException { + runTest("spanToNegativeStartWithExplicitTemplatesTest"); + } + + @Test + public void spanToNegativeStartWithoutTemplatesTest() throws IOException, InterruptedException { + runTest("spanToNegativeStartWithoutTemplatesTest"); + } + + @Test + public void spanToNegativeStartWithoutTemplatesTest2() throws IOException, InterruptedException { + runTest("spanToNegativeStartWithoutTemplatesTest2"); + } + + @Test + public void spanToNegativeStartWithSingleTemplateTest() throws IOException, InterruptedException { + runTest("spanToNegativeStartWithSingleTemplateTest"); + } + + @Test + public void columnSpanExpandsStartToNegativeTest() throws IOException, InterruptedException { + runTest("columnSpanExpandsStartToNegativeTest"); + } + + @Test + public void negativeIndexOutOfTemplateTest() throws IOException, InterruptedException { + runTest("negativeIndexOutOfTemplateTest"); + } + + @Test + public void negativeIndexWithImplicitLinesTest() throws IOException, InterruptedException { + runTest("negativeIndexWithImplicitLinesTest"); + } + + @Test + public void negativeIndexWithoutTemplateTest() throws IOException, InterruptedException { + runTest("negativeIndexWithoutTemplateTest"); + } + + @Test + public void negativeIndexShorthandTest() throws IOException, InterruptedException { + runTest("negativeIndexShorthandTest"); + } + + @Test + public void negativeAndPositiveIndexShorthandTest() throws IOException, InterruptedException { + runTest("negativeAndPositiveIndexShorthandTest"); + } + + @Test + public void spanToNegativeIndexWithoutTemplateTest() throws IOException, InterruptedException { + runTest("spanToNegativeIndexWithoutTemplateTest"); + } + + @Test + public void noTemplate1Test() throws IOException, InterruptedException { + runTest("noTemplate1"); + } + + @Test + public void noTemplate2Test() throws IOException, InterruptedException { + runTest("noTemplate2"); + } + + private void runTest(String testName) throws IOException, InterruptedException { + convertToPdfAndCompare(testName, SOURCE_FOLDER, DESTINATION_FOLDER, false, + new ConverterProperties().setBaseUri(SOURCE_FOLDER)); + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/grid/GridLinenameTest.java b/src/test/java/com/itextpdf/html2pdf/css/grid/GridLinenameTest.java new file mode 100644 index 000000000..65cc9274a --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/grid/GridLinenameTest.java @@ -0,0 +1,104 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.grid; + +import com.itextpdf.html2pdf.ConverterProperties; +import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; + +import java.io.IOException; + +@Tag("IntegrationTest") +public class GridLinenameTest extends ExtendedHtmlConversionITextTest { + public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/"; + public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/grid/GridLinenameTest/"; + + + @BeforeAll + public static void beforeClass() { + createOrClearDestinationFolder(DESTINATION_FOLDER); + } + + @Test + public void linenamesCombinedTest() throws IOException, InterruptedException { + runTest("linenamesCombined"); + } + + @Test + public void linenameSpanTest() throws IOException, InterruptedException { + runTest("linenameSpan"); + } + + @Test + public void linenameNthTest() throws IOException, InterruptedException { + runTest("linenameNth"); + } + + @Test + public void duplicateLineNamesTest() throws IOException, InterruptedException { + runTest("duplicateLineNames"); + } + + @Test + public void linenameGridAreaTest() throws IOException, InterruptedException { + runTest("linenameGridArea"); + } + + @Test + public void customIndentSpanTest() throws IOException, InterruptedException { + runTest("customIndentSpan"); + } + + @Test + public void customIndentTrickySpanTest() throws IOException, InterruptedException { + runTest("customIndentTrickySpan"); + } + + @Test + public void templateAreasNamesTest() throws IOException, InterruptedException { + runTest("templateAreasNames"); + } + + @Test + public void linenameRepeatTest() throws IOException, InterruptedException { + runTest("linenameRepeat"); + } + + @Test + @LogMessages(messages = @LogMessage( + messageTemplate = Html2PdfLogMessageConstant.LINENAMES_ARE_NOT_SUPPORTED_WITHIN_AUTO_REPEAT)) + public void linenameAutoRepeatTest() throws IOException, InterruptedException { + runTest("linenameAutoRepeat"); + } + + private void runTest(String testName) throws IOException, InterruptedException { + convertToPdfAndCompare(testName, + SOURCE_FOLDER, DESTINATION_FOLDER, false, + new ConverterProperties().setBaseUri(SOURCE_FOLDER)); + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest.java b/src/test/java/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest.java new file mode 100644 index 000000000..ffc46f827 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest.java @@ -0,0 +1,355 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.grid; + +import com.itextpdf.html2pdf.ConverterProperties; +import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; +import com.itextpdf.layout.exceptions.LayoutExceptionMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +import java.io.IOException; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; + +@Tag("IntegrationTest") +public class GridRelativeValuesTest extends ExtendedHtmlConversionITextTest { + public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/"; + public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/"; + + @BeforeAll + public static void beforeClass() { + createOrClearDestinationFolder(DESTINATION_FOLDER); + } + + @Test + public void bothAxis1Test() throws IOException, InterruptedException { + runTest("bothAxis1"); + } + + @Test + public void bothAxis2Test() throws IOException, InterruptedException { + runTest("bothAxis2"); + } + + @Test + public void bothAxis3Test() throws IOException, InterruptedException { + runTest("bothAxis3"); + } + + @Test + public void bothAxis4Test() throws IOException, InterruptedException { + runTest("bothAxis4"); + } + + @Test + public void bothAxis5Test() throws IOException, InterruptedException { + runTest("bothAxis5"); + } + + @Test + public void bothAxis6Test() throws IOException, InterruptedException { + runTest("bothAxis6"); + } + + @Test + public void bothAxis7Test() throws IOException, InterruptedException { + runTest("bothAxis7"); + } + + @Test + public void bothAxis8Test() throws IOException, InterruptedException { + runTest("bothAxis8"); + } + + @Test + public void bothAxis9Test() throws IOException, InterruptedException { + runTest("bothAxis9"); + } + + @Test + public void bothAxis10Test() throws IOException, InterruptedException { + runTest("bothAxis10"); + } + + @Test + public void bothAxis11Test() throws IOException, InterruptedException { + runTest("bothAxis11"); + } + + @Test + public void bothAxis12Test() throws IOException, InterruptedException { + runTest("bothAxis12"); + } + + @Test + public void bothAxis13Test() throws IOException, InterruptedException { + runTest("bothAxis13"); + } + + @Test + public void bothAxis14Test() throws IOException, InterruptedException { + runTest("bothAxis14"); + } + + @Test + public void bothAxis15Test() throws IOException, InterruptedException { + runTest("bothAxis15"); + } + + @Test + public void bothAxis16Test() throws IOException, InterruptedException { + runTest("bothAxis16"); + } + + @Test + public void bothAxis17Test() throws IOException, InterruptedException { + runTest("bothAxis17"); + } + + @Test + public void bothAxis18Test() throws IOException, InterruptedException { + runTest("bothAxis18"); + } + + @Test + public void bothAxis19Test() throws IOException, InterruptedException { + runTest("bothAxis19"); + } + + @Test + public void bothAxis20Test() throws IOException, InterruptedException { + runTest("bothAxis20"); + } + + @Test + public void bothAxis21Test() throws IOException, InterruptedException { + runTest("bothAxis21"); + } + + @Test + public void bothAxisOnlyFr1Test() throws IOException, InterruptedException { + runTest("bothAxisOnlyFr1"); + } + + @Test + public void bothAxisOnlyFr2Test() throws IOException, InterruptedException { + runTest("bothAxisOnlyFr2"); + } + + @Test + public void bothAxisOnlyFr3Test() throws IOException, InterruptedException { + runTest("bothAxisOnlyFr3"); + } + + @Test + public void bothAxisOnlyFr4Test() throws IOException, InterruptedException { + runTest("bothAxisOnlyFr4"); + } + + @Test + public void bothAxisOnlyFr5Test() throws IOException, InterruptedException { + runTest("bothAxisOnlyFr5"); + } + + @Test + public void bothAxisOnlyFr6Test() throws IOException, InterruptedException { + runTest("bothAxisOnlyFr6"); + } + + @Test + public void colAxis1Test() throws IOException, InterruptedException { + runTest("colAxis1"); + } + + @Test + public void colAxis2Test() throws IOException, InterruptedException { + runTest("colAxis2"); + } + + @Test + public void colAxis3Test() throws IOException, InterruptedException { + runTest("colAxis3"); + } + + @Test + public void colAxis4Test() throws IOException, InterruptedException { + runTest("colAxis4"); + } + + @Test + public void colAxis5Test() throws IOException, InterruptedException { + runTest("colAxis5"); + } + + @Test + public void colAxis6Test() throws IOException, InterruptedException { + runTest("colAxis6"); + } + + @Test + public void colAxis7Test() throws IOException, InterruptedException { + runTest("colAxis7"); + } + + @Test + public void colAxis8Test() throws IOException, InterruptedException { + runTest("colAxis8"); + } + + @Test + public void colAxis9Test() throws IOException, InterruptedException { + runTest("colAxis9"); + } + + @Test + public void colAxis10Test() throws IOException, InterruptedException { + runTest("colAxis10"); + } + + @Test + public void colAxis11Test() throws IOException, InterruptedException { + runTest("colAxis11"); + } + + @Test + public void rowAxis1Test() throws IOException, InterruptedException { + runTest("rowAxis1"); + } + + @Test + public void rowAxis2Test() throws IOException, InterruptedException { + runTest("rowAxis2"); + } + + @Test + public void rowAxis3Test() throws IOException, InterruptedException { + runTest("rowAxis3"); + } + + @Test + public void rowAxis4Test() throws IOException, InterruptedException { + runTest("rowAxis4"); + } + + @Test + public void rowAxis5Test() throws IOException, InterruptedException { + runTest("rowAxis5"); + } + + @Test + public void rowAxis6Test() throws IOException, InterruptedException { + runTest("rowAxis6"); + } + + @Test + public void rowAxis7Test() throws IOException, InterruptedException { + runTest("rowAxis7"); + } + + @Test + @LogMessages(messages = { + @LogMessage(messageTemplate = LayoutExceptionMessageConstant.GRID_AUTO_REPEAT_CANNOT_BE_COMBINED_WITH_INDEFINITE_SIZES, count = 2) + }) + public void minmaxAutoRepeat1Test() throws IOException, InterruptedException { + runTest("minmaxAutoRepeat1"); + } + + @Test + @LogMessages(messages = { + @LogMessage(messageTemplate = LayoutExceptionMessageConstant.GRID_AUTO_REPEAT_CANNOT_BE_COMBINED_WITH_INDEFINITE_SIZES, count = 2) + }) + public void minmaxAutoRepeat2Test() throws IOException, InterruptedException { + runTest("minmaxAutoRepeat2"); + } + + @Test + public void minmaxFitContent1Test() throws IOException, InterruptedException { + runTest("minmaxFitContent1"); + } + + @Test + public void minmaxFitContent2Test() throws IOException, InterruptedException { + runTest("minmaxFitContent2"); + } + + @Test + public void minmaxFitContentAutoRepeat1Test() throws IOException, InterruptedException { + runTest("minmaxFitContentAutoRepeat1"); + } + + @Test + @LogMessages(messages = { + @LogMessage(messageTemplate = LayoutExceptionMessageConstant.GRID_AUTO_REPEAT_CANNOT_BE_COMBINED_WITH_INDEFINITE_SIZES) + }) + public void minmaxFitContentAutoRepeat2Test() throws IOException, InterruptedException { + runTest("minmaxFitContentAutoRepeat2"); + } + + @Test + public void minmaxWithBothAxisSpan1Test() throws IOException, InterruptedException { + runTest("minmaxWithBothAxisSpan1"); + } + + @Test + public void minmaxWithBothAxisSpan2Test() throws IOException, InterruptedException { + runTest("minmaxWithBothAxisSpan2"); + } + + @Test + public void minmaxWithBothAxisSpan3Test() throws IOException, InterruptedException { + runTest("minmaxWithBothAxisSpan3"); + } + + @Test + public void minmaxWithContentAndFrTest() throws IOException, InterruptedException { + runTest("minmaxWithContentAndFr"); + } + + @Test + public void minmaxWithSpan1Test() throws IOException, InterruptedException { + runTest("minmaxWithSpan1"); + } + + @Test + public void minmaxWithSpan2Test() throws IOException, InterruptedException { + runTest("minmaxWithSpan2"); + } + + @Test + public void minmaxWithSpan3Test() throws IOException, InterruptedException { + runTest("minmaxWithSpan3"); + } + + @Test + public void minmaxWithSpan4Test() throws IOException, InterruptedException { + runTest("minmaxWithSpan4"); + } + + + private void runTest(String testName) throws IOException, InterruptedException { + convertToPdfAndCompare(testName, SOURCE_FOLDER, DESTINATION_FOLDER, false, + new ConverterProperties().setBaseUri(SOURCE_FOLDER)); + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest.java b/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest.java index cc900e61b..cb8cf90e0 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest.java @@ -24,22 +24,19 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ConverterProperties; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class GridTemplateColumnTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/"; - //TODO DEVSIX-3340 change cmp files when GRID LAYOUT is supported - - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -49,6 +46,11 @@ public void templateColumnBordersTest() throws IOException, InterruptedException runTest("template-cols-borders"); } + @Test + public void autoRowFixedTest() throws IOException, InterruptedException { + runTest("auto-cols-fixed"); + } + @Test public void templateColumnStartEndTest() throws IOException, InterruptedException { runTest("template-cols-column-start-end"); @@ -134,6 +136,16 @@ public void templateColumnBasicTest() throws IOException, InterruptedException { runTest("template-cols-without-other-props"); } + @Test + public void templateColumnBasicTest2() throws IOException, InterruptedException { + runTest("template-cols-without-other-props-2"); + } + + @Test + public void templateColumnWithFlexAndGapsTest() throws IOException, InterruptedException { + runTest("template-cols-with-flex-and-gaps"); + } + private void runTest(String testName) throws IOException, InterruptedException { convertToPdfAndCompare(testName, SOURCE_FOLDER, DESTINATION_FOLDER, false, diff --git a/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest.java b/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest.java index e9681eb25..1c607bdb8 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest.java @@ -24,21 +24,18 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ConverterProperties; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class GridTemplateCombinedTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/"; - //TODO DEVSIX-3340 change cmp files when GRID LAYOUT is supported - - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest.java b/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest.java new file mode 100644 index 000000000..970e1f1b3 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest.java @@ -0,0 +1,114 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.grid; + + +import com.itextpdf.html2pdf.ConverterProperties; +import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; +import com.itextpdf.layout.logs.LayoutLogMessageConstant; +import com.itextpdf.test.annotations.LogMessages; +import com.itextpdf.test.annotations.type.IntegrationTest; + +import java.io.IOException; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +@Category(IntegrationTest.class) +public class GridTemplateElementPropertyContainerTest extends ExtendedHtmlConversionITextTest { + public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/"; + public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/"; + + @BeforeClass + public static void beforeClass() { + createOrClearDestinationFolder(DESTINATION_FOLDER); + } + + @Test + public void backgroundItemsOnTopOfBackgroundGridTest() throws IOException, InterruptedException { + runTest("backgroundItemsOnTopOfBackgroundGrid"); + } + + + @Test + public void paddingAllSidesTest() throws IOException, InterruptedException { + runTest("paddingAll"); + } + + @Test + public void paddingAllSidesEmptyDivTest() throws IOException, InterruptedException { + runTest("padding_all_with_empty_div"); + } + + @Test + @LogMessages(messages = { + @com.itextpdf.test.annotations.LogMessage(messageTemplate = LayoutLogMessageConstant.ELEMENT_DOES_NOT_FIT_AREA, count = 1) + }) + public void paddingAllToBigForWidthTest() throws IOException, InterruptedException { + runTest("paddingAllToBigForWidth"); + } + + @Test + public void paddingOverflowX() throws IOException, InterruptedException { + runTest("padding_overflow_x"); + } + + @Test + public void basicBorderTest() throws IOException, InterruptedException { + runTest("basic_border"); + } + + + @Test + public void borderBigTest() throws IOException, InterruptedException { + runTest("border_big"); + } + + @Test + public void boderWithOverflowXTest() throws IOException, InterruptedException { + runTest("border_big_with_overflow_x"); + } + + @Test + public void marginAllTest() throws IOException, InterruptedException { + runTest("margin_all"); + } + + @Test + public void marginAllEmptyTest() throws IOException, InterruptedException { + runTest("margin_all_empty"); + } + + @Test + public void marginAllWithEmptyDIV() throws IOException, InterruptedException { + runTest("margin_all_with_empty_div"); + } + + + private void runTest(String testName) throws IOException, InterruptedException { + convertToPdfAndCompare(testName, + SOURCE_FOLDER, DESTINATION_FOLDER, false, + new ConverterProperties().setBaseUri(SOURCE_FOLDER)); + } + +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest.java b/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest.java new file mode 100644 index 000000000..a253563fc --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest.java @@ -0,0 +1,142 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.grid; + +import com.itextpdf.html2pdf.ConverterProperties; +import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; + +import java.io.IOException; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; + +@Tag("IntegrationTest") +public class GridTemplateNestedTest extends ExtendedHtmlConversionITextTest { + public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/grid" + + "/GridTemplateNestedTest/"; + public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/grid" + + "/GridTemplateNestedTest/"; + + @BeforeAll + public static void beforeClass() { + createOrClearDestinationFolder(DESTINATION_FOLDER); + } + + + @Test + public void templateNestedAreasTest() throws IOException, InterruptedException { + runTest("grid-nested-areas"); + } + + @Test + public void templateNestedAreasWithBorderTest() throws IOException, InterruptedException { + runTest("grid-nested-areas-with-border"); + } + + @Test + public void templateNestedArticlesTest() throws IOException, InterruptedException { + runTest("grid-nested-articles"); + } + + @Test + public void templateNestedFormsTest() throws IOException, InterruptedException { + runTest("grid-nested-forms"); + } + + @Test + public void templateNestedGridTest() throws IOException, InterruptedException { + runTest("grid-nested-grid"); + } + + @Test + public void templateNestedListsTest() throws IOException, InterruptedException { + runTest("grid-nested-lists"); + } + + @Test + public void templateNestedListsOddEvenTest() throws IOException, InterruptedException { + runTest("grid-nested-lists-odd-even"); + } + + @Test + public void templateNestedMixedContentTest() throws IOException, InterruptedException { + runTest("grid-nested-mixed-content"); + } + + @Test + public void templateNestedParagraphsTest() throws IOException, InterruptedException { + runTest("grid-nested-paragraphs"); + } + + @Test + public void templateNestedImagesTest() throws IOException, InterruptedException { + runTest("grid-nested-images"); + } + + @Test + public void templateNestedTableTest() throws IOException, InterruptedException { + runTest("grid-nested-table"); + } + + @Test + public void templateNestedTableNestedGridTest() throws IOException, InterruptedException { + runTest("grid-nested-table-nested-grid"); + } + + @Test + public void templateNestedTableMixedContentTest() throws IOException, InterruptedException { + runTest("grid-nested-table-with-mixed-content"); + } + + @Test + public void templateNested2LevelsWithAreasTest() throws IOException, InterruptedException { + runTest("grid-nested-2-levels-areas"); + } + + @Test + public void templateNested3LevelsFormsTest() throws IOException, InterruptedException { + runTest("grid-nested-3-forms"); + } + + @Test + public void templateNested3LevelsTest() throws IOException, InterruptedException { + runTest("grid-nested-3-levels"); + } + + @Test + public void templateNested3LevelsMultipleTest() throws IOException, InterruptedException { + runTest("grid-nested-3-levels-multiple"); + } + + @Test + public void templateNested3LevelsTablesTest() throws IOException, InterruptedException { + runTest("grid-nested-3-levels-tables"); + } + + + private void runTest(String testName) throws IOException, InterruptedException { + convertToPdfAndCompare(testName, + SOURCE_FOLDER, DESTINATION_FOLDER, false, + new ConverterProperties().setBaseUri(SOURCE_FOLDER)); + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest.java b/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest.java index e07ecedc4..f11cee315 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest.java @@ -24,21 +24,18 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ConverterProperties; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class GridTemplateRowTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/"; - //TODO DEVSIX-3340 change cmp files when GRID LAYOUT is supported - - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -48,6 +45,11 @@ public void templateRowAutoTest() throws IOException, InterruptedException { runTest("template-rows-auto"); } + @Test + public void autoRowFixedTest() throws IOException, InterruptedException { + runTest("auto-rows-fixed"); + } + @Test public void templateRowBordersTest() throws IOException, InterruptedException { runTest("template-rows-borders"); @@ -73,6 +75,11 @@ public void templateRowFitContentAutoTest() throws IOException, InterruptedExcep runTest("template-rows-fit-content-auto"); } + @Test + public void rowFitContentPercentTest() throws IOException, InterruptedException { + runTest("row-fit-content-percent"); + } + @Test public void templateRowFrTest() throws IOException, InterruptedException { runTest("template-rows-fr"); diff --git a/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplatesTest.java b/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplatesTest.java new file mode 100644 index 000000000..ecbf73314 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/grid/GridTemplatesTest.java @@ -0,0 +1,725 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.grid; + +import com.itextpdf.html2pdf.ConverterProperties; +import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.layout.exceptions.LayoutExceptionMessageConstant; +import com.itextpdf.layout.logs.LayoutLogMessageConstant; +import com.itextpdf.test.LogLevelConstants; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +import java.io.IOException; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; + +@Tag("IntegrationTest") +public class GridTemplatesTest extends ExtendedHtmlConversionITextTest { + public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/"; + public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/"; + + @BeforeAll + public static void beforeClass() { + createOrClearDestinationFolder(DESTINATION_FOLDER); + } + + @Test + public void basicColumnOneDivTest() throws IOException, InterruptedException { + runTest("basicColumnOneDivTest"); + } + + @Test + public void basicColumnFewDivsTest() throws IOException, InterruptedException { + runTest("basicColumnFewDivsTest"); + } + + @Test + public void basicColumnFewDivsWithFrTest() throws IOException, InterruptedException { + runTest("basicColumnFewDivsWithFrTest"); + } + + @Test + public void basicColumnFewDivs2Test() throws IOException, InterruptedException { + runTest("basicColumnFewDivs2Test"); + } + + @Test + public void basicColumnMultiPageTest() throws IOException, InterruptedException { + runTest("basicColumnMultiPageTest"); + } + + @Test + public void basicColumnStartEndTest() throws IOException, InterruptedException { + runTest("basicColumnStartEndTest"); + } + + @Test + public void basicColumnStartEnd2Test() throws IOException, InterruptedException { + runTest("basicColumnStartEnd2Test"); + } + + @Test + // We need to add a "dry run" for cell balancing without layouting to determine final grid size + public void basicColumnStartEnd3Test() throws IOException, InterruptedException { + runTest("basicColumnStartEnd3Test"); + } + + //--------------- without grid-templates-columns and grid-templates-rows --------------- + @Test + public void basicOnlyGridDisplayTest() throws IOException, InterruptedException { + runTest("basicOnlyGridDisplayTest"); + } + + //--------------- grid-templates-rows --------------- + @Test + public void basicRowOneDivTest() throws IOException, InterruptedException { + runTest("basicRowOneDivTest"); + } + + @Test + public void basicRowFewDivsTest() throws IOException, InterruptedException { + runTest("basicRowFewDivsTest"); + } + + @Test + public void basicRowStartEndTest() throws IOException, InterruptedException { + runTest("basicRowStartEndTest"); + } + + //--------------- grid-templates-columns + grid-templates-rows --------------- + + @Test + public void basicColumnRowFewDivs1Test() throws IOException, InterruptedException { + runTest("basicColumnRowFewDivs1Test"); + } + + @Test + public void basicColumnRowFewDivs2Test() throws IOException, InterruptedException { + runTest("basicColumnRowFewDivs2Test"); + } + + @Test + public void basicColumnRowFewDivs3Test() throws IOException, InterruptedException { + runTest("basicColumnRowFewDivs3Test"); + } + + @Test + public void basicColumnRowFewDivs4Test() throws IOException, InterruptedException { + runTest("basicColumnRowFewDivs4Test"); + } + + @Test + public void basicColumnRowStartEndTest() throws IOException, InterruptedException { + runTest("basicColumnRowStartEndTest"); + } + + @Test + public void basicColumnRowStartEnd1Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd1Test"); + } + + @Test + public void basicColumnRowStartEnd2Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd2Test"); + } + + @Test + public void basicColumnRowStartEnd3Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd3Test"); + } + + @Test + public void basicColumnRowStartEnd4Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd4Test"); + } + + @Test + public void basicColumnRowStartEnd5Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd5Test"); + } + + @Test + public void basicColumnRowStartEnd6Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd6Test"); + } + + @Test + public void basicColumnRowStartEnd7Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd7Test"); + } + + @Test + public void basicColumnRowStartEnd8Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd8Test"); + } + + @Test + public void basicColumnRowStartEnd9Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd9Test"); + } + + @Test + public void basicColumnRowStartEnd10Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd10Test"); + } + + @Test + public void basicColumnRowStartEnd11Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd11Test"); + } + @Test + public void basicColumnRowStartEnd12Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd12Test"); + } + @Test + public void basicColumnRowStartEnd13Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd13Test"); + } + @Test + public void basicColumnRowStartEnd14Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd14Test"); + } + @Test + public void basicColumnRowStartEnd15Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd15Test"); + } + @Test + public void basicColumnRowStartEnd16Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd16Test"); + } + @Test + public void basicColumnRowStartEnd17Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd17Test"); + } + + @Test + public void basicColumnRowStartEnd18Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd18Test"); + } + + @Test + public void basicColumnRowStartEnd19Test() throws IOException, InterruptedException { + runTest("basicColumnRowStartEnd19Test"); + } + + @Test + public void basicColumnRowStartEndWithInlineTextTest() throws IOException, InterruptedException { + runTest("basicColumnRowStartEndWithInlineTextTest"); + } + + @Test + public void basicGridAfterParagraphTest() throws IOException, InterruptedException { + runTest("basicGridAfterParagraphTest"); + } + + @Test + public void basicRowFlowTest() throws IOException, InterruptedException { + runTest("basicRowFlowTest"); + } + + @Test + public void basicRowDenseFlowTest() throws IOException, InterruptedException { + runTest("basicRowDenseFlowTest"); + } + + @Test + public void basicColumnFlowTest() throws IOException, InterruptedException { + runTest("basicColumnFlowTest"); + } + + @Test + public void basicColumnDenseFlowTest() throws IOException, InterruptedException { + runTest("basicColumnDenseFlowTest"); + } + + @Test + public void fixedTemplatesAndCellDoesNotHaveDirectNeighborTest() throws IOException, InterruptedException { + runTest("fixedTemplatesAndCellDoesNotHaveDirectNeighborTest"); + } + + @Test + public void gridInsideGridTest() throws IOException, InterruptedException { + runTest("gridInsideGridTest"); + } + + @Test + public void gridInsideGridOnPageBreakTest() throws IOException, InterruptedException { + runTest("gridInsideGridOnPageBreakTest"); + } + + @Test + public void elementDoesntFitContentTest() throws IOException, InterruptedException { + runTest("elementDoesntFitContentTest"); + } + + @Test + public void elementDoesntFitTest() throws IOException, InterruptedException { + runTest("elementDoesntFitTest"); + } + + @Test + public void elementDoesntFitHorizontallyTest() throws IOException, InterruptedException { + runTest("elementDoesntFitHorizontallyTest"); + } + + @Test + public void elementDoesntFitOverflowingToNextPageTest() throws IOException, InterruptedException { + runTest("elementDoesntFitOverflowingToNextPageTest"); + } + + @Test + public void elementDoesntFitContentOverflowingToNextPageTest() throws IOException, InterruptedException { + runTest("elementDoesntFitContentOverflowingToNextPageTest"); + } + + @Test + public void textsWithOverflowTest() throws IOException, InterruptedException { + runTest("textsWithOverflowTest"); + } + + @Test + @LogMessages(messages = { + @LogMessage(messageTemplate = LayoutLogMessageConstant.ELEMENT_DOES_NOT_FIT_AREA, logLevel = + LogLevelConstants.WARN)}) + public void imageElementDoesntFitTest() throws IOException, InterruptedException { + runTest("imageElementDoesntFitTest"); + } + + @Test + public void manyImageElementsTest() throws IOException, InterruptedException { + runTest("manyImageElementsTest"); + } + + @Test + public void imageElementsOn2ndPageTest() throws IOException, InterruptedException { + runTest("imageElementsOn2ndPageTest"); + } + + @Test + public void gridWithBrTest() throws IOException, InterruptedException { + runTest("gridWithBrTest"); + } + + @Test + public void gridWithPageBreakTest() throws IOException, InterruptedException { + runTest("gridWithPageBreakTest"); + } + + @Test + public void gridWithTableTest() throws IOException, InterruptedException { + runTest("gridWithTableTest"); + } + + @Test + public void columnFlowOnSplitTest() throws IOException, InterruptedException { + runTest("columnFlowOnSplitTest"); + } + + @Test + public void basicGridRemValuesTest() throws IOException, InterruptedException { + runTest("grid-layout-rem"); + } + + @Test + public void basicGridEmValuesTest() throws IOException, InterruptedException { + runTest("grid-layout-em"); + } + + @Test + public void percentageTemplateHeightTest() throws IOException, InterruptedException { + runTest("percentageTemplateHeightTest"); + } + + @Test + public void percentageTemplateHeightWithFixedHeightTest() throws IOException, InterruptedException { + runTest("percentageTemplateHeightWithFixedHeightTest"); + } + + @Test + public void percentageFitContentWithFrTest() throws IOException, InterruptedException { + runTest("percentageFitContentWithFrTest"); + } + + @Test + public void autoFillRepeatWithGapsTest() throws IOException, InterruptedException { + runTest("autoFillRepeatWithGapsTest"); + } + + @Test + public void autoFitWithSingleCellTest() throws IOException, InterruptedException { + runTest("autoFitWithSingleCellTest"); + } + + @Test + public void columnFlowAutoFillTest() throws IOException, InterruptedException { + runTest("columnFlowAutoFillTest"); + } + + @Test + public void fitContentAndFrTest() throws IOException, InterruptedException { + runTest("fitContentAndFrTest"); + } + + @Test + public void fixedFitContentTest() throws IOException, InterruptedException { + runTest("fixedFitContentTest"); + } + + @Test + public void fixedRepeatWithGapsTest() throws IOException, InterruptedException { + runTest("fixedRepeatWithGapsTest"); + } + + @Test + public void inlineAutoFillTest() throws IOException, InterruptedException { + runTest("inlineAutoFillTest"); + } + + @LogMessages(messages = @LogMessage(messageTemplate + = LayoutExceptionMessageConstant.GRID_AUTO_REPEAT_CANNOT_BE_COMBINED_WITH_INDEFINITE_SIZES)) + @Test + public void invalidAutoRepeatTest() throws IOException, InterruptedException { + runTest("invalidAutoRepeatTest"); + } + + @Test + public void invalidParameterRepeatTest() throws IOException, InterruptedException { + runTest("invalidParameterRepeatTest"); + } + + @Test + public void minMaxAutoFillTest() throws IOException, InterruptedException { + runTest("minMaxAutoFillTest"); + } + + @Test + public void minMaxAutoFillWithHeightTest() throws IOException, InterruptedException { + runTest("minMaxAutoFillWithHeightTest"); + } + + @Test + public void minMaxAutoFillWithMaxHeightTest() throws IOException, InterruptedException { + runTest("minMaxAutoFillWithMaxHeightTest"); + } + + @Test + public void mixedRepeatsTest() throws IOException, InterruptedException { + runTest("mixedRepeatsTest"); + } + + @Test + public void resolvableAutoFillSimpleTest() throws IOException, InterruptedException { + runTest("resolvableAutoFillSimpleTest"); + } + + @Test + public void resolvableAutoFitWithMinMaxTest() throws IOException, InterruptedException { + runTest("resolvableAutoFitWithMinMaxTest"); + } + + @Test + public void severalValuesAutoFillTest() throws IOException, InterruptedException { + runTest("severalValuesAutoFillTest"); + } + + @Test + public void autoFitOnIntrinsicAreaTest() throws IOException, InterruptedException { + runTest("autoFitOnIntrinsicAreaTest"); + } + + @Test + public void autoFillWithDefiniteMinMaxTest() throws IOException, InterruptedException { + runTest("autoFillWithDefiniteMinMaxTest"); + } + + @Test + public void autoFillWithIndefiniteMinMaxTest() throws IOException, InterruptedException { + runTest("autoFillWithIndefiniteMinMaxTest"); + } + + @Test + @LogMessages(messages = { + @LogMessage(messageTemplate = LayoutExceptionMessageConstant.FLEXIBLE_ARENT_ALLOWED_AS_MINIMUM_IN_MINMAX) + }) + public void minmaxWithMinFrTest() throws IOException, InterruptedException { + runTest("minmaxWithMinFrTest"); + } + + @Test + public void minmaxWithMaxFrTest() throws IOException, InterruptedException { + runTest("minmaxWithMaxFrTest"); + } + + @Test + public void minMaxWithIndefiniteMinTest() throws IOException, InterruptedException { + runTest("minMaxWithIndefiniteMinTest"); + } + + @Test + public void pointZeroFlexTest() throws IOException, InterruptedException { + runTest("pointZeroFlexTest"); + } + + @Test + public void pointZeroFlexTest2() throws IOException, InterruptedException { + runTest("pointZeroFlexTest2"); + } + + @Test + public void pointZeroFlexTest3() throws IOException, InterruptedException { + runTest("pointZeroFlexTest3"); + } + + @Test + public void pointZeroFlexTest4() throws IOException, InterruptedException { + runTest("pointZeroFlexTest4"); + } + + @Test + public void pointZeroFlexTest5() throws IOException, InterruptedException { + runTest("pointZeroFlexTest5"); + } + + @Test + public void pointZeroFlexTest6() throws IOException, InterruptedException { + runTest("pointZeroFlexTest6"); + } + + @Test + public void spanOnlyFrTest() throws IOException, InterruptedException { + runTest("spanOnlyFrTest"); + } + + @Test + public void autoFitOnIntrinsicAreaWithLargeBorderTest() throws IOException, InterruptedException { + runTest("autoFitOnIntrinsicAreaWithLargeBorderTest"); + } + + @Test + public void autoFitWithLargeBorderTest() throws IOException, InterruptedException { + runTest("autoFitWithLargeBorderTest"); + } + + @Test + public void autoFitOnIntrinsicAreaWithLargeMarginPaddingTest() throws IOException, InterruptedException { + runTest("autoFitOnIntrinsicAreaWithLargeMarginPaddingTest"); + } + + @Test + public void autoRepeatOnIntrinsicAreaTest() throws IOException, InterruptedException { + runTest("autoRepeatOnIntrinsicAreaTest"); + } + + @LogMessages(messages = @LogMessage(messageTemplate + = LayoutExceptionMessageConstant.GRID_AUTO_REPEAT_CANNOT_BE_COMBINED_WITH_INDEFINITE_SIZES)) + @Test + public void autoRepeatWithIntrinsicArgumentTest() throws IOException, InterruptedException { + runTest("autoRepeatWithIntrinsicArgumentTest"); + } + + @LogMessages(messages = @LogMessage(messageTemplate + = LayoutExceptionMessageConstant.GRID_AUTO_REPEAT_CAN_BE_USED_ONLY_ONCE)) + @Test + public void twoAutoRepeatsTest() throws IOException, InterruptedException { + runTest("twoAutoRepeatsTest"); + } + + @Test + public void autoFillRepeatWithFlexMinMaxTest() throws IOException, InterruptedException { + runTest("autoFillRepeatWithFlexMinMaxTest"); + } + + @Test + public void autoFitRepeatWithFlexMinMaxTest() throws IOException, InterruptedException { + runTest("autoFitRepeatWithFlexMinMaxTest"); + } + + @LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.GRID_TEMPLATE_WAS_NOT_RECOGNISED, logLevel = LogLevelConstants.WARN) + }) + @Test + public void repeatInsideMinMaxTest() throws IOException, InterruptedException { + runTest("repeatInsideMinMaxTest"); + } + + @LogMessages(messages = @LogMessage(messageTemplate + = LayoutExceptionMessageConstant.GRID_AUTO_REPEAT_CANNOT_BE_COMBINED_WITH_INDEFINITE_SIZES)) + @Test + public void autoRepeatWithFitContentTest() throws IOException, InterruptedException { + runTest("autoRepeatWithFitContentTest"); + } + + @Test + public void fixedRepeatWithFitContentTest() throws IOException, InterruptedException { + runTest("fixedRepeatWithFitContentTest"); + } + + @Test + public void fixedRepeatWithMinMaxContentTest() throws IOException, InterruptedException { + runTest("fixedRepeatWithMinMaxContentTest"); + } + + @LogMessages(messages = @LogMessage(messageTemplate + = LayoutExceptionMessageConstant.GRID_AUTO_REPEAT_CANNOT_BE_COMBINED_WITH_INDEFINITE_SIZES)) + @Test + public void autoRepeatWithLeadingMaxContentTest() throws IOException, InterruptedException { + runTest("autoRepeatWithLeadingMaxContentTest"); + } + + @Test + public void autoFitWithGapsTest() throws IOException, InterruptedException { + runTest("autoFitWithGapsTest"); + } + + @Test + public void rowColumnShorthandSimpleTest() throws IOException, InterruptedException { + runTest("rowColumnShorthandSimpleTest"); + } + + @Test + public void gridShorthandColumnAutoFlowTest() throws IOException, InterruptedException { + runTest("gridShorthandColumnAutoFlowTest"); + } + + @Test + public void gridShorthandRowAutoFlowTest() throws IOException, InterruptedException { + runTest("gridShorthandRowAutoFlowTest"); + } + + @Test + public void shrankTemplateAfterAutoFitTest() throws IOException, InterruptedException { + runTest("shrankTemplateAfterAutoFitTest"); + } + + @Test + public void minHeightTest() throws IOException, InterruptedException { + runTest("minHeightTest"); + } + + @Test + public void minHeightFlexRowsTest() throws IOException, InterruptedException { + runTest("minHeightFlexRowsTest"); + } + + @Test + // TODO DEVSIX-8426 Fix working with min\max-height\width on grid container + public void maxHeightTest() throws IOException, InterruptedException { + runTest("maxHeightTest"); + } + + @Test + // TODO DEVSIX-8426 Fix working with min\max-height\width on grid container + public void maxHeightFlexRowsTest() throws IOException, InterruptedException { + runTest("maxHeightFlexRowsTest"); + } + + @Test + public void maxHeightFlexRowsTest2() throws IOException, InterruptedException { + runTest("maxHeightFlexRowsTest2"); + } + + @LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION, logLevel = + LogLevelConstants.WARN)}) + @Test + public void divNestingTest() throws IOException, InterruptedException { + runTest("divNestingTest"); + } + + @LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.SUBGRID_VALUE_IS_NOT_SUPPORTED, logLevel = LogLevelConstants.WARN), + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.GRID_TEMPLATE_WAS_NOT_RECOGNISED, logLevel = LogLevelConstants.WARN) + }) + @Test + public void subgridTest() throws IOException, InterruptedException { + runTest("subgridTest"); + } + + @LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.GRID_TEMPLATE_WAS_NOT_RECOGNISED, logLevel = LogLevelConstants.WARN) + }) + @Test + public void invalidTemplateColumns() throws IOException, InterruptedException { + runTest("invalidTemplateColumns"); + } + + @LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.GRID_TEMPLATE_WAS_NOT_RECOGNISED, logLevel = LogLevelConstants.WARN) + }) + @Test + public void invalidTemplateRows() throws IOException, InterruptedException { + runTest("invalidTemplateRows"); + } + + @Test + public void gridSplitPaddingMarginBorderTest() throws IOException, InterruptedException { + runTest("gridSplitPaddingMarginBorderTest"); + } + + @Test + public void gridSplitPaddingMarginBorderTest2() throws IOException, InterruptedException { + runTest("gridSplitPaddingMarginBorderTest2"); + } + + @Test + public void gridSplitPaddingMarginBorderTest3() throws IOException, InterruptedException { + runTest("gridSplitPaddingMarginBorderTest3"); + } + + @Test + public void gridSplitPaddingMarginBorderTest4() throws IOException, InterruptedException { + runTest("gridSplitPaddingMarginBorderTest4"); + } + + @Test + @LogMessages(messages = { + @LogMessage(messageTemplate = LayoutLogMessageConstant.ELEMENT_DOES_NOT_FIT_AREA, logLevel = LogLevelConstants.WARN) + }) + public void gridSplitPaddingMarginBorderTest5() throws IOException, InterruptedException { + runTest("gridSplitPaddingMarginBorderTest5"); + } + + @Test + public void gridSplitPaddingMarginBorderTest6() throws IOException, InterruptedException { + runTest("gridSplitPaddingMarginBorderTest6"); + } + + @Test + public void gridSplitPaddingMarginBorderTest7() throws IOException, InterruptedException { + runTest("gridSplitPaddingMarginBorderTest7"); + } + + @Test + public void gridSplitPaddingMarginBorderTest8() throws IOException, InterruptedException { + runTest("gridSplitPaddingMarginBorderTest8"); + } + + private void runTest(String testName) throws IOException, InterruptedException { + convertToPdfAndCompare(testName, + SOURCE_FOLDER, DESTINATION_FOLDER, false, + new ConverterProperties().setBaseUri(SOURCE_FOLDER)); + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/media/MediaRuleIntegrationTest.java b/src/test/java/com/itextpdf/html2pdf/css/media/MediaRuleIntegrationTest.java index 52d5dbb69..dbfbea90b 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/media/MediaRuleIntegrationTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/media/MediaRuleIntegrationTest.java @@ -26,14 +26,13 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; import com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription; import com.itextpdf.styledxmlparser.css.media.MediaType; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class MediaRuleIntegrationTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/media/MediaRuleIntegrationTest/"; @@ -41,7 +40,7 @@ public class MediaRuleIntegrationTest extends ExtendedHtmlConversionITextTest { "./target/test/com/itextpdf/html2pdf/css/media/MediaRuleIntegrationTest"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/media/MediaRuleTest.java b/src/test/java/com/itextpdf/html2pdf/css/media/MediaRuleTest.java index d5cb0be84..b06c4e7f5 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/media/MediaRuleTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/media/MediaRuleTest.java @@ -40,22 +40,21 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupDocumentNode; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.FileInputStream; import java.io.IOException; import java.util.List; -@Category(UnitTest.class) +@Tag("UnitTest") public class MediaRuleTest extends ExtendedITextTest { private static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/media/MediaRuleTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { } @@ -69,10 +68,10 @@ public void test01() throws IOException { MediaDeviceDescription deviceDescription = new MediaDeviceDescription(MediaType.PRINT); IElementNode element = new JsoupElementNode(((JsoupDocumentNode)document).getDocument().getElementsByTag("p").first()); List declarations = css.getCssDeclarations(element, deviceDescription); - Assert.assertEquals(3, declarations.size()); - Assert.assertEquals("font-weight: bold", declarations.get(0).toString()); - Assert.assertEquals("color: red", declarations.get(1).toString()); - Assert.assertEquals("font-size: 20pt", declarations.get(2).toString()); + Assertions.assertEquals(3, declarations.size()); + Assertions.assertEquals("font-weight: bold", declarations.get(0).toString()); + Assertions.assertEquals("color: red", declarations.get(1).toString()); + Assertions.assertEquals("font-size: 20pt", declarations.get(2).toString()); } @Test @@ -93,10 +92,10 @@ public void test02() throws IOException { List declarations1 = css.getCssDeclarations(element, deviceDescription1); List declarations2 = css.getCssDeclarations(element, deviceDescription2); - Assert.assertTrue(declarations1.equals(declarations2)); + Assertions.assertTrue(declarations1.equals(declarations2)); - Assert.assertEquals(1, declarations1.size()); - Assert.assertEquals("font-weight: bold", declarations1.get(0).toString()); + Assertions.assertEquals(1, declarations1.size()); + Assertions.assertEquals("font-weight: bold", declarations1.get(0).toString()); } @Test @@ -110,8 +109,8 @@ public void test03() throws IOException { deviceDescription.setResolution(300); IElementNode element = new JsoupElementNode(((JsoupDocumentNode)document).getDocument().getElementsByTag("p").first()); List declarations = css.getCssDeclarations(element, deviceDescription); - Assert.assertEquals(1, declarations.size()); - Assert.assertEquals("color: black", declarations.get(0).toString()); + Assertions.assertEquals(1, declarations.size()); + Assertions.assertEquals("color: black", declarations.get(0).toString()); } @Test @@ -126,9 +125,9 @@ public void test04() throws IOException { IElementNode element = new JsoupElementNode(((JsoupDocumentNode)document).getDocument().getElementsByTag("p").first()); List declarations = css.getCssDeclarations(element, deviceDescription); - Assert.assertEquals(2, declarations.size()); - Assert.assertEquals("color: red", declarations.get(0).toString()); - Assert.assertEquals("font-size: 20em", declarations.get(1).toString()); + Assertions.assertEquals(2, declarations.size()); + Assertions.assertEquals("color: red", declarations.get(0).toString()); + Assertions.assertEquals("font-size: 20em", declarations.get(1).toString()); } @Test @@ -149,10 +148,10 @@ public void test05() throws IOException { List declarations1 = css.getCssDeclarations(element, deviceDescription1); List declarations2 = css.getCssDeclarations(element, deviceDescription2); - Assert.assertEquals(0, declarations1.size()); + Assertions.assertEquals(0, declarations1.size()); - Assert.assertEquals(1, declarations2.size()); - Assert.assertEquals("color: red", declarations2.get(0).toString()); + Assertions.assertEquals(1, declarations2.size()); + Assertions.assertEquals("color: red", declarations2.get(0).toString()); } @Test @@ -177,11 +176,11 @@ public void test06() throws IOException { List declarations2 = css.getCssDeclarations(element, deviceDescription2); List declarations3 = css.getCssDeclarations(element, deviceDescription3); - Assert.assertTrue(declarations1.equals(declarations2)); - Assert.assertEquals(0, declarations3.size()); + Assertions.assertTrue(declarations1.equals(declarations2)); + Assertions.assertEquals(0, declarations3.size()); - Assert.assertEquals(1, declarations1.size()); - Assert.assertEquals("color: red", declarations1.get(0).toString()); + Assertions.assertEquals(1, declarations1.size()); + Assertions.assertEquals("color: red", declarations1.get(0).toString()); } @Test @@ -195,9 +194,9 @@ public void test07() throws IOException { List printElements = HtmlConverter.convertToElements(html, new ConverterProperties().setMediaDeviceDescription(printDevice).setBaseUri(sourceFolder)); List screenElements = HtmlConverter.convertToElements(html, new ConverterProperties().setMediaDeviceDescription(screenDevice).setBaseUri(sourceFolder)); - Assert.assertEquals(12f, printElements.get(0).getProperty(Property.FONT_SIZE).getValue(), 1e-10f); + Assertions.assertEquals(12f, printElements.get(0).getProperty(Property.FONT_SIZE).getValue(), 1e-10f); - Assert.assertEquals(20f, screenElements.get(0).getProperty(Property.FONT_SIZE).getValue(), 1e-10f); + Assertions.assertEquals(20f, screenElements.get(0).getProperty(Property.FONT_SIZE).getValue(), 1e-10f); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/media/page/HtmlPageMarginBoxImageSizeTest.java b/src/test/java/com/itextpdf/html2pdf/css/media/page/HtmlPageMarginBoxImageSizeTest.java index 954c99646..d16815c33 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/media/page/HtmlPageMarginBoxImageSizeTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/media/page/HtmlPageMarginBoxImageSizeTest.java @@ -25,22 +25,21 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HtmlPageMarginBoxImageSizeTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/media/page/HtmlPageMarginBoxImageSizeTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/media/page/HtmlPageMarginBoxImageSizeTest/"; - @BeforeClass + @BeforeAll public static void initDestinationFolder() { createOrClearDestinationFolder(destinationFolder); } @@ -53,7 +52,7 @@ public void bigImagesInTopAndBottomPageMarginsTest() throws IOException, Interru HtmlConverter.convertToPdf(new File(htmlSource), new File(outPdf)); - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, "diff_")); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, "diff_")); } @Test @@ -64,6 +63,6 @@ public void bigImagesInRightAndLeftPageMarginsTest() throws IOException, Interru HtmlConverter.convertToPdf(new File(htmlSource), new File(outPdf)); - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, "diff_")); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, "diff_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/media/page/PageMarginBoxIntegrationTest.java b/src/test/java/com/itextpdf/html2pdf/css/media/page/PageMarginBoxIntegrationTest.java index 4eb7103f8..6d04c9785 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/media/page/PageMarginBoxIntegrationTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/media/page/PageMarginBoxIntegrationTest.java @@ -26,25 +26,20 @@ This file is part of the iText (R) project. import com.itextpdf.io.logs.IoLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class PageMarginBoxIntegrationTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/media/page/PageMarginBoxIntegrationTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/media/page/PageMarginBoxIntegrationTest/"; - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); - - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @@ -336,9 +331,9 @@ public void pageMarginFont() throws IOException, InterruptedException { @Test @LogMessages(messages = {@LogMessage(messageTemplate = IoLogMessageConstant.CLIP_ELEMENT)}) - public void tableInsideOfPageMarginNotFittingIntoDedicatedSpace() throws IOException, InterruptedException { - junitExpectedException.expect(NullPointerException.class); - convertToPdfAndCompare("tableInsideOfPageMarginNotFittingIntoDedicatedSpace", sourceFolder, destinationFolder); + public void tableInsideOfPageMarginNotFittingIntoDedicatedSpace() { + Assertions.assertThrows(NullPointerException.class, () -> convertToPdfAndCompare( + "tableInsideOfPageMarginNotFittingIntoDedicatedSpace", sourceFolder, destinationFolder)); } @Test diff --git a/src/test/java/com/itextpdf/html2pdf/css/media/page/fix_dimension/PageMarginBoxFixDimensionTest.java b/src/test/java/com/itextpdf/html2pdf/css/media/page/fix_dimension/PageMarginBoxFixDimensionTest.java index 640d1c796..72632dc3e 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/media/page/fix_dimension/PageMarginBoxFixDimensionTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/media/page/fix_dimension/PageMarginBoxFixDimensionTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.media.page.fix_dimension; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class PageMarginBoxFixDimensionTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/media/page/fix_dimension/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/media/page/fix_dimension/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/media/page/max_dimension/PageMarginBoxMaxDimensionTest.java b/src/test/java/com/itextpdf/html2pdf/css/media/page/max_dimension/PageMarginBoxMaxDimensionTest.java index 445e4aabe..4482c7f80 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/media/page/max_dimension/PageMarginBoxMaxDimensionTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/media/page/max_dimension/PageMarginBoxMaxDimensionTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.media.page.max_dimension; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class PageMarginBoxMaxDimensionTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/media/page/max_dimension/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/media/page/max_dimension/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/media/page/min_dimension/PageMarginBoxMinDimensionTest.java b/src/test/java/com/itextpdf/html2pdf/css/media/page/min_dimension/PageMarginBoxMinDimensionTest.java index a0e7f8c2b..58c987830 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/media/page/min_dimension/PageMarginBoxMinDimensionTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/media/page/min_dimension/PageMarginBoxMinDimensionTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.media.page.min_dimension; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class PageMarginBoxMinDimensionTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/media/page/min_dimension/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/media/page/min_dimension/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/multicol/BreakTest.java b/src/test/java/com/itextpdf/html2pdf/css/multicol/BreakTest.java index fc75198e6..b82e03596 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/multicol/BreakTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/multicol/BreakTest.java @@ -27,20 +27,18 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BreakTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/multicol/BreakTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnCountTest.java b/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnCountTest.java index a9e51ea01..92bc8963e 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnCountTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnCountTest.java @@ -29,20 +29,20 @@ This file is part of the iText (R) project. import com.itextpdf.test.LogLevelConstants; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ColumnCountTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/multicol" + "/ColumnCountTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnGapTest.java b/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnGapTest.java index 6c3220cf1..53293f33f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnGapTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnGapTest.java @@ -27,19 +27,18 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ColumnGapTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnGapTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/multicol/ColumnGapTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnRuleTest.java b/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnRuleTest.java index 6bf39b0f4..d2b27eba4 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnRuleTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnRuleTest.java @@ -26,20 +26,19 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import static com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant.INVALID_CSS_PROPERTY_DECLARATION; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ColumnRuleTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnRuleTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/multicol/ColumnRuleTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest.java b/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest.java index e96aa2a6a..5dbdbabc9 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest.java @@ -28,19 +28,19 @@ This file is part of the iText (R) project. import com.itextpdf.layout.logs.LayoutLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ColumnWidthTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -285,6 +285,31 @@ public void columnWidthPercentageTest() throws IOException, InterruptedException runTest("columnWidthPercentageTest"); } + @Test + public void bigPaddingsTest() throws IOException, InterruptedException { + runTest("bigPaddingsTest"); + } + + @Test + public void bigBordersTest() throws IOException, InterruptedException { + runTest("bigBordersTest"); + } + + @Test + public void bigMarginsTest() throws IOException, InterruptedException { + runTest("bigMarginsTest"); + } + + @Test + public void bigMargingsPaddingsBordersTest() throws IOException, InterruptedException { + runTest("bigMargingsPaddingsBordersTest"); + } + + @Test + public void bigBordersWithoutWidtConstraintTest() throws IOException, InterruptedException { + runTest("bigBordersWithoutWidtConstraintTest"); + } + private void runTest(String testName) throws IOException, InterruptedException { convertToPdfAndCompare(testName, diff --git a/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnsTest.java b/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnsTest.java index aea22cb6d..58cf396a2 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnsTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/multicol/ColumnsTest.java @@ -24,19 +24,18 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ConverterProperties; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ColumnsTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/multicol/ColumnsTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/resolve/CssContentPropertyResolverIntegrationTest.java b/src/test/java/com/itextpdf/html2pdf/css/resolve/CssContentPropertyResolverIntegrationTest.java index dfced64de..039065e31 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/resolve/CssContentPropertyResolverIntegrationTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/resolve/CssContentPropertyResolverIntegrationTest.java @@ -23,14 +23,13 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.resolve; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CssContentPropertyResolverIntegrationTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css" @@ -38,7 +37,7 @@ public class CssContentPropertyResolverIntegrationTest extends ExtendedHtmlConve public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css" + "/CssContentPropertyResolverIntegrationTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/resolve/CssContentPropertyResolverTest.java b/src/test/java/com/itextpdf/html2pdf/css/resolve/CssContentPropertyResolverTest.java index 403f8718b..fed707141 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/resolve/CssContentPropertyResolverTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/resolve/CssContentPropertyResolverTest.java @@ -33,16 +33,15 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.util.HashMap; import java.util.List; import java.util.Map; -@Category(UnitTest.class) +@Tag("UnitTest") public class CssContentPropertyResolverTest extends ExtendedITextTest { @Test @@ -51,10 +50,10 @@ public void resolveContentTargetCounterEnabledTest() { styles.put(CssConstants.CONTENT, "target-counter(url('#some_target'), page)"); CssContext context = new CssContext(); List result = CssContentPropertyResolver.resolveContent(styles, null, context); - Assert.assertNotNull(result); - Assert.assertEquals(1, result.size()); - Assert.assertTrue(result.get(0) instanceof PageTargetCountElementNode); - Assert.assertEquals("#some_target", ((PageTargetCountElementNode) result.get(0)).getTarget()); + Assertions.assertNotNull(result); + Assertions.assertEquals(1, result.size()); + Assertions.assertTrue(result.get(0) instanceof PageTargetCountElementNode); + Assertions.assertEquals("#some_target", ((PageTargetCountElementNode) result.get(0)).getTarget()); } @Test @@ -63,9 +62,9 @@ public void resolveContentTargetCounterNotPageTest() { styles.put(CssConstants.CONTENT, "target-counter(url('#some_target'), some_counter)"); CssContext context = new CssContext(); List result = CssContentPropertyResolver.resolveContent(styles, null, context); - Assert.assertNotNull(result); - Assert.assertEquals(1, result.size()); - Assert.assertTrue(result.get(0) instanceof ITextNode); + Assertions.assertNotNull(result); + Assertions.assertEquals(1, result.size()); + Assertions.assertTrue(result.get(0) instanceof ITextNode); } @Test @@ -75,19 +74,19 @@ public void resolveContentInvalidParamsTest() { styles.put(CssConstants.CONTENT, "target-counter(url('#some_target'))"); CssContext context = new CssContext(); List result = CssContentPropertyResolver.resolveContent(styles, null, context); - Assert.assertNull(result); + Assertions.assertNull(result); styles.put(CssConstants.CONTENT, "target-counters(url('#some_target'), some_counter)"); result = CssContentPropertyResolver.resolveContent(styles, null, context); - Assert.assertNull(result); + Assertions.assertNull(result); styles.put(CssConstants.CONTENT, "counter()"); result = CssContentPropertyResolver.resolveContent(styles, null, context); - Assert.assertNull(result); + Assertions.assertNull(result); styles.put(CssConstants.CONTENT, "counters(some_counter)"); result = CssContentPropertyResolver.resolveContent(styles, null, context); - Assert.assertNull(result); + Assertions.assertNull(result); } @Test @@ -96,17 +95,17 @@ public void resolveContentPagesTargetCountersTest() { styles.put(CssConstants.CONTENT, "target-counter(url('#some_target'), pages)"); CssContext context = new CssContext(); List result = CssContentPropertyResolver.resolveContent(styles, null, context); - Assert.assertNotNull(result); - Assert.assertEquals(1, result.size()); - Assert.assertTrue(result.get(0) instanceof PageCountElementNode); - Assert.assertTrue(((PageCountElementNode) result.get(0)).isTotalPageCount()); + Assertions.assertNotNull(result); + Assertions.assertEquals(1, result.size()); + Assertions.assertTrue(result.get(0) instanceof PageCountElementNode); + Assertions.assertTrue(((PageCountElementNode) result.get(0)).isTotalPageCount()); styles.put(CssConstants.CONTENT, "target-counters(url('#some_target'), pages, '.')"); result = CssContentPropertyResolver.resolveContent(styles, null, context); - Assert.assertNotNull(result); - Assert.assertEquals(1, result.size()); - Assert.assertTrue(result.get(0) instanceof PageCountElementNode); - Assert.assertTrue(((PageCountElementNode) result.get(0)).isTotalPageCount()); + Assertions.assertNotNull(result); + Assertions.assertEquals(1, result.size()); + Assertions.assertTrue(result.get(0) instanceof PageCountElementNode); + Assertions.assertTrue(((PageCountElementNode) result.get(0)).isTotalPageCount()); } @Test @@ -115,9 +114,9 @@ public void resolveContentCounterNotPageTest() { styles.put(CssConstants.CONTENT, "counter(some_counter)"); CssContext context = new CssContext(); List result = CssContentPropertyResolver.resolveContent(styles, null, context); - Assert.assertNotNull(result); - Assert.assertEquals(1, result.size()); - Assert.assertTrue(result.get(0) instanceof ITextNode); + Assertions.assertNotNull(result); + Assertions.assertEquals(1, result.size()); + Assertions.assertTrue(result.get(0) instanceof ITextNode); } @Test @@ -129,7 +128,7 @@ public void resolveContentWrongTargetCounterTest(){ IElementNode iNode = new CssPseudoElementNode(null, "test"); List result = CssContentPropertyResolver.resolveContent(styles,iNode,context); - Assert.assertNull(result); + Assertions.assertNull(result); } @Test @@ -141,6 +140,6 @@ public void resolveContentWrongTargetCountersTest(){ IElementNode iNode = new CssPseudoElementNode(null, "test"); List result = CssContentPropertyResolver.resolveContent(styles,iNode,context); - Assert.assertNull(result); + Assertions.assertNull(result); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/resolve/HtmlStylesToCssConverterIntegrationTest.java b/src/test/java/com/itextpdf/html2pdf/css/resolve/HtmlStylesToCssConverterIntegrationTest.java index df8b9f3a2..721f8eed7 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/resolve/HtmlStylesToCssConverterIntegrationTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/resolve/HtmlStylesToCssConverterIntegrationTest.java @@ -23,14 +23,13 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.resolve; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HtmlStylesToCssConverterIntegrationTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css" @@ -38,7 +37,7 @@ public class HtmlStylesToCssConverterIntegrationTest extends ExtendedHtmlConvers public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css" + "/HtmlStylesToCssConverterIntegrationTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/resolve/HtmlStylesToCssConverterTest.java b/src/test/java/com/itextpdf/html2pdf/css/resolve/HtmlStylesToCssConverterTest.java index 805350889..25c507505 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/resolve/HtmlStylesToCssConverterTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/resolve/HtmlStylesToCssConverterTest.java @@ -28,14 +28,12 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.jsoup.parser.Tag; import com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.util.List; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; -@Category(UnitTest.class) +@org.junit.jupiter.api.Tag("UnitTest") public class HtmlStylesToCssConverterTest extends ExtendedITextTest { @Test public void trimSemicolonsForWidthAttributeTest() { @@ -74,8 +72,8 @@ public void withoutSemicolonsHeightAttributeTest() { } private static void assertCssDeclarationListWithOneElement(List cssDeclarations, String prop, String exp) { - Assert.assertEquals(1, cssDeclarations.size()); - Assert.assertEquals(prop, cssDeclarations.get(0).getProperty()); - Assert.assertEquals(exp, cssDeclarations.get(0).getExpression()); + Assertions.assertEquals(1, cssDeclarations.size()); + Assertions.assertEquals(prop, cssDeclarations.get(0).getProperty()); + Assertions.assertEquals(exp, cssDeclarations.get(0).getExpression()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/resolve/func/counter/CssCounterManagerTest.java b/src/test/java/com/itextpdf/html2pdf/css/resolve/func/counter/CssCounterManagerTest.java index 98b7e9cf6..601aea887 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/resolve/func/counter/CssCounterManagerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/resolve/func/counter/CssCounterManagerTest.java @@ -29,17 +29,16 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.css.pseudo.CssPseudoElementNode; import com.itextpdf.styledxmlparser.node.IElementNode; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -@Category(UnitTest.class) +@Tag("UnitTest") public class CssCounterManagerTest extends ExtendedITextTest { @Test @@ -47,38 +46,38 @@ public void pushPopEveryCounterToCountersTest() { CssCounterManager manager = new CssCounterManager(); manager.resetCounter("counter1", 1); manager.resetCounter("counter2", 2); - Assert.assertEquals("1", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("2", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("2", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); IElementNode node1 = new CssPseudoElementNode(null, "name"); manager.pushEveryCounterToCounters(node1); manager.resetCounter("counter1", 3); manager.resetCounter("counter2", 4); - Assert.assertEquals("1,3", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("2,4", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1,3", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("2,4", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); IElementNode node2 = new CssPseudoElementNode(null, "name"); manager.pushEveryCounterToCounters(node2); manager.resetCounter("counter1", 5); - Assert.assertEquals("1,3,5", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("2,4", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1,3,5", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("2,4", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); IElementNode node3 = new CssPseudoElementNode(null, "name"); manager.pushEveryCounterToCounters(node3); - Assert.assertEquals("1,3,5", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("2,4", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1,3,5", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("2,4", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); manager.popEveryCounterFromCounters(node3); - Assert.assertEquals("1,3,5", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("2,4", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1,3,5", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("2,4", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); manager.popEveryCounterFromCounters(node2); - Assert.assertEquals("1,3", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("2,4", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1,3", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("2,4", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); manager.popEveryCounterFromCounters(node1); - Assert.assertEquals("1", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("2", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1", manager.resolveCounters("counter1", ",", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("2", manager.resolveCounters("counter2", ",", CounterDigitsGlyphStyle.DEFAULT)); manager.popEveryCounterFromCounters(node1); } @@ -90,8 +89,8 @@ public void resolveTargetCounterTest() { manager.resetCounter("counter"); manager.incrementCounter("counter", 5); - Assert.assertNull(manager.resolveTargetCounter("id", "counter", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertNull(manager.resolveTargetCounter("id", "counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertNull(manager.resolveTargetCounter("id", "counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertNull(manager.resolveTargetCounter("id", "counter", CounterDigitsGlyphStyle.DEFAULT)); IElementNode node = new CssPseudoElementNode(null, "name") { @Override @@ -105,13 +104,13 @@ public String getAttribute(String key) { manager.addTargetCounterIfRequired(node); - Assert.assertEquals("5", manager.resolveTargetCounter("id", "counter", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertNull(manager.resolveTargetCounter("id", "counter2", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("5", manager.resolveTargetCounter("id", "counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertNull(manager.resolveTargetCounter("id", "counter2", CounterDigitsGlyphStyle.DEFAULT)); manager.incrementCounter("counter2", 10); manager.addTargetCounterIfRequired(node); - Assert.assertEquals("10", manager.resolveTargetCounter("id", "counter2", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("10", manager.resolveTargetCounter("id", "counter2", CounterDigitsGlyphStyle.DEFAULT)); } @Test @@ -121,8 +120,8 @@ public void resolveTargetCountersTest() { manager.resetCounter("counter"); manager.incrementCounter("counter", 5); - Assert.assertNull(manager.resolveTargetCounters("id", "counter", ".", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertNull(manager.resolveTargetCounters("id", "counter", ".", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertNull(manager.resolveTargetCounters("id", "counter", ".", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertNull(manager.resolveTargetCounters("id", "counter", ".", CounterDigitsGlyphStyle.DEFAULT)); IElementNode node = new CssPseudoElementNode(null, "name") { @Override @@ -136,27 +135,27 @@ public String getAttribute(String key) { manager.addTargetCountersIfRequired(node); - Assert.assertEquals("5", manager.resolveTargetCounters("id", "counter", ".", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertNull(manager.resolveTargetCounters("id", "counter2", ".", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("5", manager.resolveTargetCounters("id", "counter", ".", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertNull(manager.resolveTargetCounters("id", "counter2", ".", CounterDigitsGlyphStyle.DEFAULT)); manager.incrementCounter("counter2", 10); manager.addTargetCountersIfRequired(node); - Assert.assertEquals("10", manager.resolveTargetCounters("id", "counter2", ".", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("10", manager.resolveTargetCounters("id", "counter2", ".", CounterDigitsGlyphStyle.DEFAULT)); manager.pushEveryCounterToCounters(node); manager.resetCounter("counter2", 7); manager.addTargetCountersIfRequired(node); - Assert.assertEquals("5", manager.resolveTargetCounters("id", "counter", ".", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("10.7", manager.resolveTargetCounters("id", "counter2", ".", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("5", manager.resolveTargetCounters("id", "counter", ".", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("10.7", manager.resolveTargetCounters("id", "counter2", ".", CounterDigitsGlyphStyle.DEFAULT)); } @Test public void addTargetCounterIfRequiredTest() { CssCounterManager manager = new CssCounterManager(); - Assert.assertNull(manager.resolveTargetCounter("id1", "counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertNull(manager.resolveTargetCounter("id1", "counter", CounterDigitsGlyphStyle.DEFAULT)); IElementNode node1 = new CssPseudoElementNode(null, "name") { @Override @@ -182,14 +181,14 @@ public String getAttribute(String key) { manager.addTargetCounterIfRequired(node2); manager.addTargetCounterIfRequired(node3); - Assert.assertEquals("0", manager.resolveTargetCounter("id1", "counter", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertNull(manager.resolveTargetCounter("id2", "counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("0", manager.resolveTargetCounter("id1", "counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertNull(manager.resolveTargetCounter("id2", "counter", CounterDigitsGlyphStyle.DEFAULT)); manager.resetCounter("counter"); manager.incrementCounter("counter"); manager.addTargetCounterIfRequired(node1); - Assert.assertEquals("1", manager.resolveTargetCounter("id1", "counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1", manager.resolveTargetCounter("id1", "counter", CounterDigitsGlyphStyle.DEFAULT)); } @Test @@ -197,8 +196,8 @@ public void resolveCounterTest() { CssCounterManager manager = new CssCounterManager(); manager.resetCounter("counter1", 1); - Assert.assertEquals("1", manager.resolveCounter("counter1", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("0", manager.resolveCounter("counter2", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1", manager.resolveCounter("counter1", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("0", manager.resolveCounter("counter2", CounterDigitsGlyphStyle.DEFAULT)); IElementNode node = new CssPseudoElementNode(null, "name"); manager.pushEveryCounterToCounters(node); @@ -206,8 +205,8 @@ public void resolveCounterTest() { manager.resetCounter("counter2", 1); manager.incrementCounter("counter1", 2); - Assert.assertEquals("3", manager.resolveCounter("counter1", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("1", manager.resolveCounter("counter2", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("3", manager.resolveCounter("counter1", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1", manager.resolveCounter("counter2", CounterDigitsGlyphStyle.DEFAULT)); } @Test @@ -215,16 +214,16 @@ public void resolveCountersTest() { CssCounterManager manager = new CssCounterManager(); manager.resetCounter("counter1", 1); - Assert.assertEquals("1", manager.resolveCounters("counter1", ";", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("0", manager.resolveCounters("counter2", "::", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1", manager.resolveCounters("counter1", ";", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("0", manager.resolveCounters("counter2", "::", CounterDigitsGlyphStyle.DEFAULT)); IElementNode node1 = new CssPseudoElementNode(null, "name"); manager.pushEveryCounterToCounters(node1); manager.resetCounter("counter2", 1); manager.incrementCounter("counter1", 2); - Assert.assertEquals("3", manager.resolveCounters("counter1", ";", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("1", manager.resolveCounters("counter2", "::", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("3", manager.resolveCounters("counter1", ";", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1", manager.resolveCounters("counter2", "::", CounterDigitsGlyphStyle.DEFAULT)); IElementNode node2 = new CssPseudoElementNode(null, "name"); manager.pushEveryCounterToCounters(node2); @@ -232,21 +231,21 @@ public void resolveCountersTest() { manager.resetCounter("counter1", 30); manager.resetCounter("counter2", 10); - Assert.assertEquals("3;30", manager.resolveCounters("counter1", ";", CounterDigitsGlyphStyle.DEFAULT)); - Assert.assertEquals("1::10", manager.resolveCounters("counter2", "::", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("3;30", manager.resolveCounters("counter1", ";", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1::10", manager.resolveCounters("counter2", "::", CounterDigitsGlyphStyle.DEFAULT)); } @Test public void resetCounterTest() { CssCounterManager manager = new CssCounterManager(); manager.resetCounter("counter"); - Assert.assertEquals("0", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("0", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); manager.resetCounter("counter", 101); - Assert.assertEquals("101", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("101", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); manager.resetCounter("counter", -5); - Assert.assertEquals("-5", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("-5", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); } @Test @@ -254,16 +253,16 @@ public void incrementCounterTest() { CssCounterManager manager = new CssCounterManager(); manager.resetCounter("counter"); manager.incrementCounter("counter"); - Assert.assertEquals("1", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("1", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); manager.incrementCounter("counter", 101); - Assert.assertEquals("102", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("102", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); manager.incrementCounter("counter", -3); - Assert.assertEquals("99", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("99", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); manager.incrementCounter("counter", -101); - Assert.assertEquals("-2", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); + Assertions.assertEquals("-2", manager.resolveCounter("counter", CounterDigitsGlyphStyle.DEFAULT)); } @Test @@ -280,9 +279,9 @@ public String getAttribute(String key) { }; manager.resetCounter("counter", 3); manager.pushEveryCounterToCounters(node); - Assert.assertEquals("III", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); + Assertions.assertEquals("III", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); manager.resetCounter("counter", 2); - Assert.assertEquals("III.II", manager.resolveCounters("counter", ".", + Assertions.assertEquals("III.II", manager.resolveCounters("counter", ".", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); manager.resolveTargetCounter("id", "counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN)); @@ -291,8 +290,8 @@ public String getAttribute(String key) { manager.addTargetCounterIfRequired(node); manager.addTargetCountersIfRequired(node); - Assert.assertEquals("II", manager.resolveTargetCounter("id", "counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); - Assert.assertEquals("III.II", manager.resolveTargetCounters("id", "counter", ".", + Assertions.assertEquals("II", manager.resolveTargetCounter("id", "counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); + Assertions.assertEquals("III.II", manager.resolveTargetCounters("id", "counter", ".", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); } @@ -300,75 +299,75 @@ public String getAttribute(String key) { public void convertCounterToSymbolTest() { CssCounterManager manager = new CssCounterManager(); manager.resetCounter("counter", 3); - Assert.assertEquals("3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(null))); - Assert.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.NONE))); - Assert.assertEquals("\u2022", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DISC))); - Assert.assertEquals("\u25a0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.SQUARE))); - Assert.assertEquals("\u25e6", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.CIRCLE))); - Assert.assertEquals("C", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ALPHA))); - Assert.assertEquals("C", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_LATIN))); - Assert.assertEquals("c", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ALPHA))); - Assert.assertEquals("c", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_LATIN))); - Assert.assertEquals("\u03b3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_GREEK))); - Assert.assertEquals("iii", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ROMAN))); - Assert.assertEquals("III", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); - Assert.assertEquals("03", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DECIMAL_LEADING_ZERO))); - Assert.assertEquals("\u10D2", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.GEORGIAN))); - Assert.assertEquals("\u0533", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.ARMENIAN))); - Assert.assertEquals("3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum("some_script"))); + Assertions.assertEquals("3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(null))); + Assertions.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.NONE))); + Assertions.assertEquals("\u2022", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DISC))); + Assertions.assertEquals("\u25a0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.SQUARE))); + Assertions.assertEquals("\u25e6", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.CIRCLE))); + Assertions.assertEquals("C", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ALPHA))); + Assertions.assertEquals("C", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_LATIN))); + Assertions.assertEquals("c", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ALPHA))); + Assertions.assertEquals("c", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_LATIN))); + Assertions.assertEquals("\u03b3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_GREEK))); + Assertions.assertEquals("iii", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ROMAN))); + Assertions.assertEquals("III", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); + Assertions.assertEquals("03", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DECIMAL_LEADING_ZERO))); + Assertions.assertEquals("\u10D2", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.GEORGIAN))); + Assertions.assertEquals("\u0533", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.ARMENIAN))); + Assertions.assertEquals("3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum("some_script"))); manager.resetCounter("counter", 0); - Assert.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(null))); - Assert.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.NONE))); - Assert.assertEquals("\u2022", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DISC))); - Assert.assertEquals("\u25a0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.SQUARE))); - Assert.assertEquals("\u25e6", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.CIRCLE))); - Assert.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ALPHA))); - Assert.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_LATIN))); - Assert.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ALPHA))); - Assert.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_LATIN))); - Assert.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_GREEK))); - Assert.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ROMAN))); - Assert.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); - Assert.assertEquals("00", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DECIMAL_LEADING_ZERO))); - Assert.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.GEORGIAN))); - Assert.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.ARMENIAN))); - Assert.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum("some_script"))); + Assertions.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(null))); + Assertions.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.NONE))); + Assertions.assertEquals("\u2022", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DISC))); + Assertions.assertEquals("\u25a0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.SQUARE))); + Assertions.assertEquals("\u25e6", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.CIRCLE))); + Assertions.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ALPHA))); + Assertions.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_LATIN))); + Assertions.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ALPHA))); + Assertions.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_LATIN))); + Assertions.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_GREEK))); + Assertions.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ROMAN))); + Assertions.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); + Assertions.assertEquals("00", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DECIMAL_LEADING_ZERO))); + Assertions.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.GEORGIAN))); + Assertions.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.ARMENIAN))); + Assertions.assertEquals("0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum("some_script"))); manager.resetCounter("counter", -3); - Assert.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(null))); - Assert.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.NONE))); - Assert.assertEquals("\u2022", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DISC))); - Assert.assertEquals("\u25a0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.SQUARE))); - Assert.assertEquals("\u25e6", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.CIRCLE))); - Assert.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ALPHA))); - Assert.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_LATIN))); - Assert.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ALPHA))); - Assert.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_LATIN))); - Assert.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_GREEK))); - Assert.assertEquals("-iii", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ROMAN))); - Assert.assertEquals("-III", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); - Assert.assertEquals("0-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DECIMAL_LEADING_ZERO))); - Assert.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.GEORGIAN))); - Assert.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.ARMENIAN))); - Assert.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum("some_script"))); + Assertions.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(null))); + Assertions.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.NONE))); + Assertions.assertEquals("\u2022", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DISC))); + Assertions.assertEquals("\u25a0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.SQUARE))); + Assertions.assertEquals("\u25e6", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.CIRCLE))); + Assertions.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ALPHA))); + Assertions.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_LATIN))); + Assertions.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ALPHA))); + Assertions.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_LATIN))); + Assertions.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_GREEK))); + Assertions.assertEquals("-iii", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ROMAN))); + Assertions.assertEquals("-III", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); + Assertions.assertEquals("0-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DECIMAL_LEADING_ZERO))); + Assertions.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.GEORGIAN))); + Assertions.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.ARMENIAN))); + Assertions.assertEquals("-3", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum("some_script"))); manager.resetCounter("counter", 5000); - Assert.assertEquals("5000", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(null))); - Assert.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.NONE))); - Assert.assertEquals("\u2022", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DISC))); - Assert.assertEquals("\u25a0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.SQUARE))); - Assert.assertEquals("\u25e6", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.CIRCLE))); - Assert.assertEquals("GJH", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ALPHA))); - Assert.assertEquals("GJH", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_LATIN))); - Assert.assertEquals("gjh", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ALPHA))); - Assert.assertEquals("gjh", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_LATIN))); - Assert.assertEquals("\u03b8\u03c0\u03b8", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_GREEK))); - Assert.assertEquals("5000", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ROMAN))); - Assert.assertEquals("5000", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); - Assert.assertEquals("5000", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DECIMAL_LEADING_ZERO))); - Assert.assertEquals("\u10ed", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.GEORGIAN))); - Assert.assertEquals("\u0550", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.ARMENIAN))); - Assert.assertEquals("5000", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum("some_script"))); + Assertions.assertEquals("5000", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(null))); + Assertions.assertEquals("", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.NONE))); + Assertions.assertEquals("\u2022", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DISC))); + Assertions.assertEquals("\u25a0", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.SQUARE))); + Assertions.assertEquals("\u25e6", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.CIRCLE))); + Assertions.assertEquals("GJH", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ALPHA))); + Assertions.assertEquals("GJH", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_LATIN))); + Assertions.assertEquals("gjh", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ALPHA))); + Assertions.assertEquals("gjh", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_LATIN))); + Assertions.assertEquals("\u03b8\u03c0\u03b8", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_GREEK))); + Assertions.assertEquals("5000", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.LOWER_ROMAN))); + Assertions.assertEquals("5000", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.UPPER_ROMAN))); + Assertions.assertEquals("5000", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.DECIMAL_LEADING_ZERO))); + Assertions.assertEquals("\u10ed", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.GEORGIAN))); + Assertions.assertEquals("\u0550", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum(CssConstants.ARMENIAN))); + Assertions.assertEquals("5000", manager.resolveCounter("counter", HtmlUtils.convertStringCounterGlyphStyleToEnum("some_script"))); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/resolve/func/counter/PageTargetCountElementNodeTest.java b/src/test/java/com/itextpdf/html2pdf/css/resolve/func/counter/PageTargetCountElementNodeTest.java index 0fd73778c..0a2eef2f0 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/resolve/func/counter/PageTargetCountElementNodeTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/resolve/func/counter/PageTargetCountElementNodeTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.resolve.func.counter; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class PageTargetCountElementNodeTest extends ExtendedITextTest { @Test public void constructorTest() { String target = "tarGet"; PageTargetCountElementNode node = new PageTargetCountElementNode(null, target); - Assert.assertEquals("_e0d00a6_page-counter", node.name()); - Assert.assertEquals(target, node.getTarget()); - Assert.assertNull(node.parentNode()); + Assertions.assertEquals("_e0d00a6_page-counter", node.name()); + Assertions.assertEquals(target, node.getTarget()); + Assertions.assertNull(node.parentNode()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/selector/item/ConstantApplyingPseudoClassesTest.java b/src/test/java/com/itextpdf/html2pdf/css/selector/item/ConstantApplyingPseudoClassesTest.java index 3206732fa..89a1831f1 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/selector/item/ConstantApplyingPseudoClassesTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/selector/item/ConstantApplyingPseudoClassesTest.java @@ -23,19 +23,18 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.selector.item; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ConstantApplyingPseudoClassesTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/selector/item/ConstantApplyingPseudoClassesTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/selector/item/ConstantApplyingPseudoClassesTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/selector/item/NonStandardNodesMatchingTest.java b/src/test/java/com/itextpdf/html2pdf/css/selector/item/NonStandardNodesMatchingTest.java index fdafb012b..a761b2b2f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/selector/item/NonStandardNodesMatchingTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/selector/item/NonStandardNodesMatchingTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.selector.item; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class NonStandardNodesMatchingTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/selector/item/NonStandardNodesMatchingTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/css/selector/item/NonStandardNodesMatchingTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/css/util/CssStyleSheetAnalyzerTest.java b/src/test/java/com/itextpdf/html2pdf/css/util/CssStyleSheetAnalyzerTest.java index f8c255b1c..f348d4652 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/util/CssStyleSheetAnalyzerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/util/CssStyleSheetAnalyzerTest.java @@ -25,49 +25,48 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.css.CssStyleSheet; import com.itextpdf.styledxmlparser.css.parse.CssStyleSheetParser; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class CssStyleSheetAnalyzerTest extends ExtendedITextTest { @Test public void simpleNegativeTest() { CssStyleSheet styleSheet = CssStyleSheetParser.parse("* { color: red; }"); - Assert.assertFalse(CssStyleSheetAnalyzer.checkPagesCounterPresence(styleSheet)); + Assertions.assertFalse(CssStyleSheetAnalyzer.checkPagesCounterPresence(styleSheet)); } @Test public void pagesInCounterSimpleTest() { CssStyleSheet styleSheet = CssStyleSheetParser.parse(".x::before { content: counter(pages) }"); - Assert.assertTrue(CssStyleSheetAnalyzer.checkPagesCounterPresence(styleSheet)); + Assertions.assertTrue(CssStyleSheetAnalyzer.checkPagesCounterPresence(styleSheet)); } @Test public void pagesInCountersSimpleTest() { CssStyleSheet styleSheet = CssStyleSheetParser.parse(".x::before { content: counters(pages,'.') }"); - Assert.assertTrue(CssStyleSheetAnalyzer.checkPagesCounterPresence(styleSheet)); + Assertions.assertTrue(CssStyleSheetAnalyzer.checkPagesCounterPresence(styleSheet)); } @Test public void pagesInCounterSpacesPresenceTest() { CssStyleSheet styleSheet = CssStyleSheetParser.parse(".x::before { content: counter( pages ) }"); - Assert.assertTrue(CssStyleSheetAnalyzer.checkPagesCounterPresence(styleSheet)); + Assertions.assertTrue(CssStyleSheetAnalyzer.checkPagesCounterPresence(styleSheet)); } @Test public void pagesInCountersSpacesPresenceTest() { CssStyleSheet styleSheet = CssStyleSheetParser.parse(".x::before { content: counters( pages,'.') }"); - Assert.assertTrue(CssStyleSheetAnalyzer.checkPagesCounterPresence(styleSheet)); + Assertions.assertTrue(CssStyleSheetAnalyzer.checkPagesCounterPresence(styleSheet)); } @Test public void counterWithoutPagesTest() { CssStyleSheet styleSheet = CssStyleSheetParser.parse(".x::before { content: counter(othercounter) }"); - Assert.assertFalse(CssStyleSheetAnalyzer.checkPagesCounterPresence(styleSheet)); + Assertions.assertFalse(CssStyleSheetAnalyzer.checkPagesCounterPresence(styleSheet)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/W3CCssTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/W3CCssTest.java index 679063cd7..abc698f5f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/W3CCssTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/W3CCssTest.java @@ -27,20 +27,19 @@ This file is part of the iText (R) project. import com.itextpdf.io.util.UrlUtil; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; /** * @see /~https://github.com/w3c/csswg-test */ -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public abstract class W3CCssTest extends ExtendedITextTest { private static final String baseSourceFolder = "./src/test/resources/com/itextpdf/html2pdf/css/w3c/"; @@ -48,11 +47,11 @@ public abstract class W3CCssTest extends ExtendedITextTest { protected abstract String getHtmlFileName(); - @BeforeClass + @BeforeAll public static void beforeClass() { } - @Before + @BeforeEach public void before() { createDestinationFolder(getDestinationFolder()); } @@ -66,7 +65,7 @@ public void test() throws IOException, InterruptedException { String cmpFilePath = sourceFolder + getOutPdfFileName(); System.out.println("html: " + UrlUtil.getNormalizedFileUriString(htmlFilePath) + "\n"); HtmlConverter.convertToPdf(new File(htmlFilePath), new File(outFilePath), getConverterProperties()); - Assert.assertNull(new CompareTool().compareByContent(outFilePath, cmpFilePath, destinationFolder, "diff_")); + Assertions.assertNull(new CompareTool().compareByContent(outFilePath, cmpFilePath, destinationFolder, "diff_")); } protected ConverterProperties getConverterProperties() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/generated_content/ContentCounter016Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/generated_content/ContentCounter016Test.java index 2046e8ff4..e2ce4308b 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/generated_content/ContentCounter016Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/generated_content/ContentCounter016Test.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css21.generated_content; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1172") +@Disabled("DEVSIX-1172") public class ContentCounter016Test extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/generated_content/ContentCounters018Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/generated_content/ContentCounters018Test.java index 8731c1b51..50185a0ff 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/generated_content/ContentCounters018Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/generated_content/ContentCounters018Test.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css21.generated_content; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1172") +@Disabled("DEVSIX-1172") public class ContentCounters018Test extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlign103Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlign103Test.java index bcfac4fca..9bd8b125c 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlign103Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlign103Test.java @@ -28,7 +28,7 @@ This file is part of the iText (R) project. import com.itextpdf.test.annotations.LogMessages; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class VerticalAlign103Test extends W3CCssTest { @Override diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlign104Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlign104Test.java index 263a6f188..5f6aec54a 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlign104Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlign104Test.java @@ -28,7 +28,7 @@ This file is part of the iText (R) project. import com.itextpdf.test.annotations.LogMessages; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class VerticalAlign104Test extends W3CCssTest { @Override diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlignSub001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlignSub001Test.java index ad5da3265..aece03100 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlignSub001Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlignSub001Test.java @@ -28,7 +28,7 @@ This file is part of the iText (R) project. import com.itextpdf.test.annotations.LogMessages; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class VerticalAlignSub001Test extends W3CCssTest { @Override diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlignSuper001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlignSuper001Test.java index f8d218cf3..d16f8fbfd 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlignSuper001Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css21/linebox/VerticalAlignSuper001Test.java @@ -28,7 +28,7 @@ This file is part of the iText (R) project. import com.itextpdf.test.annotations.LogMessages; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class VerticalAlignSuper001Test extends W3CCssTest { @Override diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_144_NegatedEnabledDisabledPseudoClassesTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_144_NegatedEnabledDisabledPseudoClassesTest.java index eec81badd..b459f61c1 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_144_NegatedEnabledDisabledPseudoClassesTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_144_NegatedEnabledDisabledPseudoClassesTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_144_NegatedEnabledDisabledPseudoClassesTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_67_NegatedLangPseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_67_NegatedLangPseudoClassTest.java index 97d9dec28..f15296356 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_67_NegatedLangPseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_67_NegatedLangPseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_67_NegatedLangPseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_68_NegatedEnabledPseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_68_NegatedEnabledPseudoClassTest.java index e43b80629..864dc9d08 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_68_NegatedEnabledPseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_68_NegatedEnabledPseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_68_NegatedEnabledPseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_69_NegatedDisabledPseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_69_NegatedDisabledPseudoClassTest.java index 45aabf219..b93534e2a 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_69_NegatedDisabledPseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_69_NegatedDisabledPseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_69_NegatedDisabledPseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_70_NegatedCheckedPseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_70_NegatedCheckedPseudoClassTest.java index 0b4d3d66a..e1e4f1c2b 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_70_NegatedCheckedPseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_70_NegatedCheckedPseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_70_NegatedCheckedPseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_72_NegatedRootPseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_72_NegatedRootPseudoClassTest.java index 3bd6af552..bf9e9e829 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_72_NegatedRootPseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_72_NegatedRootPseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_72_NegatedRootPseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_72b_NegatedRootPseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_72b_NegatedRootPseudoClassTest.java index 7302de587..71b1c7b19 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_72b_NegatedRootPseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_72b_NegatedRootPseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_72b_NegatedRootPseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_74_NegatedNthLastChildPseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_74_NegatedNthLastChildPseudoClassTest.java index d5eccb42e..a7d7745eb 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_74_NegatedNthLastChildPseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_74_NegatedNthLastChildPseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_74_NegatedNthLastChildPseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_74b_NegatedNthLastChildPseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_74b_NegatedNthLastChildPseudoClassTest.java index 52643ef7e..4286df70c 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_74b_NegatedNthLastChildPseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_74b_NegatedNthLastChildPseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_74b_NegatedNthLastChildPseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_75_NegatedNthOfTypePseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_75_NegatedNthOfTypePseudoClassTest.java index dee3717a5..1a3153b64 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_75_NegatedNthOfTypePseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_75_NegatedNthOfTypePseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_75_NegatedNthOfTypePseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_76_NegatedNthLastOfTypePseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_76_NegatedNthLastOfTypePseudoClassTest.java index e1ff08a9a..5c46b27fe 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_76_NegatedNthLastOfTypePseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_76_NegatedNthLastOfTypePseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_76_NegatedNthLastOfTypePseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_76b_NegatedNthLastOfTypePseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_76b_NegatedNthLastOfTypePseudoClassTest.java index 7f5bf120b..b56df10b3 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_76b_NegatedNthLastOfTypePseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_76b_NegatedNthLastOfTypePseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_76b_NegatedNthLastOfTypePseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_79_NegatedFirstOfTypePseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_79_NegatedFirstOfTypePseudoClassTest.java index da59ee4cd..8d08a4122 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_79_NegatedFirstOfTypePseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_79_NegatedFirstOfTypePseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_79_NegatedFirstOfTypePseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_80_NegatedLastOfTypePseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_80_NegatedLastOfTypePseudoClassTest.java index 6a6a30f7e..7b095ad19 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_80_NegatedLastOfTypePseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_80_NegatedLastOfTypePseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_80_NegatedLastOfTypePseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_81_NegatedOnlyChildPseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_81_NegatedOnlyChildPseudoClassTest.java index e39133da8..aa7f10e4a 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_81_NegatedOnlyChildPseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_81_NegatedOnlyChildPseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_81_NegatedOnlyChildPseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_81b_NegatedOnlyChildPseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_81b_NegatedOnlyChildPseudoClassTest.java index d8bf52b86..9224977c8 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_81b_NegatedOnlyChildPseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_81b_NegatedOnlyChildPseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_81b_NegatedOnlyChildPseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_82_NegatedOnlyOfTypePseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_82_NegatedOnlyOfTypePseudoClassTest.java index 50a4599c4..0087f7653 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_82_NegatedOnlyOfTypePseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_82_NegatedOnlyOfTypePseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_82_NegatedOnlyOfTypePseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_82b_NegatedOnlyOfTypePseudoClassTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_82b_NegatedOnlyOfTypePseudoClassTest.java index de86b7dd3..cbb8255dc 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_82b_NegatedOnlyOfTypePseudoClassTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_82b_NegatedOnlyOfTypePseudoClassTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_82b_NegatedOnlyOfTypePseudoClassTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_d1_NegatedDynamicHandlingOfEmptyTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_d1_NegatedDynamicHandlingOfEmptyTest.java index 99d29c578..93ea85191 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_d1_NegatedDynamicHandlingOfEmptyTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css3_selectors/Css3Modsel_d1_NegatedDynamicHandlingOfEmptyTest.java @@ -23,9 +23,9 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css3_selectors; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-1440") +@Disabled("DEVSIX-1440") public class Css3Modsel_d1_NegatedDynamicHandlingOfEmptyTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundColorBodyPropagation004Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundColorBodyPropagation004Test.java index 38809a83d..7ca0c86c9 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundColorBodyPropagation004Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundColorBodyPropagation004Test.java @@ -25,7 +25,7 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class BackgroundColorBodyPropagation004Test extends W3CCssTest { @Override diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundColorBodyPropagation005Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundColorBodyPropagation005Test.java index ae98a751c..7322b3839 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundColorBodyPropagation005Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundColorBodyPropagation005Test.java @@ -25,14 +25,11 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; import java.io.IOException; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; // TODO DEVSIX-4440 html with display: none throws IndexOutOfBoundsException public class BackgroundColorBodyPropagation005Test extends W3CCssTest { - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); @Override protected String getHtmlFileName() { @@ -42,7 +39,6 @@ protected String getHtmlFileName() { @Test @Override public void test() throws IOException, InterruptedException { - junitExpectedException.expect(RuntimeException.class); - super.test(); + Assertions.assertThrows(RuntimeException.class, () -> super.test()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundColorRootPropagation001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundColorRootPropagation001Test.java index 04af94de3..a9fd1961f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundColorRootPropagation001Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundColorRootPropagation001Test.java @@ -25,14 +25,11 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; import java.io.IOException; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; // TODO DEVSIX-4440 html with display: none throws IndexOutOfBoundsException public class BackgroundColorRootPropagation001Test extends W3CCssTest { - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); @Override protected String getHtmlFileName() { @@ -42,7 +39,6 @@ protected String getHtmlFileName() { @Test @Override public void test() throws IOException, InterruptedException { - junitExpectedException.expect(RuntimeException.class); - super.test(); + Assertions.assertThrows(RuntimeException.class, () -> super.test()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundMarginIframeRootTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundMarginIframeRootTest.java index aa0419fa3..6d0638b44 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundMarginIframeRootTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundMarginIframeRootTest.java @@ -28,7 +28,7 @@ This file is part of the iText (R) project. import com.itextpdf.test.annotations.LogMessages; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; // TODO DEVSIX-4391 support iframe tag public class BackgroundMarginIframeRootTest extends W3CCssTest { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundSizePercentageRootTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundSizePercentageRootTest.java index cd10690af..a7a977fa3 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundSizePercentageRootTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BackgroundSizePercentageRootTest.java @@ -25,7 +25,7 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class BackgroundSizePercentageRootTest extends W3CCssTest { @Override diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BoxShadowBodyTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BoxShadowBodyTest.java index f313c8bc0..74eff8078 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BoxShadowBodyTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/BoxShadowBodyTest.java @@ -25,7 +25,7 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; // TODO DEVSIX-4384 box-shadow is not supported public class BoxShadowBodyTest extends W3CCssTest { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/reference/BoxShadowBodyRefTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/reference/BoxShadowBodyRefTest.java index c460740e0..665f1cd4f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/reference/BoxShadowBodyRefTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_backgrounds/reference/BoxShadowBodyRefTest.java @@ -25,9 +25,7 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; import java.io.IOException; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Test; // TODO DEVSIX-4384 box-shadow is not supported public class BoxShadowBodyRefTest extends W3CCssTest { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_color_3/T32OpacityOffscreenMultipleBoxes1CTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_color_3/T32OpacityOffscreenMultipleBoxes1CTest.java index 7eb644a81..65e1bd429 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_color_3/T32OpacityOffscreenMultipleBoxes1CTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_color_3/T32OpacityOffscreenMultipleBoxes1CTest.java @@ -25,7 +25,7 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class T32OpacityOffscreenMultipleBoxes1CTest extends W3CCssTest { // In pdf, if several layers of the same color are drawn one atop another, then in case of transparency diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_color_3/T32OpacityOffscreenMultipleBoxes2CTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_color_3/T32OpacityOffscreenMultipleBoxes2CTest.java index 49dc827e1..bffd238d7 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_color_3/T32OpacityOffscreenMultipleBoxes2CTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_color_3/T32OpacityOffscreenMultipleBoxes2CTest.java @@ -25,7 +25,7 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class T32OpacityOffscreenMultipleBoxes2CTest extends W3CCssTest { // In pdf, if several layers of the same color are drawn one atop another, then in case of transparency diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_color_3/T422RgbaOnscreenMultipleBoxesCTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_color_3/T422RgbaOnscreenMultipleBoxesCTest.java index 1616209d9..aab46d2ba 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_color_3/T422RgbaOnscreenMultipleBoxesCTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_color_3/T422RgbaOnscreenMultipleBoxesCTest.java @@ -25,7 +25,7 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; import java.io.IOException; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class T422RgbaOnscreenMultipleBoxesCTest extends W3CCssTest { // In pdf, if several layers of the same color are drawn one atop another, then in case of transparency diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap001Test.java index 9f7dc7907..98fc05f4a 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap001Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap001Test.java @@ -27,7 +27,6 @@ This file is part of the iText (R) project. import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -//TODO DEVSIX-7554 change after column-gap is supported //TODO DEVSIX-7616 change after row-gap is supported //TODO DEVSIX-5164 change after align-content: space-around is supported //TODO DEVSIX-5163 change after more complex justify-content values are supported diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap002Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap002Test.java index ee7a23ef4..93d91f28b 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap002Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap002Test.java @@ -27,7 +27,6 @@ This file is part of the iText (R) project. import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -//TODO DEVSIX-7554 change after column-gap is supported //TODO DEVSIX-7616 change after row-gap is supported //TODO DEVSIX-5164 change after align-content: flex-start is supported @LogMessages(messages = @LogMessage(messageTemplate = Html2PdfLogMessageConstant.FLEX_PROPERTY_IS_NOT_SUPPORTED_YET, count = 6)) diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap003Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap003Test.java index 171ef2a2f..e5daf0111 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap003Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap003Test.java @@ -27,7 +27,6 @@ This file is part of the iText (R) project. import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -//TODO DEVSIX-7554 change after column-gap is supported //TODO DEVSIX-7616 change after row-gap is supported //TODO DEVSIX-5164 change after align-content: space-around is supported //TODO DEVSIX-5163 change after more complex justify-content values are supported diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap004Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap004Test.java index 62e7fa27e..2574d3f13 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap004Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_flexbox/FlexboxColumnRowGap004Test.java @@ -27,7 +27,6 @@ This file is part of the iText (R) project. import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -//TODO DEVSIX-7554 change after column-gap is supported //TODO DEVSIX-7616 change after row-gap is supported //TODO DEVSIX-5164 change after align-content: start is supported @LogMessages(messages = @LogMessage(messageTemplate = Html2PdfLogMessageConstant.FLEX_PROPERTY_IS_NOT_SUPPORTED_YET, count = 12)) diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/EmptyGridWithinFlexboxTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/EmptyGridWithinFlexboxTest.java new file mode 100644 index 000000000..c3dbcb8eb --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/EmptyGridWithinFlexboxTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class EmptyGridWithinFlexboxTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "empty-grid-within-flexbox.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridImportantTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridImportantTest.java new file mode 100644 index 000000000..5d90f1e11 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridImportantTest.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 3)}) +public class GridImportantTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-important.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridItemNonAutoHeightStretch001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridItemNonAutoHeightStretch001Test.java new file mode 100644 index 000000000..2b6297ea3 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridItemNonAutoHeightStretch001Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridItemNonAutoHeightStretch001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-item-non-auto-height-stretch-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridItemPercentageQuirk001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridItemPercentageQuirk001Test.java new file mode 100644 index 000000000..b8ed238aa --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridItemPercentageQuirk001Test.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG)}) +public class GridItemPercentageQuirk001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-item-percentage-quirk-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridTracksFractionalFrTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridTracksFractionalFrTest.java new file mode 100644 index 000000000..34577f129 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridTracksFractionalFrTest.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 3)}) +public class GridTracksFractionalFrTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-tracks-fractional-fr.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridTracksStretchedWithDifferentFlexFactorsSumTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridTracksStretchedWithDifferentFlexFactorsSumTest.java new file mode 100644 index 000000000..c88580f4b --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridTracksStretchedWithDifferentFlexFactorsSumTest.java @@ -0,0 +1,38 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 3) +}) +public class GridTracksStretchedWithDifferentFlexFactorsSumTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "tracks-stretched-diff-flex-factors-sum.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridWithinFlexboxDefiniteChangeTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridWithinFlexboxDefiniteChangeTest.java new file mode 100644 index 000000000..0efef4714 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/GridWithinFlexboxDefiniteChangeTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridWithinFlexboxDefiniteChangeTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-within-flexbox-definite-change.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/MinSizeAutoOverflowClipTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/MinSizeAutoOverflowClipTest.java new file mode 100644 index 000000000..ad025f3c6 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/MinSizeAutoOverflowClipTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class MinSizeAutoOverflowClipTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "min-size-auto-overflow-clip.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/StretchGridItemCheckboxInputTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/StretchGridItemCheckboxInputTest.java new file mode 100644 index 000000000..1b93ab3f7 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/StretchGridItemCheckboxInputTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class StretchGridItemCheckboxInputTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "stretch-grid-item-checkbox-input.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/StretchGridItemRadioInputTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/StretchGridItemRadioInputTest.java new file mode 100644 index 000000000..9e0b921f4 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/StretchGridItemRadioInputTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class StretchGridItemRadioInputTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "stretch-grid-item-radio-input.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/AbsolutePositioningDefiniteSizes001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/AbsolutePositioningDefiniteSizes001Test.java new file mode 100644 index 000000000..0eba36edd --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/AbsolutePositioningDefiniteSizes001Test.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 4)}) +public class AbsolutePositioningDefiniteSizes001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "absolute-positioning-definite-sizes-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/AbsolutePositioningGridContainerParent001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/AbsolutePositioningGridContainerParent001Test.java new file mode 100644 index 000000000..11514b046 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/AbsolutePositioningGridContainerParent001Test.java @@ -0,0 +1,35 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +public class AbsolutePositioningGridContainerParent001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "abs-pos-grid-container-parent-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/DescendantStaticPosition001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/DescendantStaticPosition001Test.java new file mode 100644 index 000000000..034c6adb4 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/DescendantStaticPosition001Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class DescendantStaticPosition001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "descendant-static-position-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/DescendantStaticPosition002Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/DescendantStaticPosition002Test.java new file mode 100644 index 000000000..a8894c9d5 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/DescendantStaticPosition002Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class DescendantStaticPosition002Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "descendant-static-position-002.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelf001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelf001Test.java new file mode 100644 index 000000000..afe7ef9a1 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelf001Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-5166 change after align-self is supported is supported +public class GridAbsposStaticposAlignSelf001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-abspos-staticpos-align-self-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelfImg001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelfImg001Test.java new file mode 100644 index 000000000..49df81399 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelfImg001Test.java @@ -0,0 +1,39 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.io.logs.IoLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +//TODO DEVSIX-5166 change after align-self is supported +@LogMessages(messages = { + @LogMessage(messageTemplate = IoLogMessageConstant.OCCUPIED_AREA_HAS_NOT_BEEN_INITIALIZED, count = 26) +}) +public class GridAbsposStaticposAlignSelfImg001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-abspos-staticpos-align-self-img-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelfSafe001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelfSafe001Test.java new file mode 100644 index 000000000..c9c97ff7a --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelfSafe001Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-5166 change after align-self is supported +public class GridAbsposStaticposAlignSelfSafe001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-abspos-staticpos-align-self-safe-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelfVertWM001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelfVertWM001Test.java new file mode 100644 index 000000000..388a1d791 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelfVertWM001Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-5166 change after align-self is supported +public class GridAbsposStaticposAlignSelfVertWM001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-abspos-staticpos-align-self-vertWM-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelfVertWM004Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelfVertWM004Test.java new file mode 100644 index 000000000..1c1d69324 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposAlignSelfVertWM004Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-5166 change after align-self is supported +public class GridAbsposStaticposAlignSelfVertWM004Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-abspos-staticpos-align-self-vertWM-004.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelf001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelf001Test.java new file mode 100644 index 000000000..fe6c9d490 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelf001Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-5163: Support more justify-content values +public class GridAbsposStaticposJustifySelf001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-abspos-staticpos-justify-self-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfImg001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfImg001Test.java new file mode 100644 index 000000000..6238e853a --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfImg001Test.java @@ -0,0 +1,39 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.io.logs.IoLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +//TODO DEVSIX-5163: Support more justify-content values +@LogMessages(messages = { + @LogMessage(messageTemplate = IoLogMessageConstant.OCCUPIED_AREA_HAS_NOT_BEEN_INITIALIZED, count = 26) +}) +public class GridAbsposStaticposJustifySelfImg001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-abspos-staticpos-justify-self-img-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfImg002Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfImg002Test.java new file mode 100644 index 000000000..921ceecac --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfImg002Test.java @@ -0,0 +1,39 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.io.logs.IoLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +//TODO DEVSIX-5163: Support more justify-content values +@LogMessages(messages = { + @LogMessage(messageTemplate = IoLogMessageConstant.OCCUPIED_AREA_HAS_NOT_BEEN_INITIALIZED, count = 26) +}) +public class GridAbsposStaticposJustifySelfImg002Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-abspos-staticpos-justify-self-img-002.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfRtl001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfRtl001Test.java new file mode 100644 index 000000000..311c651d2 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfRtl001Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-5163: Support more justify-content values +public class GridAbsposStaticposJustifySelfRtl001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-abspos-staticpos-justify-self-rtl-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfRtl004Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfRtl004Test.java new file mode 100644 index 000000000..03b769214 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfRtl004Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-5163: Support more justify-content values +public class GridAbsposStaticposJustifySelfRtl004Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-abspos-staticpos-justify-self-rtl-004.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfVertWM001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfVertWM001Test.java new file mode 100644 index 000000000..e391db83f --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridAbsposStaticposJustifySelfVertWM001Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-5163: Support more justify-content values +public class GridAbsposStaticposJustifySelfVertWM001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-abspos-staticpos-justify-self-vertWM-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridPaintPositionedChildren001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridPaintPositionedChildren001Test.java new file mode 100644 index 000000000..7f7962450 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridPaintPositionedChildren001Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridPaintPositionedChildren001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-paint-positioned-children-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridPositionedItemDynamicChange001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridPositionedItemDynamicChange001Test.java new file mode 100644 index 000000000..a04acef89 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridPositionedItemDynamicChange001Test.java @@ -0,0 +1,36 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = {@LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG)}) +public class GridPositionedItemDynamicChange001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-positioned-item-dynamic-change-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridPositionedItemsBackground001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridPositionedItemsBackground001Test.java new file mode 100644 index 000000000..80ab093b2 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/GridPositionedItemsBackground001Test.java @@ -0,0 +1,38 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.io.logs.IoLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = IoLogMessageConstant.OCCUPIED_AREA_HAS_NOT_BEEN_INITIALIZED, count = 4) +}) +public class GridPositionedItemsBackground001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-positioned-items-background-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/OrthogonalPositionedGridItems001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/OrthogonalPositionedGridItems001Test.java new file mode 100644 index 000000000..d8a08bff3 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/OrthogonalPositionedGridItems001Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class OrthogonalPositionedGridItems001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "orthogonal-positioned-grid-items-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/OrthogonalPositionedGridItems017Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/OrthogonalPositionedGridItems017Test.java new file mode 100644 index 000000000..861262935 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/OrthogonalPositionedGridItems017Test.java @@ -0,0 +1,38 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.io.logs.IoLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = IoLogMessageConstant.OCCUPIED_AREA_HAS_NOT_BEEN_INITIALIZED, count = 4) +}) +public class OrthogonalPositionedGridItems017Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "orthogonal-positioned-grid-items-017.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/PositionedGridItems001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/PositionedGridItems001Test.java new file mode 100644 index 000000000..62e4916fd --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/PositionedGridItems001Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class PositionedGridItems001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "positioned-grid-items-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/PositionedGridItems004Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/PositionedGridItems004Test.java new file mode 100644 index 000000000..a2d087d02 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/PositionedGridItems004Test.java @@ -0,0 +1,38 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.io.logs.IoLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = IoLogMessageConstant.OCCUPIED_AREA_HAS_NOT_BEEN_INITIALIZED, count = 4) +}) +public class PositionedGridItems004Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "positioned-grid-items-004.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/PositionedGridItems025Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/PositionedGridItems025Test.java new file mode 100644 index 000000000..276750a47 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/PositionedGridItems025Test.java @@ -0,0 +1,38 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.io.logs.IoLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = IoLogMessageConstant.OCCUPIED_AREA_HAS_NOT_BEEN_INITIALIZED, count = 2) +}) +public class PositionedGridItems025Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "positioned-grid-items-025.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/PositionedGridItemsNegativeIndices001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/PositionedGridItemsNegativeIndices001Test.java new file mode 100644 index 000000000..e3e0f8c5c --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/PositionedGridItemsNegativeIndices001Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.abspos; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class PositionedGridItemsNegativeIndices001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "positioned-grid-items-negative-indices-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaseline001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaseline001Test.java new file mode 100644 index 000000000..8cd53d959 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaseline001Test.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 3)}) +public class GridAlignBaseline001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-align-baseline-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaselineGrid001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaselineGrid001Test.java new file mode 100644 index 000000000..a99c15217 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaselineGrid001Test.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 3)}) +public class GridAlignBaselineGrid001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-align-baseline-grid-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaselineMulticol001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaselineMulticol001Test.java new file mode 100644 index 000000000..f7d5eef4e --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaselineMulticol001Test.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 3)}) +public class GridAlignBaselineMulticol001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-align-baseline-multicol-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaselineOverflow001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaselineOverflow001Test.java new file mode 100644 index 000000000..341d9b6d8 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaselineOverflow001Test.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 3)}) +public class GridAlignBaselineOverflow001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-align-baseline-overflow-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaselineVerticalTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaselineVerticalTest.java new file mode 100644 index 000000000..0853c3ed9 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignBaselineVerticalTest.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 5)}) +public class GridAlignBaselineVerticalTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-align-baseline-vertical.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignContentDistributionTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignContentDistributionTest.java new file mode 100644 index 000000000..4704ca398 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignContentDistributionTest.java @@ -0,0 +1,38 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 4), +}) +public class GridAlignContentDistributionTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-align-content-distribution.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignContentTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignContentTest.java new file mode 100644 index 000000000..ccd85dc3e --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignContentTest.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 4)}) +public class GridAlignContentTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-align-content.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignContentVerticalLrTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignContentVerticalLrTest.java new file mode 100644 index 000000000..bb08fe03f --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignContentVerticalLrTest.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 4)}) +public class GridAlignContentVerticalLrTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-align-content-vertical-lr.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignContentVerticalRlTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignContentVerticalRlTest.java new file mode 100644 index 000000000..6e7412510 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridAlignContentVerticalRlTest.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 4)}) +public class GridAlignContentVerticalRlTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-align-content-vertical-rl.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridContentDistribution001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridContentDistribution001Test.java new file mode 100644 index 000000000..f4940c75c --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridContentDistribution001Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-5163 Support more complex justify-content values +public class GridContentDistribution001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-content-distribution-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridContentDistribution015Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridContentDistribution015Test.java new file mode 100644 index 000000000..23bf9bfef --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridContentDistribution015Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-5163 Support more complex justify-content values +public class GridContentDistribution015Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-content-distribution-015.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridGutters001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridGutters001Test.java new file mode 100644 index 000000000..5a641e0cb --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridGutters001Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridGutters001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-gutters-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridGutters005Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridGutters005Test.java new file mode 100644 index 000000000..2e3bbc6c5 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridGutters005Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridGutters005Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-gutters-005.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridItemAutoMargins001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridItemAutoMargins001Test.java new file mode 100644 index 000000000..aeb815d6b --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/GridItemAutoMargins001Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.alignment; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridItemAutoMargins001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-item-auto-margins-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMaxSize002Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMaxSize002Test.java new file mode 100644 index 000000000..638855213 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMaxSize002Test.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_definition; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 3)}) +public class GridAutoRepeatMaxSize002Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-auto-repeat-max-size-002.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMinMaxSize001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMinMaxSize001Test.java new file mode 100644 index 000000000..68ea059e9 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMinMaxSize001Test.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_definition; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 3)}) +public class GridAutoRepeatMinMaxSize001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-auto-repeat-min-max-size-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMinSize001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMinSize001Test.java new file mode 100644 index 000000000..6b5043b2b --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMinSize001Test.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_definition; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 3)}) +public class GridAutoRepeatMinSize001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-auto-repeat-min-size-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMinmaxTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMinmaxTest.java new file mode 100644 index 000000000..541890fa6 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMinmaxTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_definition; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridAutoRepeatMinmaxTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-auto-repeat-minmax.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMultipleValues001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMultipleValues001Test.java new file mode 100644 index 000000000..d33ff5689 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatMultipleValues001Test.java @@ -0,0 +1,34 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_definition; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +import org.junit.jupiter.api.Disabled; + +public class GridAutoRepeatMultipleValues001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-auto-repeat-multiple-values-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatPositionedContainer001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatPositionedContainer001Test.java new file mode 100644 index 000000000..31a67c3bb --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridAutoRepeatPositionedContainer001Test.java @@ -0,0 +1,31 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_definition; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +public class GridAutoRepeatPositionedContainer001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "auto-repeat-pos-container-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridLayoutBasicTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridLayoutBasicTest.java new file mode 100644 index 000000000..3bbfdbaa9 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridLayoutBasicTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_definition; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridLayoutBasicTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-layout-basic.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridLayoutRepeatNotationTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridLayoutRepeatNotationTest.java new file mode 100644 index 000000000..f15524b98 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridLayoutRepeatNotationTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_definition; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridLayoutRepeatNotationTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-layout-repeat-notation.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridSupportNamedGridLines002Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridSupportNamedGridLines002Test.java new file mode 100644 index 000000000..4f0e1c599 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridSupportNamedGridLines002Test.java @@ -0,0 +1,39 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_definition; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.io.logs.IoLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.LINENAMES_ARE_NOT_SUPPORTED_WITHIN_AUTO_REPEAT, count = 38) +}) +public class GridSupportNamedGridLines002Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-support-named-grid-lines-002.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridTemplateColumnsFitContent001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridTemplateColumnsFitContent001Test.java new file mode 100644 index 000000000..ec1901e83 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridTemplateColumnsFitContent001Test.java @@ -0,0 +1,38 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_definition; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.io.logs.IoLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = IoLogMessageConstant.OCCUPIED_AREA_HAS_NOT_BEEN_INITIALIZED, count = 84) +}) +public class GridTemplateColumnsFitContent001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-template-columns-fit-content-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridTemplateRowsFitContent001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridTemplateRowsFitContent001Test.java new file mode 100644 index 000000000..7422f312e --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/GridTemplateRowsFitContent001Test.java @@ -0,0 +1,38 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_definition; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.io.logs.IoLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = IoLogMessageConstant.OCCUPIED_AREA_HAS_NOT_BEEN_INITIALIZED, count = 84) +}) +public class GridTemplateRowsFitContent001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-template-rows-fit-content-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridImgItemPercentMaxHeight001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridImgItemPercentMaxHeight001Test.java new file mode 100644 index 000000000..405e81d53 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridImgItemPercentMaxHeight001Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_items; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridImgItemPercentMaxHeight001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-img-item-percent-max-height-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridItemContainingBlock001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridItemContainingBlock001Test.java new file mode 100644 index 000000000..98954a0ca --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridItemContainingBlock001Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_items; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-8376 Support % in grid layout? +public class GridItemContainingBlock001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-item-containing-block-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridItemFlexContainer001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridItemFlexContainer001Test.java new file mode 100644 index 000000000..c48dd5343 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridItemFlexContainer001Test.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_items; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 4)}) +public class GridItemFlexContainer001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-item-flex-container-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridItemOverflowAutoMaxHeightPercentageTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridItemOverflowAutoMaxHeightPercentageTest.java new file mode 100644 index 000000000..e10eb88d5 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridItemOverflowAutoMaxHeightPercentageTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_items; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridItemOverflowAutoMaxHeightPercentageTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "overflow-auto-max-height-percentage.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridMinimumSizeGridItems001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridMinimumSizeGridItems001Test.java new file mode 100644 index 000000000..2701a63be --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridMinimumSizeGridItems001Test.java @@ -0,0 +1,39 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_items; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +//TODO DEVSIX-2449 z-index is not supported +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.ELEMENT_DOES_NOT_FIT_CURRENT_AREA) +}) +public class GridMinimumSizeGridItems001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-minimum-size-grid-items-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridMinimumSizeGridItems006Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridMinimumSizeGridItems006Test.java new file mode 100644 index 000000000..34c5e3d17 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridMinimumSizeGridItems006Test.java @@ -0,0 +1,39 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_items; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +//TODO DEVSIX-2449 z-index is not supported +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.ELEMENT_DOES_NOT_FIT_CURRENT_AREA) +}) +public class GridMinimumSizeGridItems006Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-minimum-size-grid-items-006.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridOrderPropertyAutoPlacement001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridOrderPropertyAutoPlacement001Test.java new file mode 100644 index 000000000..5f1b8cbb4 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/GridOrderPropertyAutoPlacement001Test.java @@ -0,0 +1,35 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_items; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-2449 z-index is not supported +//TODO DEVSIX-5163 Support more complex justify-content values +//TODO DEVSIX-5164 change after align-content is supported +public class GridOrderPropertyAutoPlacement001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-order-property-auto-placement-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/TableWithInfiniteMaxIntrinsicWidthTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/TableWithInfiniteMaxIntrinsicWidthTest.java new file mode 100644 index 000000000..8d17b6546 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/TableWithInfiniteMaxIntrinsicWidthTest.java @@ -0,0 +1,37 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_items; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.io.logs.IoLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +@LogMessages(messages = { + @LogMessage(messageTemplate = IoLogMessageConstant.TABLE_WIDTH_IS_MORE_THAN_EXPECTED_DUE_TO_MIN_WIDTH, count = 9)}) +public class TableWithInfiniteMaxIntrinsicWidthTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "table-with-infinite-max-intrinsic-width.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/ColumnPropertyShouldNotApplyOnGridContainer001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/ColumnPropertyShouldNotApplyOnGridContainer001Test.java new file mode 100644 index 000000000..7c17392b4 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/ColumnPropertyShouldNotApplyOnGridContainer001Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_model; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-2449 z-index is not supported +public class ColumnPropertyShouldNotApplyOnGridContainer001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "display-grid.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridContainerIgnoresFirstLetter002Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridContainerIgnoresFirstLetter002Test.java new file mode 100644 index 000000000..e5a054e77 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridContainerIgnoresFirstLetter002Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_model; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-2449 z-index is not supported +public class GridContainerIgnoresFirstLetter002Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-container-ignores-first-letter-002.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridFloat001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridFloat001Test.java new file mode 100644 index 000000000..006650968 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridFloat001Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_model; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-2449 z-index is not supported +public class GridFloat001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-float-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridFloat002Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridFloat002Test.java new file mode 100644 index 000000000..51195b602 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridFloat002Test.java @@ -0,0 +1,38 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_model; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; +import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; +import com.itextpdf.test.annotations.LogMessage; +import com.itextpdf.test.annotations.LogMessages; + +//TODO DEVSIX-2449 z-index is not supported +@LogMessages(messages = { + @LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG, count = 3)}) +public class GridFloat002Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-float-002.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridFloatsNoIntrude001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridFloatsNoIntrude001Test.java new file mode 100644 index 000000000..3071ddb8e --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridFloatsNoIntrude001Test.java @@ -0,0 +1,33 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_model; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +//TODO DEVSIX-2449 z-index is not supported +public class GridFloatsNoIntrude001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-floats-no-intrude-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridMarginsNoCollapse001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridMarginsNoCollapse001Test.java new file mode 100644 index 000000000..de2061bda --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridMarginsNoCollapse001Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_model; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridMarginsNoCollapse001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-margins-no-collapse-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridOverflowPadding001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridOverflowPadding001Test.java new file mode 100644 index 000000000..952b24ace --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/GridOverflowPadding001Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.grid_model; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridOverflowPadding001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-overflow-padding-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/GridSupportGridAutoColumnsRows001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/GridSupportGridAutoColumnsRows001Test.java new file mode 100644 index 000000000..0a1b38b58 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/GridSupportGridAutoColumnsRows001Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.implicit_grids; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridSupportGridAutoColumnsRows001Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-support-grid-auto-columns-rows-001.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/GridSupportGridAutoColumnsRows002Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/GridSupportGridAutoColumnsRows002Test.java new file mode 100644 index 000000000..68711c325 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/GridSupportGridAutoColumnsRows002Test.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.implicit_grids; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridSupportGridAutoColumnsRows002Test extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-support-grid-auto-columns-rows-002.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/placement/GridLayoutGridSpanTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/placement/GridLayoutGridSpanTest.java new file mode 100644 index 000000000..a038b8a6b --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/placement/GridLayoutGridSpanTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.placement; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridLayoutGridSpanTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-layout-grid-span.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/placement/GridLayoutLinesShorthandsTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/placement/GridLayoutLinesShorthandsTest.java new file mode 100644 index 000000000..d00ff5139 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/placement/GridLayoutLinesShorthandsTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.placement; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridLayoutLinesShorthandsTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-layout-lines-shorthands.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/placement/GridLayoutLinesTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/placement/GridLayoutLinesTest.java new file mode 100644 index 000000000..1086e8460 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/placement/GridLayoutLinesTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.placement; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridLayoutLinesTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-layout-lines.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/placement/GridLayoutPlacementShorthandsTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/placement/GridLayoutPlacementShorthandsTest.java new file mode 100644 index 000000000..f6f854486 --- /dev/null +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_grid/placement/GridLayoutPlacementShorthandsTest.java @@ -0,0 +1,32 @@ +/* + This file is part of the iText (R) project. + Copyright (c) 1998-2024 Apryse Group NV + Authors: Apryse Software. + + This program is offered under a commercial and under the AGPL license. + For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. + + AGPL licensing: + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + */ +package com.itextpdf.html2pdf.css.w3c.css_grid.placement; + +import com.itextpdf.html2pdf.css.w3c.W3CCssTest; + +public class GridLayoutPlacementShorthandsTest extends W3CCssTest { + @Override + protected String getHtmlFileName() { + return "grid-layout-placement-shorthands.html"; + } +} diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/AsColumnFlexItemTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/AsColumnFlexItemTest.java index b06c1fdb3..6ec711fc8 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/AsColumnFlexItemTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/AsColumnFlexItemTest.java @@ -23,11 +23,7 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css_multicol; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import com.itextpdf.io.logs.IoLogMessageConstant; -import com.itextpdf.test.annotations.LogMessage; -import com.itextpdf.test.annotations.LogMessages; -@LogMessages(messages = {@LogMessage(messageTemplate = IoLogMessageConstant.RECTANGLE_HAS_NEGATIVE_SIZE)}) public class AsColumnFlexItemTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/BalanceExtremelyTallContentCrashTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/BalanceExtremelyTallContentCrashTest.java index 5d0f3f5a9..0bf037732 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/BalanceExtremelyTallContentCrashTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/BalanceExtremelyTallContentCrashTest.java @@ -28,7 +28,7 @@ This file is part of the iText (R) project. import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; @LogMessages(messages = @LogMessage(messageTemplate = Html2PdfLogMessageConstant.ELEMENT_DOES_NOT_FIT_CURRENT_AREA, logLevel = LogLevelConstants.WARN)) diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolGapFraction002Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolGapFraction002Test.java index cc7f65640..717f6243a 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolGapFraction002Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolGapFraction002Test.java @@ -24,9 +24,9 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-7556 Support multicol+float elements on basic level") +@Disabled("DEVSIX-7556 Support multicol+float elements on basic level") public class MulticolGapFraction002Test extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolSpanAll008Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolSpanAll008Test.java index 6903ad4a4..e6a6ee024 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolSpanAll008Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolSpanAll008Test.java @@ -28,7 +28,7 @@ This file is part of the iText (R) project. import com.itextpdf.test.annotations.LogMessages; -@LogMessages(messages = @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 5)) +@LogMessages(messages = @LogMessage(messageTemplate = IoLogMessageConstant.TYPOGRAPHY_NOT_FOUND, count = 9)) public class MulticolSpanAll008Test extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolZeroHeight001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolZeroHeight001Test.java index 0e0f7b628..8e68df2c8 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolZeroHeight001Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/MulticolZeroHeight001Test.java @@ -24,9 +24,9 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-7556 Support multicol+float elements on basic level") +@Disabled("DEVSIX-7556 Support multicol+float elements on basic level") public class MulticolZeroHeight001Test extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/NestedAtOuterBoundaryAsFloatTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/NestedAtOuterBoundaryAsFloatTest.java index bcdce9cda..917a6094f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/NestedAtOuterBoundaryAsFloatTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/NestedAtOuterBoundaryAsFloatTest.java @@ -24,9 +24,9 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-7556 Support multicol+float elements on basic level") +@Disabled("DEVSIX-7556 Support multicol+float elements on basic level") public class NestedAtOuterBoundaryAsFloatTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/NestedFloatMulticolMonolithicChildTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/NestedFloatMulticolMonolithicChildTest.java index f1de6852d..38cf81c5b 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/NestedFloatMulticolMonolithicChildTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/NestedFloatMulticolMonolithicChildTest.java @@ -24,9 +24,9 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-7556 Support multicol+float elements on basic level") +@Disabled("DEVSIX-7556 Support multicol+float elements on basic level") public class NestedFloatMulticolMonolithicChildTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/NestedFloatedShapeCrashTest.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/NestedFloatedShapeCrashTest.java index f203f48a4..62b025434 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/NestedFloatedShapeCrashTest.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/NestedFloatedShapeCrashTest.java @@ -24,9 +24,9 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-7556 Support multicol+float elements on basic level") +@Disabled("DEVSIX-7556 Support multicol+float elements on basic level") public class NestedFloatedShapeCrashTest extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/SpannerInChildAfterParallelFlow001Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/SpannerInChildAfterParallelFlow001Test.java index 462b11862..b7eef9721 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/SpannerInChildAfterParallelFlow001Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/SpannerInChildAfterParallelFlow001Test.java @@ -24,9 +24,9 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-7556 Support multicol+float elements on basic level") +@Disabled("DEVSIX-7556 Support multicol+float elements on basic level") public class SpannerInChildAfterParallelFlow001Test extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/SpannerInChildAfterParallelFlow002Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/SpannerInChildAfterParallelFlow002Test.java index 1ea0c7f81..9f55e6d9f 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/SpannerInChildAfterParallelFlow002Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/SpannerInChildAfterParallelFlow002Test.java @@ -24,9 +24,9 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-7556 Support multicol+float elements on basic level") +@Disabled("DEVSIX-7556 Support multicol+float elements on basic level") public class SpannerInChildAfterParallelFlow002Test extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/SpannerInChildAfterParallelFlow003Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/SpannerInChildAfterParallelFlow003Test.java index 7afcd3b11..b0632d6bf 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/SpannerInChildAfterParallelFlow003Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_multicol/SpannerInChildAfterParallelFlow003Test.java @@ -24,9 +24,9 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; -@Ignore("DEVSIX-7556 Support multicol+float elements on basic level") +@Disabled("DEVSIX-7556 Support multicol+float elements on basic level") public class SpannerInChildAfterParallelFlow003Test extends W3CCssTest { @Override protected String getHtmlFileName() { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_ui_3/Outline008Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_ui_3/Outline008Test.java index 4e186abf7..35a6268d0 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_ui_3/Outline008Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_ui_3/Outline008Test.java @@ -23,7 +23,7 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css_ui_3; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; //There is a thin red "border" because of rendering issues public class Outline008Test extends W3CCssTest { diff --git a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_ui_3/Outline010Test.java b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_ui_3/Outline010Test.java index 15a707562..fdd388a30 100644 --- a/src/test/java/com/itextpdf/html2pdf/css/w3c/css_ui_3/Outline010Test.java +++ b/src/test/java/com/itextpdf/html2pdf/css/w3c/css_ui_3/Outline010Test.java @@ -23,7 +23,7 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.css.w3c.css_ui_3; import com.itextpdf.html2pdf.css.w3c.W3CCssTest; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; //There is a thin red "border" because of rendering issues public class Outline010Test extends W3CCssTest { diff --git a/src/test/java/com/itextpdf/html2pdf/element/AbbrTest.java b/src/test/java/com/itextpdf/html2pdf/element/AbbrTest.java index e124efda1..32ecefe8f 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/AbbrTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/AbbrTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.element; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class AbbrTest extends ExtendedHtmlConversionITextTest { public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/AbbrTest/"; public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/AbbrTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/AddressTest.java b/src/test/java/com/itextpdf/html2pdf/element/AddressTest.java index dd7d0a707..591cecfb5 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/AddressTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/AddressTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.element; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class AddressTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/AddressTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/AddressTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/ArticleTest.java b/src/test/java/com/itextpdf/html2pdf/element/ArticleTest.java index 6f6f2dcd3..135c722ac 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/ArticleTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/ArticleTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.element; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ArticleTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/ArticleTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/ArticleTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/AsideTest.java b/src/test/java/com/itextpdf/html2pdf/element/AsideTest.java index b07e7880c..f780b1ba4 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/AsideTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/AsideTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.element; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class AsideTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/AsideTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/AsideTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/BTest.java b/src/test/java/com/itextpdf/html2pdf/element/BTest.java index a1d2646a5..1c4334855 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/BTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/BTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/BTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/BTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void b01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "bTest01.html"), new File(destinationFolder + "bTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "bTest01.pdf", sourceFolder + "cmp_bTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "bTest01.pdf", sourceFolder + "cmp_bTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/BdoTest.java b/src/test/java/com/itextpdf/html2pdf/element/BdoTest.java index a70a5525e..9f9452f37 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/BdoTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/BdoTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.element; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BdoTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/BdoTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/BdoTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/BlockquoteTest.java b/src/test/java/com/itextpdf/html2pdf/element/BlockquoteTest.java index 3f36fab65..71dd192b2 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/BlockquoteTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/BlockquoteTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BlockquoteTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/BlockquoteTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/BlockquoteTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,12 +48,12 @@ public static void beforeClass() { @Test public void blockquote01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "blockquoteTest01.html"), new File(destinationFolder + "blockquoteTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "blockquoteTest01.pdf", sourceFolder + "cmp_blockquoteTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "blockquoteTest01.pdf", sourceFolder + "cmp_blockquoteTest01.pdf", destinationFolder, "diff01_")); } @Test public void blockquote02Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "blockquoteTest02.html"), new File(destinationFolder + "blockquoteTest02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "blockquoteTest02.pdf", sourceFolder + "cmp_blockquoteTest02.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "blockquoteTest02.pdf", sourceFolder + "cmp_blockquoteTest02.pdf", destinationFolder, "diff02_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/BodyTest.java b/src/test/java/com/itextpdf/html2pdf/element/BodyTest.java index 1f6c52a80..0dcaedd1a 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/BodyTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/BodyTest.java @@ -26,23 +26,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BodyTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/BodyTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/BodyTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -50,58 +49,58 @@ public static void beforeClass() { @Test public void body01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "bodyTest01.html"), new File(destinationFolder + "bodyTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest01.pdf", sourceFolder + "cmp_bodyTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest01.pdf", sourceFolder + "cmp_bodyTest01.pdf", destinationFolder, "diff01_")); } @Test public void body02Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "bodyTest02.html"), new File(destinationFolder + "bodyTest02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest02.pdf", sourceFolder + "cmp_bodyTest02.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest02.pdf", sourceFolder + "cmp_bodyTest02.pdf", destinationFolder, "diff02_")); } @Test public void body03Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "bodyTest03.html"), new File(destinationFolder + "bodyTest03.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest03.pdf", sourceFolder + "cmp_bodyTest03.pdf", destinationFolder, "diff03_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest03.pdf", sourceFolder + "cmp_bodyTest03.pdf", destinationFolder, "diff03_")); } @Test public void body04Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "bodyTest04.html"), new File(destinationFolder + "bodyTest04.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest04.pdf", sourceFolder + "cmp_bodyTest04.pdf", destinationFolder, "diff04_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest04.pdf", sourceFolder + "cmp_bodyTest04.pdf", destinationFolder, "diff04_")); } @Test public void body05Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "bodyTest05.html"), new File(destinationFolder + "bodyTest05.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest05.pdf", sourceFolder + "cmp_bodyTest05.pdf", destinationFolder, "diff05_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest05.pdf", sourceFolder + "cmp_bodyTest05.pdf", destinationFolder, "diff05_")); } @Test public void body06Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "bodyTest06.html"), new File(destinationFolder + "bodyTest06.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest06.pdf", sourceFolder + "cmp_bodyTest06.pdf", destinationFolder, "diff06_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest06.pdf", sourceFolder + "cmp_bodyTest06.pdf", destinationFolder, "diff06_")); } // this test is both for html and body @Test public void body07Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "bodyTest07.html"), new File(destinationFolder + "bodyTest07.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest07.pdf", sourceFolder + "cmp_bodyTest07.pdf", destinationFolder, "diff07_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest07.pdf", sourceFolder + "cmp_bodyTest07.pdf", destinationFolder, "diff07_")); } // this test is both for html and body @Test public void body08Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "bodyTest08.html"), new File(destinationFolder + "bodyTest08.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest08.pdf", sourceFolder + "cmp_bodyTest08.pdf", destinationFolder, "diff08_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest08.pdf", sourceFolder + "cmp_bodyTest08.pdf", destinationFolder, "diff08_")); } // this test is both for html and body @Test public void body09Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "bodyTest09.html"), new File(destinationFolder + "bodyTest09.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest09.pdf", sourceFolder + "cmp_bodyTest09.pdf", destinationFolder, "diff09_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "bodyTest09.pdf", sourceFolder + "cmp_bodyTest09.pdf", destinationFolder, "diff09_")); } @Test public void helloMalformedDocumentTest() throws IOException, InterruptedException { diff --git a/src/test/java/com/itextpdf/html2pdf/element/BrTest.java b/src/test/java/com/itextpdf/html2pdf/element/BrTest.java index 4e9735d8b..15af549fb 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/BrTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/BrTest.java @@ -32,24 +32,23 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.FileInputStream; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class BrTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/BrTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/BrTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -57,22 +56,22 @@ public static void beforeClass() { @Test public void br01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "brTest01.html"), new File(destinationFolder + "brTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "brTest01.pdf", sourceFolder + "cmp_brTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "brTest01.pdf", sourceFolder + "cmp_brTest01.pdf", destinationFolder, "diff01_")); } @Test public void br02Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "brTest02.html"), new File(destinationFolder + "brTest02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "brTest02.pdf", sourceFolder + "cmp_brTest02.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "brTest02.pdf", sourceFolder + "cmp_brTest02.pdf", destinationFolder, "diff02_")); } @Test - @Ignore("DEVSIX-1655") + @Disabled("DEVSIX-1655") public void br03Test() throws IOException, InterruptedException { PdfDocument pdfDoc = new PdfDocument(new PdfWriter(destinationFolder + "brTest03.pdf")); pdfDoc.setDefaultPageSize(new PageSize(72, 72)); HtmlConverter.convertToPdf(new FileInputStream(sourceFolder + "brTest03.html"), pdfDoc, new ConverterProperties()); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "brTest03.pdf", sourceFolder + "cmp_brTest03.pdf", destinationFolder, "diff03_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "brTest03.pdf", sourceFolder + "cmp_brTest03.pdf", destinationFolder, "diff03_")); } @Test @@ -82,7 +81,7 @@ public void br03Test() throws IOException, InterruptedException { // TODO DEVSIX-2092 public void brInsideDifferentTagsTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "brInsideDifferentTagsTest01.html"), new File(destinationFolder + "brInsideDifferentTagsTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "brInsideDifferentTagsTest01.pdf", sourceFolder + "cmp_brInsideDifferentTagsTest01.pdf", destinationFolder, "diff04_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "brInsideDifferentTagsTest01.pdf", sourceFolder + "cmp_brInsideDifferentTagsTest01.pdf", destinationFolder, "diff04_")); } @Test diff --git a/src/test/java/com/itextpdf/html2pdf/element/CaptionTest.java b/src/test/java/com/itextpdf/html2pdf/element/CaptionTest.java index 6fe66fc61..db4419b64 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/CaptionTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/CaptionTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CaptionTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/CaptionTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/CaptionTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,19 +48,19 @@ public static void beforeClass() { @Test public void caption01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "captionTest01.html"), new File(destinationFolder + "captionTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "captionTest01.pdf", sourceFolder + "cmp_captionTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "captionTest01.pdf", sourceFolder + "cmp_captionTest01.pdf", destinationFolder, "diff01_")); } @Test public void figCaption01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "figCaption01.html"), new File(destinationFolder + "figCaption01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "figCaption01.pdf", sourceFolder + "cmp_figCaption01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "figCaption01.pdf", sourceFolder + "cmp_figCaption01.pdf", destinationFolder, "diff01_")); } @Test // TODO DEVSIX-5010 Incorrect offset of Caption after generating PDF from HTML public void figCaption02Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "figCaption02.html"), new File(destinationFolder + "figCaption02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "figCaption02.pdf", sourceFolder + "cmp_figCaption02.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "figCaption02.pdf", sourceFolder + "cmp_figCaption02.pdf", destinationFolder, "diff02_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/CenterTest.java b/src/test/java/com/itextpdf/html2pdf/element/CenterTest.java index 0f81d1c36..5fce5fe29 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/CenterTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/CenterTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CenterTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/CenterTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/CenterTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,12 +48,12 @@ public static void beforeClass() { @Test public void center01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "centerTest01.html"), new File(destinationFolder + "centerTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "centerTest01.pdf", sourceFolder + "cmp_centerTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "centerTest01.pdf", sourceFolder + "cmp_centerTest01.pdf", destinationFolder, "diff01_")); } @Test public void center02Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "centerTest02.html"), new File(destinationFolder + "centerTest02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "centerTest02.pdf", sourceFolder + "cmp_centerTest02.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "centerTest02.pdf", sourceFolder + "cmp_centerTest02.pdf", destinationFolder, "diff02_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/CiteTest.java b/src/test/java/com/itextpdf/html2pdf/element/CiteTest.java index c9c37850e..3633aaa07 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/CiteTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/CiteTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CiteTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/CiteTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/CiteTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void cite01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "citeTest01.html"), new File(destinationFolder + "citeTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "citeTest01.pdf", sourceFolder + "cmp_citeTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "citeTest01.pdf", sourceFolder + "cmp_citeTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/CodeTest.java b/src/test/java/com/itextpdf/html2pdf/element/CodeTest.java index 33973de52..581a0142f 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/CodeTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/CodeTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class CodeTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/CodeTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/CodeTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,18 +48,18 @@ public static void beforeClass() { @Test public void code01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "codeTest01.html"), new File(destinationFolder + "codeTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "codeTest01.pdf", sourceFolder + "cmp_codeTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "codeTest01.pdf", sourceFolder + "cmp_codeTest01.pdf", destinationFolder, "diff01_")); } @Test public void code02Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "codeTest02.html"), new File(destinationFolder + "codeTest02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "codeTest02.pdf", sourceFolder + "cmp_codeTest02.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "codeTest02.pdf", sourceFolder + "cmp_codeTest02.pdf", destinationFolder, "diff02_")); } @Test public void code03Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "codeTest03.html"), new File(destinationFolder + "codeTest03.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "codeTest03.pdf", sourceFolder + "cmp_codeTest03.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "codeTest03.pdf", sourceFolder + "cmp_codeTest03.pdf", destinationFolder, "diff02_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/ColColgroupTest.java b/src/test/java/com/itextpdf/html2pdf/element/ColColgroupTest.java index 6f02ea111..eba9e3de0 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/ColColgroupTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/ColColgroupTest.java @@ -24,20 +24,19 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ColColgroupTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/ColColgroupTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/ColColgroupTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/DelTest.java b/src/test/java/com/itextpdf/html2pdf/element/DelTest.java index f588e6b3f..523ca991c 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/DelTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/DelTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class DelTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/DelTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/DelTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void del01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "delTest01.html"), new File(destinationFolder + "delTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "delTest01.pdf", sourceFolder + "cmp_delTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "delTest01.pdf", sourceFolder + "cmp_delTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/DfnTest.java b/src/test/java/com/itextpdf/html2pdf/element/DfnTest.java index f99c12b30..b5e4727ba 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/DfnTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/DfnTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class DfnTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/DfnTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/DfnTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void dfn01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "dfnTest01.html"), new File(destinationFolder + "dfnTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "dfnTest01.pdf", sourceFolder + "cmp_dfnTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "dfnTest01.pdf", sourceFolder + "cmp_dfnTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/DivTest.java b/src/test/java/com/itextpdf/html2pdf/element/DivTest.java index 2d10681b6..82da6aad5 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/DivTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/DivTest.java @@ -24,20 +24,19 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ConverterProperties; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class DivTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/element/DivTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/element/DivTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/EmTest.java b/src/test/java/com/itextpdf/html2pdf/element/EmTest.java index e81b42300..2f03a63c2 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/EmTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/EmTest.java @@ -26,23 +26,22 @@ This file is part of the iText (R) project. import com.itextpdf.io.util.UrlUtil; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class EmTest extends ExtendedITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/element/EmTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/element/EmTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -65,6 +64,6 @@ private void runTest(String testName) throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(htmlName), new File(outFileName)); System.out.println("html: " + UrlUtil.getNormalizedFileUriString(htmlName) + "\n"); - Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, DESTINATION_FOLDER)); + Assertions.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, DESTINATION_FOLDER)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/FigureTest.java b/src/test/java/com/itextpdf/html2pdf/element/FigureTest.java index f2b879712..06ec4832d 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/FigureTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/FigureTest.java @@ -31,21 +31,20 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.pdf.xobject.PdfImageXObject; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FigureTest extends ExtendedITextTest { private static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/FigureTest/"; private static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/FigureTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -53,19 +52,19 @@ public static void beforeClass() { @Test public void figureFileDocumentTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hello_figure_file.html"), new File(destinationFolder + "hello_figure_file.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hello_figure_file.pdf", sourceFolder + "cmp_hello_figure_file.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hello_figure_file.pdf", sourceFolder + "cmp_hello_figure_file.pdf", destinationFolder, "diff01_")); } @Test public void smallFigureTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "smallFigureTest.html"), new File(destinationFolder + "smallFigureTest.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "smallFigureTest.pdf", sourceFolder + "cmp_smallFigureTest.pdf", destinationFolder, "diff03_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "smallFigureTest.pdf", sourceFolder + "cmp_smallFigureTest.pdf", destinationFolder, "diff03_")); } @Test public void figureInSpanTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "figureInSpan.html"), new File(destinationFolder + "figureInSpan.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "figureInSpan.pdf", sourceFolder + "cmp_figureInSpan.pdf", destinationFolder, "diff04_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "figureInSpan.pdf", sourceFolder + "cmp_figureInSpan.pdf", destinationFolder, "diff04_")); } @Test @@ -75,12 +74,12 @@ public void checkImageRemainsUncutWithFigureTagTest() throws IOException { try (PdfDocument doc = new PdfDocument(new PdfReader(pdfFile))) { final int pageNr = 2; PdfImageXObject image = doc.getPage(pageNr).getResources().getImage(new PdfName("Im1")); - Assert.assertNotNull(image); + Assertions.assertNotNull(image); ImageSizeMeasuringListener listener = new ImageSizeMeasuringListener(pageNr); PdfCanvasProcessor processor = new PdfCanvasProcessor(listener); processor.processPageContent(doc.getPage(pageNr)); boolean isImageCropped = listener.bbox.getY() < 0; - Assert.assertFalse(isImageCropped); + Assertions.assertFalse(isImageCropped); } } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/FormTest.java b/src/test/java/com/itextpdf/html2pdf/element/FormTest.java index 1d336e01f..e3f53c8b8 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/FormTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/FormTest.java @@ -40,23 +40,22 @@ This file is part of the iText (R) project. import com.itextpdf.test.LogLevelConstants; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.FileInputStream; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class FormTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/FormTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/FormTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -154,7 +153,7 @@ public void labelTest() throws IOException, InterruptedException { } @Test - @Ignore("DEVSIX-1316") + @Disabled("DEVSIX-1316") public void fieldInTablePercent() throws IOException, InterruptedException { runTest("fieldInTablePercent"); } @@ -249,7 +248,7 @@ public void radioButtonWithPageCounterAtBottonTest() throws IOException, Interru System.out.println("html: " + UrlUtil.getNormalizedFileUriString(html) + "\n"); - Assert.assertNull(new CompareTool().compareByContent( + Assertions.assertNull(new CompareTool().compareByContent( pdf, sourceFolder + "cmp_radioButtonWithPageCounterAtBotton.pdf", destinationFolder)); } @@ -263,7 +262,7 @@ public void radioButtonWithPageCounterOnTopTest() throws IOException, Interrupte System.out.println("html: " + UrlUtil.getNormalizedFileUriString(html) + "\n"); - Assert.assertNull(new CompareTool().compareByContent( + Assertions.assertNull(new CompareTool().compareByContent( pdf, sourceFolder + "cmp_radioButtonWithPageCounterOnTop.pdf", destinationFolder)); } @@ -276,7 +275,7 @@ public void radioButtonNoPageCounterTest() throws IOException, InterruptedExcept System.out.println("html: " + UrlUtil.getNormalizedFileUriString(html) + "\n"); - Assert.assertNull(new CompareTool().compareByContent( + Assertions.assertNull(new CompareTool().compareByContent( pdf, sourceFolder + "cmp_radioButtonNoPageCounter.pdf", destinationFolder)); } @@ -355,10 +354,10 @@ private void runTest(String name, boolean flattenPdfAcroFormFields) throws IOExc document.close(); } - Assert.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder, diff)); - Assert.assertNull(new CompareTool().compareByContent(outAcroPdfPath, cmpAcroPdfPath, destinationFolder, diff)); + Assertions.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder, diff)); + Assertions.assertNull(new CompareTool().compareByContent(outAcroPdfPath, cmpAcroPdfPath, destinationFolder, diff)); if (flattenPdfAcroFormFields) { - Assert.assertNull( + Assertions.assertNull( new CompareTool().compareByContent(outAcroFlattenPdfPath, cmpAcroFlattenPdfPath, destinationFolder, diff)); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/HTest.java b/src/test/java/com/itextpdf/html2pdf/element/HTest.java index 69a73d37a..ffb1f785d 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/HTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/HTest.java @@ -29,24 +29,23 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.pdf.PdfWriter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.FileInputStream; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/HTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/HTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -55,35 +54,35 @@ public static void beforeClass() { public void h1Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hTest01.html"), new File(destinationFolder + "hTest01.pdf"), new ConverterProperties().setOutlineHandler(OutlineHandler.createStandardHandler())); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hTest01.pdf", sourceFolder + "cmp_hTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hTest01.pdf", sourceFolder + "cmp_hTest01.pdf", destinationFolder, "diff01_")); } @Test public void h2Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hTest02.html"), new File(destinationFolder + "hTest02.pdf"), new ConverterProperties().setOutlineHandler(OutlineHandler.createStandardHandler())); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hTest02.pdf", sourceFolder + "cmp_hTest02.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hTest02.pdf", sourceFolder + "cmp_hTest02.pdf", destinationFolder, "diff02_")); } @Test public void h3Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hTest03.html"), new File(destinationFolder + "hTest03.pdf"), new ConverterProperties().setOutlineHandler(OutlineHandler.createStandardHandler())); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hTest03.pdf", sourceFolder + "cmp_hTest03.pdf", destinationFolder, "diff03_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hTest03.pdf", sourceFolder + "cmp_hTest03.pdf", destinationFolder, "diff03_")); } @Test public void h4Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hTest04.html"), new File(destinationFolder + "hTest04.pdf"), new ConverterProperties().setOutlineHandler(OutlineHandler.createStandardHandler())); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hTest04.pdf", sourceFolder + "cmp_hTest04.pdf", destinationFolder, "diff04_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hTest04.pdf", sourceFolder + "cmp_hTest04.pdf", destinationFolder, "diff04_")); } @Test public void h5Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "hTest05.html"), new File(destinationFolder + "hTest05.pdf"), new ConverterProperties().setOutlineHandler(OutlineHandler.createStandardHandler())); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hTest05.pdf", sourceFolder + "cmp_hTest05.pdf", destinationFolder, "diff05_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hTest05.pdf", sourceFolder + "cmp_hTest05.pdf", destinationFolder, "diff05_")); } @Test @@ -91,7 +90,7 @@ public void hTagRoleTest() throws IOException, InterruptedException { PdfDocument pdfDocument = new PdfDocument(new PdfWriter(destinationFolder + "hTest06.pdf")); pdfDocument.setTagged(); HtmlConverter.convertToPdf(new FileInputStream(sourceFolder + "hTest06.html"), pdfDocument, new ConverterProperties()); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "hTest06.pdf", sourceFolder + "cmp_hTest06.pdf", destinationFolder, "diff06_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "hTest06.pdf", sourceFolder + "cmp_hTest06.pdf", destinationFolder, "diff06_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/HeaderFooterTest.java b/src/test/java/com/itextpdf/html2pdf/element/HeaderFooterTest.java index 5d046062e..f9ff93f16 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/HeaderFooterTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/HeaderFooterTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HeaderFooterTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/HeaderFooterTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/HeaderFooterTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void headerFooter01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "headerFooterTest01.html"), new File(destinationFolder + "headerFooterTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "headerFooterTest01.pdf", sourceFolder + "cmp_headerFooterTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "headerFooterTest01.pdf", sourceFolder + "cmp_headerFooterTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/HrTest.java b/src/test/java/com/itextpdf/html2pdf/element/HrTest.java index ece68622f..f812dc278 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/HrTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/HrTest.java @@ -27,21 +27,20 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HrTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/HrTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/HrTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -163,6 +162,6 @@ private void runHrTest(String id) throws IOException, InterruptedException { String cmpPdfPath = sourceFolder + "cmp_hrTest" + id + ".pdf"; String diff = "diff" + id + "_"; HtmlConverter.convertToPdf(new File(htmlPath), new File(outPdfPath)); - Assert.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder, diff)); + Assertions.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder, diff)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/HtmlTest.java b/src/test/java/com/itextpdf/html2pdf/element/HtmlTest.java index 10737449d..d88088fe9 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/HtmlTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/HtmlTest.java @@ -29,23 +29,22 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HtmlTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/HtmlTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/HtmlTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -53,59 +52,59 @@ public static void beforeClass() { @Test public void html01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "htmlTest01.html"), new File(destinationFolder + "htmlTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest01.pdf", sourceFolder + "cmp_htmlTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest01.pdf", sourceFolder + "cmp_htmlTest01.pdf", destinationFolder, "diff01_")); } @Test @LogMessages(messages = {@LogMessage(messageTemplate = Html2PdfLogMessageConstant.NO_WORKER_FOUND_FOR_TAG)}) public void html02Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "htmlTest02.html"), new File(destinationFolder + "htmlTest02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest02.pdf", sourceFolder + "cmp_htmlTest02.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest02.pdf", sourceFolder + "cmp_htmlTest02.pdf", destinationFolder, "diff02_")); } @Test public void html03Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "htmlTest03.html"), new File(destinationFolder + "htmlTest03.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest03.pdf", sourceFolder + "cmp_htmlTest03.pdf", destinationFolder, "diff03_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest03.pdf", sourceFolder + "cmp_htmlTest03.pdf", destinationFolder, "diff03_")); } // this test is both for html and body @Test public void html04Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "htmlTest04.html"), new File(destinationFolder + "htmlTest04.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest04.pdf", sourceFolder + "cmp_htmlTest04.pdf", destinationFolder, "diff04_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest04.pdf", sourceFolder + "cmp_htmlTest04.pdf", destinationFolder, "diff04_")); } @Test public void html05Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "htmlTest05.html"), new File(destinationFolder + "htmlTest05.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest05.pdf", sourceFolder + "cmp_htmlTest05.pdf", destinationFolder, "diff05_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest05.pdf", sourceFolder + "cmp_htmlTest05.pdf", destinationFolder, "diff05_")); } // this test is both for html and body @Test public void html06Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "htmlTest06.html"), new File(destinationFolder + "htmlTest06.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest06.pdf", sourceFolder + "cmp_htmlTest06.pdf", destinationFolder, "diff06_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest06.pdf", sourceFolder + "cmp_htmlTest06.pdf", destinationFolder, "diff06_")); } // this test is both for html and body @Test public void html07Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "htmlTest07.html"), new File(destinationFolder + "htmlTest07.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest07.pdf", sourceFolder + "cmp_htmlTest07.pdf", destinationFolder, "diff07_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest07.pdf", sourceFolder + "cmp_htmlTest07.pdf", destinationFolder, "diff07_")); } @Test public void html08Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "htmlTest08.html"), new File(destinationFolder + "htmlTest08.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest08.pdf", sourceFolder + "cmp_htmlTest08.pdf", destinationFolder, "diff08_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest08.pdf", sourceFolder + "cmp_htmlTest08.pdf", destinationFolder, "diff08_")); } //TODO replace cmp file when fixing DEVSIX-7303 @Test public void html09Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "htmlTest09.html"), new File(destinationFolder + "htmlTest09.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest09.pdf", sourceFolder + "cmp_htmlTest09.pdf", destinationFolder, "diff09_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "htmlTest09.pdf", sourceFolder + "cmp_htmlTest09.pdf", destinationFolder, "diff09_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/ITest.java b/src/test/java/com/itextpdf/html2pdf/element/ITest.java index 7b0157942..d775749fa 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/ITest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/ITest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ITest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/ITest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/ITest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void i01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "iTest01.html"), new File(destinationFolder + "iTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "iTest01.pdf", sourceFolder + "cmp_iTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "iTest01.pdf", sourceFolder + "cmp_iTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/ImageTest.java b/src/test/java/com/itextpdf/html2pdf/element/ImageTest.java index c9073ed1c..ef9660e89 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/ImageTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/ImageTest.java @@ -27,20 +27,19 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.logs.Html2PdfLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ImageTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/element/ImageTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/element/ImageTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/InputTest.java b/src/test/java/com/itextpdf/html2pdf/element/InputTest.java index 3d901a09a..87d0c5882 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/InputTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/InputTest.java @@ -49,7 +49,6 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.node.IElementNode; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import com.itextpdf.test.pdfa.VeraPdfValidator; import java.io.File; @@ -59,19 +58,19 @@ This file is part of the iText (R) project. import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class InputTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/InputTest/"; public static final String sourceFolderResources = "./src/test/resources/com/itextpdf/html2pdf/fonts/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/InputTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -114,7 +113,7 @@ public void input06Test() throws IOException, InterruptedException { PdfDocument pdfDoc = new PdfDocument(new PdfWriter(outPdfPath)); pdfDoc.setDefaultPageSize(PageSize.A8); HtmlConverter.convertToPdf(new FileInputStream(htmlPath), pdfDoc, new ConverterProperties().setCreateAcroForm(true)); - Assert.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder, "diff_inputTest06_")); + Assertions.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder, "diff_inputTest06_")); } @Test @@ -216,7 +215,7 @@ public void inputDisabled01AcroTest() throws IOException, InterruptedException { String outPdfPath = destinationFolder + "inputDisabled01AcroTest.pdf"; String cmpPdfPath = sourceFolder + "cmp_" + "inputDisabled01AcroTest.pdf"; HtmlConverter.convertToPdf(new File(htmlPath), new File(outPdfPath), new ConverterProperties().setCreateAcroForm(true)); - Assert.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder)); } @Test @@ -248,7 +247,7 @@ public void placeholderTest05() throws IOException, InterruptedException { } doc.close(); - Assert.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder, "diff_placeholderTest05_")); + Assertions.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder, "diff_placeholderTest05_")); } @Test @@ -358,11 +357,11 @@ private void runPDFATest(String name) throws IOException, InterruptedException { } System.out.println("html: " + UrlUtil.getNormalizedFileUriString(sourceHtml) + "\n"); - Assert.assertNull(new CompareTool().compareByContent(destinationPdf, cmpPdf, destinationFolder, + Assertions.assertNull(new CompareTool().compareByContent(destinationPdf, cmpPdf, destinationFolder, "diff_" + name + "_")); VeraPdfValidator veraPdfValidator = new VeraPdfValidator(); - Assert.assertNull(veraPdfValidator.validate(destinationPdf)); + Assertions.assertNull(veraPdfValidator.validate(destinationPdf)); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/InsTest.java b/src/test/java/com/itextpdf/html2pdf/element/InsTest.java index 95c6b9366..eb54642f3 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/InsTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/InsTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class InsTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/InsTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/InsTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void ins01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "insTest01.html"), new File(destinationFolder + "insTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "insTest01.pdf", sourceFolder + "cmp_insTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "insTest01.pdf", sourceFolder + "cmp_insTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/KbdTest.java b/src/test/java/com/itextpdf/html2pdf/element/KbdTest.java index 0981a9bc7..1686f3c9f 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/KbdTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/KbdTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class KbdTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/KbdTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/KbdTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void kbd01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "kbdTest01.html"), new File(destinationFolder + "kbdTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "kbdTest01.pdf", sourceFolder + "cmp_kbdTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "kbdTest01.pdf", sourceFolder + "cmp_kbdTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/LabelTest.java b/src/test/java/com/itextpdf/html2pdf/element/LabelTest.java index 102b03875..c4d65f42c 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/LabelTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/LabelTest.java @@ -26,22 +26,21 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class LabelTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/LabelTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/LabelTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/LinkTest.java b/src/test/java/com/itextpdf/html2pdf/element/LinkTest.java index 2d9a47a72..8b513e1ce 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/LinkTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/LinkTest.java @@ -35,24 +35,23 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class LinkTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/LinkTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/LinkTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -65,37 +64,37 @@ public void linkTest01() throws IOException, InterruptedException { try (FileInputStream fileInputStream = new FileInputStream(sourceFolder + "linkTest01.html")) { HtmlConverter.convertToPdf(fileInputStream, outDoc); } - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest01.pdf", sourceFolder + "cmp_linkTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest01.pdf", sourceFolder + "cmp_linkTest01.pdf", destinationFolder, "diff01_")); } @Test public void linkTest02() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "linkTest02.html"), new File(destinationFolder + "linkTest02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest02.pdf", sourceFolder + "cmp_linkTest02.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest02.pdf", sourceFolder + "cmp_linkTest02.pdf", destinationFolder, "diff02_")); } @Test public void linkTest03() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "linkTest03.html"), new File(destinationFolder + "linkTest03.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest03.pdf", sourceFolder + "cmp_linkTest03.pdf", destinationFolder, "diff03_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest03.pdf", sourceFolder + "cmp_linkTest03.pdf", destinationFolder, "diff03_")); } @Test public void linkTest04() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "linkTest04.html"), new File(destinationFolder + "linkTest04.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest04.pdf", sourceFolder + "cmp_linkTest04.pdf", destinationFolder, "diff04_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest04.pdf", sourceFolder + "cmp_linkTest04.pdf", destinationFolder, "diff04_")); } @Test public void linkTest05() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "linkTest05.html"), new File(destinationFolder + "linkTest05.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest05.pdf", sourceFolder + "cmp_linkTest05.pdf", destinationFolder, "diff05_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest05.pdf", sourceFolder + "cmp_linkTest05.pdf", destinationFolder, "diff05_")); } @Test public void linkTest06() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "linkTest06.html"), new File(destinationFolder + "linkTest06.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest06.pdf", sourceFolder + "cmp_linkTest06.pdf", destinationFolder, "diff06_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest06.pdf", sourceFolder + "cmp_linkTest06.pdf", destinationFolder, "diff06_")); } @Test @@ -105,7 +104,7 @@ public void linkTest07() throws IOException, InterruptedException { try (FileInputStream fileInputStream = new FileInputStream(sourceFolder + "linkTest07.html")) { HtmlConverter.convertToPdf(fileInputStream, outDoc); } - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest07.pdf", sourceFolder + "cmp_linkTest07.pdf", destinationFolder, "diff07_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest07.pdf", sourceFolder + "cmp_linkTest07.pdf", destinationFolder, "diff07_")); } @Test @@ -115,7 +114,7 @@ public void linkTest08() throws IOException, InterruptedException { try (FileInputStream fileInputStream = new FileInputStream(sourceFolder + "linkTest08.html")) { HtmlConverter.convertToPdf(fileInputStream, pdfDocument, new ConverterProperties().setBaseUri(sourceFolder)); } - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest08.pdf", sourceFolder + "cmp_linkTest08.pdf", destinationFolder, "diff08_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest08.pdf", sourceFolder + "cmp_linkTest08.pdf", destinationFolder, "diff08_")); } @Test @@ -125,7 +124,7 @@ public void linkTest09() throws IOException, InterruptedException { try (FileInputStream fileInputStream = new FileInputStream(sourceFolder + "linkTest09.html")) { HtmlConverter.convertToPdf(fileInputStream, pdfDocument, new ConverterProperties().setBaseUri(sourceFolder)); } - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest09.pdf", sourceFolder + "cmp_linkTest09.pdf", destinationFolder, "diff09_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest09.pdf", sourceFolder + "cmp_linkTest09.pdf", destinationFolder, "diff09_")); } // Android-Conversion-Skip-Block-Start (TODO DEVSIX-7372 investigate why a few tests related to PdfA in iTextCore and PdfHtml were cut) @@ -139,7 +138,7 @@ public void linkTest10ToPdfa() throws IOException, InterruptedException { HtmlConverter.convertToPdf(fileInputStream, pdfADocument); } - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest10.pdf", sourceFolder + "cmp_linkTest10.pdf", destinationFolder, "diff10_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest10.pdf", sourceFolder + "cmp_linkTest10.pdf", destinationFolder, "diff10_")); } // Android-Conversion-Skip-Block-End @@ -150,7 +149,7 @@ public void linkTest11() throws IOException, InterruptedException { try (FileInputStream fileInputStream = new FileInputStream(sourceFolder + "linkTest11.html")) { HtmlConverter.convertToPdf(fileInputStream, pdfDocument, new ConverterProperties().setBaseUri(sourceFolder)); } - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest11.pdf", sourceFolder + "cmp_linkTest11.pdf", destinationFolder, "diff11_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest11.pdf", sourceFolder + "cmp_linkTest11.pdf", destinationFolder, "diff11_")); } @Test @@ -160,14 +159,14 @@ public void linkTest12() throws IOException, InterruptedException { try (FileInputStream fileInputStream = new FileInputStream(sourceFolder + "linkTest12.html")) { HtmlConverter.convertToPdf(fileInputStream, pdfDocument, new ConverterProperties().setBaseUri("https://en.wikipedia.org/wiki/")); } - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest12.pdf", sourceFolder + "cmp_linkTest12.pdf", destinationFolder, "diff12_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "linkTest12.pdf", sourceFolder + "cmp_linkTest12.pdf", destinationFolder, "diff12_")); } @Test public void anchorLinkToSpanTest01() throws IOException, InterruptedException { String fileName = "anchorLinkToSpanTest01"; HtmlConverter.convertToPdf(new File(sourceFolder + fileName + ".html"), new File(destinationFolder + fileName + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + fileName + ".pdf", sourceFolder + "cmp_" + fileName + ".pdf", destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + fileName + ".pdf", sourceFolder + "cmp_" + fileName + ".pdf", destinationFolder)); } @Test @@ -177,7 +176,7 @@ public void simpleLinkTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "simpleLink.html"), new File(outPdf)); - Assert.assertNull(new CompareTool() + Assertions.assertNull(new CompareTool() .compareByContent(outPdf, cmpPdf, destinationFolder, "diff09_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/ListItemTest.java b/src/test/java/com/itextpdf/html2pdf/element/ListItemTest.java index 57c5e758c..1e21b3cf5 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/ListItemTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/ListItemTest.java @@ -28,22 +28,21 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ListItemTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/ListItemTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/ListItemTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -54,7 +53,7 @@ public void rtlListItemInsideLtrOrderedListTest() throws IOException, Interrupte String name = "rtlListItemInsideLtrOrderedListTest"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name +".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff01_")); } @@ -65,7 +64,7 @@ public void listItemWithDifferentDirAndPositionInsideTest() throws IOException, String name = "listItemWithDifferentDirAndPositionInsideTest"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name +".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff01_")); } @@ -76,7 +75,7 @@ public void rtlListItemInsideLtrUnorderedListTest() throws IOException, Interrup String name = "rtlListItemInsideLtrUnorderedListTest"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name +".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff01_")); } @@ -87,7 +86,7 @@ public void drawBulletRtlTest() throws IOException, InterruptedException { String name = "drawBulletRtl"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name +".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff01_")); } @@ -98,7 +97,7 @@ public void drawBulletLtrTest() throws IOException, InterruptedException { String name = "drawBulletLtr"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name +".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff01_")); } @@ -109,7 +108,7 @@ public void bulletsAreNotDrawnAsTheyAreInPageMarginsTest() throws IOException, I String name = "bulletsAreNotDrawnAsTheyAreInPageMargins"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name +".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff01_")); } @@ -120,7 +119,7 @@ public void rltListItemWithDifferentMarginsTest() throws IOException, Interrupte String name = "rltListItemWithDifferentMargins"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name +".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff01_")); } @@ -131,7 +130,7 @@ public void diffListItemsInsideDiffListsWithDiffDirectionsWithoutWidthTest() thr String name = "diffListItemsInsideDiffListsWithDiffDirectionsWithoutWidth"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name +".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff01_")); } @@ -141,7 +140,7 @@ public void listItemWithBlockDisplayTest() throws IOException, InterruptedExcept String name = "listItemWithBlockDisplay"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name +".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff01_")); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/ListTest.java b/src/test/java/com/itextpdf/html2pdf/element/ListTest.java index 2beaf2cd8..4050554d3 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/ListTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/ListTest.java @@ -37,23 +37,22 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.css.media.MediaType; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ListTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/element/ListTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/element/ListTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -203,9 +202,9 @@ public void checkOrderedListStartAndValue() throws IOException, InterruptedExcep //TODO: update after fix of DEVSIX-2538 public void checkOrderedListNestedLists() { String expectedMessage = MessageFormatUtil.format("The parameter must be a positive integer"); - Exception exception = Assert.assertThrows(IllegalArgumentException.class, + Exception exception = Assertions.assertThrows(IllegalArgumentException.class, () -> convertToPdfAndCompare("checkOrderedListNestedLists", SOURCE_FOLDER, DESTINATION_FOLDER)); - Assert.assertEquals(expectedMessage, exception.getMessage()); + Assertions.assertEquals(expectedMessage, exception.getMessage()); } @Test @@ -238,7 +237,7 @@ public void listToPdfaTest() throws IOException, InterruptedException { .setMediaDeviceDescription(new MediaDeviceDescription(MediaType.PRINT)) .setFontProvider(new DefaultFontProvider(false, true, false))); } - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "listToPdfa.pdf", SOURCE_FOLDER + "cmp_listToPdfa.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "listToPdfa.pdf", SOURCE_FOLDER + "cmp_listToPdfa.pdf", DESTINATION_FOLDER, "diff99_")); } // Android-Conversion-Skip-Block-End diff --git a/src/test/java/com/itextpdf/html2pdf/element/MainNavArticleTest.java b/src/test/java/com/itextpdf/html2pdf/element/MainNavArticleTest.java index a049780d4..d2b79d528 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/MainNavArticleTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/MainNavArticleTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class MainNavArticleTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/MainNavArticleTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/MainNavArticleTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void mainNavArticle01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "mainNavArticleTest01.html"), new File(destinationFolder + "mainNavArticleTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "mainNavArticleTest01.pdf", sourceFolder + "cmp_mainNavArticleTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "mainNavArticleTest01.pdf", sourceFolder + "cmp_mainNavArticleTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/MarkTest.java b/src/test/java/com/itextpdf/html2pdf/element/MarkTest.java index a7329475d..b9faca111 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/MarkTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/MarkTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class MarkTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/MarkTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/MarkTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void mark01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "markTest01.html"), new File(destinationFolder + "markTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "markTest01.pdf", sourceFolder + "cmp_markTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "markTest01.pdf", sourceFolder + "cmp_markTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/MetaTest.java b/src/test/java/com/itextpdf/html2pdf/element/MetaTest.java index 1309894c9..095d6fe12 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/MetaTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/MetaTest.java @@ -28,21 +28,20 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.pdf.PdfDocumentInfo; import com.itextpdf.kernel.pdf.PdfReader; import com.itextpdf.kernel.utils.CompareTool; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class MetaTest extends ExtendedHtmlConversionITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/element/MetaTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/element/MetaTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -52,10 +51,10 @@ public void meta01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "metaTest01.html"), new File(DESTINATION_FOLDER + "metaTest01.pdf")); PdfDocumentInfo pdfDocInfo = new PdfDocument(new PdfReader(DESTINATION_FOLDER + "metaTest01.pdf")).getDocumentInfo(); CompareTool compareTool = new CompareTool(); - Assert.assertNull(compareTool.compareByContent(DESTINATION_FOLDER + "metaTest01.pdf", SOURCE_FOLDER + "cmp_metaTest01.pdf", + Assertions.assertNull(compareTool.compareByContent(DESTINATION_FOLDER + "metaTest01.pdf", SOURCE_FOLDER + "cmp_metaTest01.pdf", DESTINATION_FOLDER, "diff01_")); - Assert.assertNull(compareTool.compareDocumentInfo(DESTINATION_FOLDER + "metaTest01.pdf", SOURCE_FOLDER + "cmp_metaTest01.pdf")); - Assert.assertEquals(pdfDocInfo.getMoreInfo("test"), "the test content"); + Assertions.assertNull(compareTool.compareDocumentInfo(DESTINATION_FOLDER + "metaTest01.pdf", SOURCE_FOLDER + "cmp_metaTest01.pdf")); + Assertions.assertEquals(pdfDocInfo.getMoreInfo("test"), "the test content"); } @Test @@ -65,23 +64,23 @@ public void meta02Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "metaTest02.html"), new File(DESTINATION_FOLDER + "metaTest02.pdf")); PdfDocumentInfo pdfDocInfo = new PdfDocument(new PdfReader(DESTINATION_FOLDER + "metaTest02.pdf")).getDocumentInfo(); CompareTool compareTool = new CompareTool(); - Assert.assertNull(compareTool.compareByContent(DESTINATION_FOLDER + "metaTest02.pdf", SOURCE_FOLDER + "cmp_metaTest02.pdf", + Assertions.assertNull(compareTool.compareByContent(DESTINATION_FOLDER + "metaTest02.pdf", SOURCE_FOLDER + "cmp_metaTest02.pdf", DESTINATION_FOLDER, "diff02_")); - Assert.assertNull(compareTool.compareDocumentInfo(DESTINATION_FOLDER + "metaTest02.pdf", SOURCE_FOLDER + "cmp_metaTest02.pdf")); - Assert.assertEquals(pdfDocInfo.getAuthor(), "Bruno Lowagie"); - Assert.assertEquals(pdfDocInfo.getKeywords(), "metadata, keywords, test"); - Assert.assertEquals(pdfDocInfo.getSubject(), "This is the description of the page"); - Assert.assertEquals(pdfDocInfo.getMoreInfo("generator"), "Eugenerator Onegenerator"); - Assert.assertEquals(pdfDocInfo.getMoreInfo("subject"), "Trying to break iText and write pdf's Subject with subject instead of description name"); + Assertions.assertNull(compareTool.compareDocumentInfo(DESTINATION_FOLDER + "metaTest02.pdf", SOURCE_FOLDER + "cmp_metaTest02.pdf")); + Assertions.assertEquals(pdfDocInfo.getAuthor(), "Bruno Lowagie"); + Assertions.assertEquals(pdfDocInfo.getKeywords(), "metadata, keywords, test"); + Assertions.assertEquals(pdfDocInfo.getSubject(), "This is the description of the page"); + Assertions.assertEquals(pdfDocInfo.getMoreInfo("generator"), "Eugenerator Onegenerator"); + Assertions.assertEquals(pdfDocInfo.getMoreInfo("subject"), "Trying to break iText and write pdf's Subject with subject instead of description name"); } @Test public void meta03Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "metaTest03.html"), new File(DESTINATION_FOLDER + "metaTest03.pdf")); CompareTool compareTool = new CompareTool(); - Assert.assertNull(compareTool.compareByContent(DESTINATION_FOLDER + "metaTest03.pdf", SOURCE_FOLDER + "cmp_metaTest03.pdf", + Assertions.assertNull(compareTool.compareByContent(DESTINATION_FOLDER + "metaTest03.pdf", SOURCE_FOLDER + "cmp_metaTest03.pdf", DESTINATION_FOLDER, "diff03_")); - Assert.assertNull(compareTool.compareDocumentInfo(DESTINATION_FOLDER + "metaTest03.pdf", SOURCE_FOLDER + "cmp_metaTest03.pdf")); + Assertions.assertNull(compareTool.compareDocumentInfo(DESTINATION_FOLDER + "metaTest03.pdf", SOURCE_FOLDER + "cmp_metaTest03.pdf")); } @Test @@ -92,7 +91,7 @@ public void metaApplicationNameTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(srcHtml), new File(outPdf)); PdfDocumentInfo pdfDocInfo = new PdfDocument(new PdfReader(outPdf)).getDocumentInfo(); CompareTool compareTool = new CompareTool(); - Assert.assertNull(compareTool.compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER, "metaAppName_")); - Assert.assertEquals("iText", pdfDocInfo.getCreator()); + Assertions.assertNull(compareTool.compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER, "metaAppName_")); + Assertions.assertEquals("iText", pdfDocInfo.getCreator()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/ObjectTest.java b/src/test/java/com/itextpdf/html2pdf/element/ObjectTest.java index 53c76702b..638e2a175 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/ObjectTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/ObjectTest.java @@ -27,21 +27,20 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.logs.StyledXmlParserLogMessageConstant; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ObjectTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/ObjectTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/ObjectTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/OptGroupTest.java b/src/test/java/com/itextpdf/html2pdf/element/OptGroupTest.java index 750b342e8..91233c78d 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/OptGroupTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/OptGroupTest.java @@ -23,21 +23,20 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.element; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class OptGroupTest extends ExtendedHtmlConversionITextTest { private static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/OptGroupTest/"; private static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/OptGroupTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/OptionTest.java b/src/test/java/com/itextpdf/html2pdf/element/OptionTest.java index 89a6ef7a8..8ecee2b6d 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/OptionTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/OptionTest.java @@ -26,20 +26,19 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class OptionTest extends ExtendedHtmlConversionITextTest { private static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/OptionTest/"; private static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/OptionTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/ParagraphTest.java b/src/test/java/com/itextpdf/html2pdf/element/ParagraphTest.java index 44057628e..5afb9389e 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/ParagraphTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/ParagraphTest.java @@ -29,22 +29,21 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ParagraphTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/element/ParagraphTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/element/ParagraphTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -53,7 +52,7 @@ public static void beforeClass() { public void paragraphTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphTest01.html"), new File(DESTINATION_FOLDER + "paragraphTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphTest01.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphTest01.pdf", SOURCE_FOLDER + "cmp_paragraphTest01.pdf", DESTINATION_FOLDER, "diff01_")); } @@ -61,7 +60,7 @@ public void paragraphTest01() throws IOException, InterruptedException { public void paragraphWithBordersTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithBordersTest01.html"), new File(DESTINATION_FOLDER + "paragraphWithBordersTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithBordersTest01.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithBordersTest01.pdf", SOURCE_FOLDER + "cmp_paragraphWithBordersTest01.pdf", DESTINATION_FOLDER, "diff02_")); } @@ -69,7 +68,7 @@ public void paragraphWithBordersTest01() throws IOException, InterruptedExceptio public void paragraphWithMarginsTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithMarginsTest01.html"), new File(DESTINATION_FOLDER + "paragraphWithMarginsTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithMarginsTest01.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithMarginsTest01.pdf", SOURCE_FOLDER + "cmp_paragraphWithMarginsTest01.pdf", DESTINATION_FOLDER, "diff03_")); } @@ -77,7 +76,7 @@ public void paragraphWithMarginsTest01() throws IOException, InterruptedExceptio public void paragraphWithPaddingTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithPaddingTest01.html"), new File(DESTINATION_FOLDER + "paragraphWithPaddingTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithPaddingTest01.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithPaddingTest01.pdf", SOURCE_FOLDER + "cmp_paragraphWithPaddingTest01.pdf", DESTINATION_FOLDER, "diff04_")); } @@ -85,7 +84,7 @@ public void paragraphWithPaddingTest01() throws IOException, InterruptedExceptio public void paragraphWithFontAttributesTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithFontAttributesTest01.html"), new File(DESTINATION_FOLDER + "paragraphWithFontAttributesTest01.pdf")); - Assert.assertNull( + Assertions.assertNull( new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithFontAttributesTest01.pdf", SOURCE_FOLDER + "cmp_paragraphWithFontAttributesTest01.pdf", DESTINATION_FOLDER, "diff05_")); } @@ -94,7 +93,7 @@ public void paragraphWithFontAttributesTest01() throws IOException, InterruptedE public void paragraphWithNonBreakableSpaceTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithNonBreakableSpaceTest01.html"), new File(DESTINATION_FOLDER + "paragraphWithNonBreakableSpaceTest01.pdf")); - Assert.assertNull( + Assertions.assertNull( new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithNonBreakableSpaceTest01.pdf", SOURCE_FOLDER + "cmp_paragraphWithNonBreakableSpaceTest01.pdf", DESTINATION_FOLDER, "diff06_")); } @@ -103,7 +102,7 @@ public void paragraphWithNonBreakableSpaceTest01() throws IOException, Interrupt public void paragraphWithNonBreakableSpaceTest02() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithNonBreakableSpaceTest02.html"), new File(DESTINATION_FOLDER + "paragraphWithNonBreakableSpaceTest02.pdf")); - Assert.assertNull( + Assertions.assertNull( new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithNonBreakableSpaceTest02.pdf", SOURCE_FOLDER + "cmp_paragraphWithNonBreakableSpaceTest02.pdf", DESTINATION_FOLDER, "diff07_")); } @@ -112,7 +111,7 @@ public void paragraphWithNonBreakableSpaceTest02() throws IOException, Interrupt public void paragraphWithNonBreakableSpaceTest03() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithNonBreakableSpaceTest03.html"), new File(DESTINATION_FOLDER + "paragraphWithNonBreakableSpaceTest03.pdf")); - Assert.assertNull( + Assertions.assertNull( new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithNonBreakableSpaceTest03.pdf", SOURCE_FOLDER + "cmp_paragraphWithNonBreakableSpaceTest03.pdf", DESTINATION_FOLDER, "diff08_")); } @@ -121,7 +120,7 @@ public void paragraphWithNonBreakableSpaceTest03() throws IOException, Interrupt public void paragraphInTablePercentTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphInTablePercentTest01.html"), new File(DESTINATION_FOLDER + "paragraphInTablePercentTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphInTablePercentTest01.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphInTablePercentTest01.pdf", SOURCE_FOLDER + "cmp_paragraphInTablePercentTest01.pdf", DESTINATION_FOLDER, "diff09_")); } @@ -133,7 +132,7 @@ public void paragraphWithButtonInputLabelSelectTextareaTest() throws IOException //TODO: update after DEVSIX-2445 fix HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithButtonInputLabelSelectTextareaTest.html"), new File(DESTINATION_FOLDER + "paragraphWithButtonInputLabelSelectTextareaTest.pdf")); - Assert.assertNull(new CompareTool().compareByContent( + Assertions.assertNull(new CompareTool().compareByContent( DESTINATION_FOLDER + "paragraphWithButtonInputLabelSelectTextareaTest.pdf", SOURCE_FOLDER + "cmp_paragraphWithButtonInputLabelSelectTextareaTest.pdf", DESTINATION_FOLDER, "diff11_")); @@ -146,7 +145,7 @@ public void paragraphWithBdoBrImgMapQSubSupTest() throws IOException, Interrupte //TODO: update after DEVSIX-2445 fix HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithBdoBrImgMapQSubSupTest.html"), new File(DESTINATION_FOLDER + "paragraphWithBdoBrImgMapQSubSupTest.pdf")); - Assert.assertNull( + Assertions.assertNull( new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithBdoBrImgMapQSubSupTest.pdf", SOURCE_FOLDER + "cmp_paragraphWithBdoBrImgMapQSubSupTest.pdf", DESTINATION_FOLDER, "diff12_")); } @@ -158,7 +157,7 @@ public void paragraphWithAbbrAcronymCireCodeDfnEmKbdSampVarTest() throws IOExcep //TODO: update after DEVSIX-2445 fix HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithAbbrAcronymCireCodeDfnEmKbdSampVarTest.html"), new File(DESTINATION_FOLDER + "paragraphWithAbbrAcronymCireCodeDfnEmKbdSampVarTest.pdf")); - Assert.assertNull(new CompareTool().compareByContent( + Assertions.assertNull(new CompareTool().compareByContent( DESTINATION_FOLDER + "paragraphWithAbbrAcronymCireCodeDfnEmKbdSampVarTest.pdf", SOURCE_FOLDER + "cmp_paragraphWithAbbrAcronymCireCodeDfnEmKbdSampVarTest.pdf", DESTINATION_FOLDER, "diff13_")); @@ -169,7 +168,7 @@ public void paragraphWithAParagraphSpanDivTest() throws IOException, Interrupted //TODO: update after DEVSIX-2445 fix HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithAParagraphSpanDivTest.html"), new File(DESTINATION_FOLDER + "paragraphWithAParagraphSpanDivTest.pdf")); - Assert.assertNull( + Assertions.assertNull( new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithAParagraphSpanDivTest.pdf", SOURCE_FOLDER + "cmp_paragraphWithAParagraphSpanDivTest.pdf", DESTINATION_FOLDER, "diff14_")); } @@ -181,7 +180,7 @@ public void paragraphWithBBigISmallTtStrongTest() throws IOException, Interrupte //TODO: update after DEVSIX-2445 fix HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithBBigISmallTtStrongTest.html"), new File(DESTINATION_FOLDER + "paragraphWithBBigISmallTtStrongTest.pdf")); - Assert.assertNull( + Assertions.assertNull( new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithBBigISmallTtStrongTest.pdf", SOURCE_FOLDER + "cmp_paragraphWithBBigISmallTtStrongTest.pdf", DESTINATION_FOLDER, "diff15_")); } @@ -190,7 +189,7 @@ public void paragraphWithBBigISmallTtStrongTest() throws IOException, Interrupte public void paragraphWithPDisplayTableTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithPDisplayTableTest.html"), new File(DESTINATION_FOLDER + "paragraphWithPDisplayTableTest.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithPDisplayTableTest.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithPDisplayTableTest.pdf", SOURCE_FOLDER + "cmp_paragraphWithPDisplayTableTest.pdf", DESTINATION_FOLDER, "diff15_")); } @@ -198,7 +197,7 @@ public void paragraphWithPDisplayTableTest() throws IOException, InterruptedExce public void paragraphWithDifferentSpansTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithDifferentSpansTest.html"), new File(DESTINATION_FOLDER + "paragraphWithDifferentSpansTest.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithDifferentSpansTest.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithDifferentSpansTest.pdf", SOURCE_FOLDER + "cmp_paragraphWithDifferentSpansTest.pdf", DESTINATION_FOLDER, "diff15_")); } @@ -206,7 +205,7 @@ public void paragraphWithDifferentSpansTest() throws IOException, InterruptedExc public void paragraphWithDifferentBlocksAndDisplaysTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithDifferentBlocksAndDisplaysTest.html"), new File(DESTINATION_FOLDER + "paragraphWithDifferentBlocksAndDisplaysTest.pdf")); - Assert.assertNull(new CompareTool().compareByContent( + Assertions.assertNull(new CompareTool().compareByContent( DESTINATION_FOLDER + "paragraphWithDifferentBlocksAndDisplaysTest.pdf", SOURCE_FOLDER + "cmp_paragraphWithDifferentBlocksAndDisplaysTest.pdf", DESTINATION_FOLDER, "diff15_")); } @@ -216,7 +215,7 @@ public void paragraphWithLabelSpanDisplayBlockTest() throws IOException, Interru //TODO: update after DEVSIX-2619 fix HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithLabelSpanDisplayBlockTest.html"), new File(DESTINATION_FOLDER + "paragraphWithLabelSpanDisplayBlockTest.pdf")); - Assert.assertNull( + Assertions.assertNull( new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithLabelSpanDisplayBlockTest.pdf", SOURCE_FOLDER + "cmp_paragraphWithLabelSpanDisplayBlockTest.pdf", DESTINATION_FOLDER, "diff15_")); } @@ -225,7 +224,7 @@ public void paragraphWithLabelSpanDisplayBlockTest() throws IOException, Interru public void paragraphWithImageTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithImageTest01.html"), new File(DESTINATION_FOLDER + "paragraphWithImageTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithImageTest01.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithImageTest01.pdf", SOURCE_FOLDER + "cmp_paragraphWithImageTest01.pdf", DESTINATION_FOLDER, "diff_paragraphWithImageTest01_")); } @@ -234,7 +233,7 @@ public void paragraphWithImageTest01() throws IOException, InterruptedException public void paragraphWithImageTest01RTL() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "paragraphWithImageTest01RTL.html"), new File(DESTINATION_FOLDER + "paragraphWithImageTest01RTL.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithImageTest01RTL.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "paragraphWithImageTest01RTL.pdf", SOURCE_FOLDER + "cmp_paragraphWithImageTest01RTL.pdf", DESTINATION_FOLDER, "diff_paragraphWithImageTest01_")); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/PreTest.java b/src/test/java/com/itextpdf/html2pdf/element/PreTest.java index dad63b2d6..6f8a5447e 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/PreTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/PreTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class PreTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/PreTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/PreTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,19 +48,19 @@ public static void beforeClass() { @Test public void pre01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "preTest01.html"), new File(destinationFolder + "preTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "preTest01.pdf", sourceFolder + "cmp_preTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "preTest01.pdf", sourceFolder + "cmp_preTest01.pdf", destinationFolder, "diff01_")); } @Test public void pre02Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "preTest02.html"), new File(destinationFolder + "preTest02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "preTest02.pdf", sourceFolder + "cmp_preTest02.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "preTest02.pdf", sourceFolder + "cmp_preTest02.pdf", destinationFolder, "diff02_")); } @Test public void pre03Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "preTest03.html"), new File(destinationFolder + "preTest03.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "preTest03.pdf", sourceFolder + "cmp_preTest03.pdf", destinationFolder, "diff03_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "preTest03.pdf", sourceFolder + "cmp_preTest03.pdf", destinationFolder, "diff03_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/QTest.java b/src/test/java/com/itextpdf/html2pdf/element/QTest.java index 8d2db5f23..a7d34f5a5 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/QTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/QTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class QTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/QTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/QTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void q01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "qTest01.html"), new File(destinationFolder + "qTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "qTest01.pdf", sourceFolder + "cmp_qTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "qTest01.pdf", sourceFolder + "cmp_qTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/STest.java b/src/test/java/com/itextpdf/html2pdf/element/STest.java index bed36dc6c..f49841d2e 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/STest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/STest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class STest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/STest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/STest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void s01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "sTest01.html"), new File(destinationFolder + "sTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "sTest01.pdf", sourceFolder + "cmp_sTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "sTest01.pdf", sourceFolder + "cmp_sTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/SampTest.java b/src/test/java/com/itextpdf/html2pdf/element/SampTest.java index e04fa819a..3e3fce42b 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/SampTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/SampTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class SampTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/SampTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/SampTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void samp01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "sampTest01.html"), new File(destinationFolder + "sampTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "sampTest01.pdf", sourceFolder + "cmp_sampTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "sampTest01.pdf", sourceFolder + "cmp_sampTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/ScriptTest.java b/src/test/java/com/itextpdf/html2pdf/element/ScriptTest.java index 5f4e51662..f7d47211e 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/ScriptTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/ScriptTest.java @@ -32,19 +32,18 @@ This file is part of the iText (R) project. import java.io.File; import java.io.IOException; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ScriptTest extends ExtendedITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/element/ScriptTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/element/ScriptTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -55,7 +54,7 @@ public void script01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "scriptTest01.html"), new File(DESTINATION_FOLDER + "scriptTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "scriptTest01.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "scriptTest01.pdf", SOURCE_FOLDER + "cmp_scriptTest01.pdf", DESTINATION_FOLDER, "diff01_")); } @@ -65,7 +64,7 @@ public void noScriptTagTest() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "noScriptTag.html"), new File(DESTINATION_FOLDER + "noScriptTag.pdf")); - Assert.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "noScriptTag.pdf", + Assertions.assertNull(new CompareTool().compareByContent(DESTINATION_FOLDER + "noScriptTag.pdf", SOURCE_FOLDER + "cmp_noScriptTag.pdf", DESTINATION_FOLDER, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/SectionTest.java b/src/test/java/com/itextpdf/html2pdf/element/SectionTest.java index b5273b647..ecbe8336a 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/SectionTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/SectionTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class SectionTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/SectionTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/SectionTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void section01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "sectionTest01.html"), new File(destinationFolder + "sectionTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "sectionTest01.pdf", sourceFolder + "cmp_sectionTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "sectionTest01.pdf", sourceFolder + "cmp_sectionTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/SelectTest.java b/src/test/java/com/itextpdf/html2pdf/element/SelectTest.java index 013ae9348..292c6c339 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/SelectTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/SelectTest.java @@ -32,22 +32,21 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class SelectTest extends ExtendedITextTest { private static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/SelectTest/"; private static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/SelectTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @@ -280,6 +279,6 @@ private void runTest(String name) throws IOException, InterruptedException { System.out.println("html: " + UrlUtil.getNormalizedFileUriString(htmlPath) + "\n"); HtmlConverter.convertToPdf(new File(htmlPath), new File(outPdfPath)); - Assert.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder, diff)); + Assertions.assertNull(new CompareTool().compareByContent(outPdfPath, cmpPdfPath, destinationFolder, diff)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/SmallTest.java b/src/test/java/com/itextpdf/html2pdf/element/SmallTest.java index 1942a7d26..a87299b49 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/SmallTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/SmallTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class SmallTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/SmallTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/SmallTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void small01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "smallTest01.html"), new File(destinationFolder + "smallTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "smallTest01.pdf", sourceFolder + "cmp_smallTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "smallTest01.pdf", sourceFolder + "cmp_smallTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/SpanTest.java b/src/test/java/com/itextpdf/html2pdf/element/SpanTest.java index 878d28d0c..3cbdfb3c1 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/SpanTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/SpanTest.java @@ -28,23 +28,22 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.pdf.PdfWriter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.FileInputStream; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class SpanTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/SpanTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/SpanTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -55,7 +54,7 @@ private void testWithSuffix(String testIndex) throws IOException, InterruptedExc String cmpFile = sourceFolder + MessageFormatUtil.format("cmp_spanTest{0}.pdf", testIndex); String diff = MessageFormatUtil.format("diff{0}_", testIndex); HtmlConverter.convertToPdf(new File(htmlFile), new File(pdfFile)); - Assert.assertNull(new CompareTool().compareByContent(pdfFile, cmpFile, destinationFolder, diff)); + Assertions.assertNull(new CompareTool().compareByContent(pdfFile, cmpFile, destinationFolder, diff)); } private void test(String testName, boolean tagged) throws IOException, InterruptedException { @@ -72,7 +71,7 @@ private void test(String testName, boolean tagged) throws IOException, Interrupt } else { HtmlConverter.convertToPdf(new File(htmlFile), new File(pdfFile)); } - Assert.assertNull(new CompareTool().compareByContent(pdfFile, cmpFile, destinationFolder, diff)); + Assertions.assertNull(new CompareTool().compareByContent(pdfFile, cmpFile, destinationFolder, diff)); } private void test(String testName) throws IOException, InterruptedException { diff --git a/src/test/java/com/itextpdf/html2pdf/element/StrikeTest.java b/src/test/java/com/itextpdf/html2pdf/element/StrikeTest.java index 5f9035867..e521bf2b6 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/StrikeTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/StrikeTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class StrikeTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/StrikeTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/StrikeTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,7 +48,7 @@ public static void beforeClass() { @Test public void strikeTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "strikeTest01.html"), new File(destinationFolder + "strikeTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "strikeTest01.pdf", sourceFolder + "cmp_strikeTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "strikeTest01.pdf", sourceFolder + "cmp_strikeTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/StrongTest.java b/src/test/java/com/itextpdf/html2pdf/element/StrongTest.java index ea55100e8..a739d8023 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/StrongTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/StrongTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class StrongTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/StrongTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/StrongTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void strong01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "strongTest01.html"), new File(destinationFolder + "strongTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "strongTest01.pdf", sourceFolder + "cmp_strongTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "strongTest01.pdf", sourceFolder + "cmp_strongTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/StyleTest.java b/src/test/java/com/itextpdf/html2pdf/element/StyleTest.java index 70751fcc6..c4bb8f2ca 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/StyleTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/StyleTest.java @@ -25,22 +25,21 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class StyleTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/StyleTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/StyleTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -48,18 +47,18 @@ public static void beforeClass() { @Test public void styleTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "styleTest01.html"), new File(destinationFolder + "styleTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "styleTest01.pdf", sourceFolder + "cmp_styleTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "styleTest01.pdf", sourceFolder + "cmp_styleTest01.pdf", destinationFolder, "diff01_")); } @Test public void styleTest02() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "styleTest02.html"), new File(destinationFolder + "styleTest02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "styleTest02.pdf", sourceFolder + "cmp_styleTest02.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "styleTest02.pdf", sourceFolder + "cmp_styleTest02.pdf", destinationFolder, "diff02_")); } @Test public void styleTest03() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "styleTest03.html"), new File(destinationFolder + "styleTest03.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "styleTest03.pdf", sourceFolder + "cmp_styleTest03.pdf", destinationFolder, "diff03_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "styleTest03.pdf", sourceFolder + "cmp_styleTest03.pdf", destinationFolder, "diff03_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/SupSubTest.java b/src/test/java/com/itextpdf/html2pdf/element/SupSubTest.java index 45e6b547b..baaf21c2e 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/SupSubTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/SupSubTest.java @@ -26,23 +26,22 @@ This file is part of the iText (R) project. import com.itextpdf.io.util.UrlUtil; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class SupSubTest extends ExtendedITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/element/SupSubTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/element/SupSubTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(DESTINATION_FOLDER); } @@ -87,6 +86,6 @@ private void runTest(String testName) throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(htmlName), new File(outFileName)); System.out.println("html: " + UrlUtil.getNormalizedFileUriString(htmlName) + "\n"); - Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, DESTINATION_FOLDER)); + Assertions.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, DESTINATION_FOLDER)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/SvgTest.java b/src/test/java/com/itextpdf/html2pdf/element/SvgTest.java index 73aa87c24..e7685c9b2 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/SvgTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/SvgTest.java @@ -34,27 +34,20 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class SvgTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/SvgTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/SvgTest/"; - - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); - - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -63,21 +56,21 @@ public static void beforeClass() { public void inlineSvgTest() throws IOException, InterruptedException { String name = "inline_svg"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test public void inlineNestedSvgTest() throws IOException, InterruptedException { String name = "inline_nested_svg"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test public void inlineSvgExternalFontRelativeTest() throws IOException, InterruptedException { String name = "inline_svg_external_font_relative"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test @@ -85,7 +78,7 @@ public void inlineSvgExternalFontUrlTest() throws IOException, InterruptedExcept // TODO DEVSIX-2264 external font loading in SVG via @import String name = "inline_svg_external_font_url"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test @@ -95,7 +88,7 @@ public void inlineSvgExternalFontUrlTest() throws IOException, InterruptedExcept public void convert_inline_Svg_path_in_HTML() throws IOException, InterruptedException { String name = "HTML_with_inline_svg_path"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test @@ -106,7 +99,7 @@ public void convert_inline_Svg_path_in_HTML() throws IOException, InterruptedExc public void convert_inline_Svg_polygon_in_HTML() throws IOException, InterruptedException { String name = "HTML_with_inline_svg_polygon"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test @@ -116,7 +109,7 @@ public void convert_inline_Svg_polygon_in_HTML() throws IOException, Interrupted public void convert_namespace_Svg_in_HTML() throws IOException, InterruptedException { String name = "namespace_svg"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test @@ -136,7 +129,7 @@ public void convertInlineSvgCircle() throws IOException, InterruptedException { ""; HtmlConverter.convertToPdf(string_file, pdfDoc, new ConverterProperties()); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + html + ".pdf", sourceFolder + "cmp_" + html + ".pdf", destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + html + ".pdf", sourceFolder + "cmp_" + html + ".pdf", destinationFolder)); } @@ -159,7 +152,7 @@ public void convertInlineSvgRectangle() throws IOException, InterruptedException "\n"; HtmlConverter.convertToPdf(string_file, pdfDoc, new ConverterProperties()); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + html + ".pdf", sourceFolder + "cmp_" + html + ".pdf", destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + html + ".pdf", sourceFolder + "cmp_" + html + ".pdf", destinationFolder)); } @Test @@ -181,7 +174,7 @@ public void convertInlineSvgRoundedRectangle() throws IOException, InterruptedEx "\n"; HtmlConverter.convertToPdf(string_file, pdfDoc, new ConverterProperties()); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + html + ".pdf", sourceFolder + "cmp_" + html + ".pdf", destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + html + ".pdf", sourceFolder + "cmp_" + html + ".pdf", destinationFolder)); } @Test @@ -204,7 +197,7 @@ public void convertInlineSvgStar() throws IOException, InterruptedException { "\n"; HtmlConverter.convertToPdf(string_file, pdfDoc, new ConverterProperties()); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + html + ".pdf", sourceFolder + "cmp_" + html + ".pdf", destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + html + ".pdf", sourceFolder + "cmp_" + html + ".pdf", destinationFolder)); } @Test @@ -235,14 +228,14 @@ public void convertInlineSvgLogo() throws IOException, InterruptedException { " \n"; HtmlConverter.convertToPdf(string_file, pdfDoc, new ConverterProperties()); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + html + ".pdf", sourceFolder + "cmp_" + html + ".pdf", destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + html + ".pdf", sourceFolder + "cmp_" + html + ".pdf", destinationFolder)); } @Test public void externalImageSuccessTest() throws IOException, InterruptedException { String name = "external_img"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @@ -254,7 +247,7 @@ public void externalImageSuccessTest() throws IOException, InterruptedException public void externalImageNonExistentRefTest() throws IOException, InterruptedException { String name = "external_img_nonExistentRef"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @@ -266,7 +259,7 @@ public void externalImageNonExistentRefTest() throws IOException, InterruptedExc public void externalObjectSuccessTest() throws IOException, InterruptedException { String name = "external_object"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test @@ -274,7 +267,7 @@ public void externalObjectWithResourceTest() throws IOException, InterruptedExce //TODO update after DEVSIX-2239 String name = "external_object_with_resource"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test @@ -285,7 +278,7 @@ public void externalObjectWithGoogleCharts() throws IOException, InterruptedExce //TODO update after DEVSIX-2239 String name = "inlineSvg_googleCharts"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test @@ -296,7 +289,7 @@ public void externalObjectWithGoogleCharts() throws IOException, InterruptedExce public void externalObjectNonExistentRefTest() throws IOException, InterruptedException { String name = "external_objectNonExistentRef"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test @@ -307,7 +300,7 @@ public void externalObjectNonExistentRefTest() throws IOException, InterruptedEx public void htmlWithSvgBackground() throws IOException, InterruptedException { String name = "HTML_with_svg_background"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test @@ -318,7 +311,7 @@ public void htmlWithSvgBackground() throws IOException, InterruptedException { public void htmlWithSvgBackgroundNoViewbox() throws IOException, InterruptedException { String name = "Html_with_svg_background_no_viewbox"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test @@ -329,14 +322,14 @@ public void htmlWithSvgBackgroundNoViewbox() throws IOException, InterruptedExce public void svgWithoutDimensionsTest() throws IOException, InterruptedException { String name = "svg_without_dimensions"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test public void svgWithoutDimensionsWithViewboxTest() throws IOException, InterruptedException { String name = "svg_without_dimensions_with_viewbox"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } @Test @@ -347,7 +340,7 @@ public void svgWithoutDimensionsWithViewboxTest() throws IOException, Interrupte public void svgWithoutDimensionsImageAndObjectRef() throws IOException, InterruptedException { String name = "svgWithoutDimensionsImageAndObjectRef"; HtmlConverter.convertToPdf(new File(sourceFolder + name + ".html"), new File(destinationFolder + name + ".pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + name + ".pdf", sourceFolder + "cmp_" + name + ".pdf", destinationFolder, "diff_" + name + "_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/TableBodyTest.java b/src/test/java/com/itextpdf/html2pdf/element/TableBodyTest.java index 4f2f5ae13..f93021fc4 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/TableBodyTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/TableBodyTest.java @@ -23,20 +23,19 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.element; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class TableBodyTest extends ExtendedHtmlConversionITextTest { public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/element/TableBodyTest/"; public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/element/TableBodyTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/TableTest.java b/src/test/java/com/itextpdf/html2pdf/element/TableTest.java index adc351a87..ec4118606 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/TableTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/TableTest.java @@ -40,31 +40,26 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.List; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class TableTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/TableTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/TableTest/"; - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @@ -218,7 +213,7 @@ public void helloTableAuto12DocumentTest() throws IOException, InterruptedExcept } @Test - @Ignore("DEVSIX-1370") + @Disabled("DEVSIX-1370") public void helloTableAuto13DocumentTest() throws IOException, InterruptedException { runTest("hello_table_auto13"); } @@ -526,9 +521,9 @@ public void tableRowAndCellBackgroundColorConflictTest() throws IOException, Int @Test // TODO DEVSIX-5036 - public void collapsedBorderWithWrongRowspanTableTest() throws IOException, InterruptedException { - junitExpectedException.expect(RuntimeException.class); - runTest("collapsedBorderWithWrongRowspanTable", false, new PageSize(PageSize.A5).rotate()); + public void collapsedBorderWithWrongRowspanTableTest() { + Assertions.assertThrows(RuntimeException.class, + () -> runTest("collapsedBorderWithWrongRowspanTable", false, new PageSize(PageSize.A5).rotate())); } @Test @@ -572,9 +567,8 @@ public void tagsFlushingErrorWhenConvertedFromHtmlTest() throws IOException { document.add((IBlockElement) element); } - junitExpectedException.expect(PdfException.class); - junitExpectedException.expectMessage("Tag structure flushing failed: it might be corrupted."); - document.close(); + Exception exception = Assertions.assertThrows(PdfException.class, () -> document.close()); + Assertions.assertEquals("Tag structure flushing failed: it might be corrupted.", exception.getMessage()); } @Test @@ -610,8 +604,8 @@ public void emptyRowsConvertToElementTest() throws IOException { FileInputStream source = new FileInputStream(sourceFolder + "emptyRowsConvertToElement.html"); for (IElement element : HtmlConverter.convertToElements(source)) { - Assert.assertTrue(element instanceof Table); - Assert.assertEquals(4, ((Table) element).getNumberOfRows()); + Assertions.assertTrue(element instanceof Table); + Assertions.assertEquals(4, ((Table) element).getNumberOfRows()); } } @@ -660,7 +654,7 @@ private void runTest(String testName, boolean tagged, PageSize pageSize) throws } HtmlConverter.convertToPdf(new FileInputStream(sourceFolder + testName + ".html"), pdfDocument, new ConverterProperties().setBaseUri(sourceFolder)); System.out.println("html: " + UrlUtil.getNormalizedFileUriString(sourceFolder + testName + ".html")+ "\n"); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + testName + ".pdf", sourceFolder + "cmp_" + testName + ".pdf", destinationFolder, "diff_" + testName)); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + testName + ".pdf", sourceFolder + "cmp_" + testName + ".pdf", destinationFolder, "diff_" + testName)); } private void runConvertToElements(String testName, boolean tagged) throws IOException, InterruptedException { @@ -678,7 +672,7 @@ private void runConvertToElements(String testName, boolean tagged) throws IOExce } layoutDocument.close(); pdfDocument.close(); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + testName + ".pdf", + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + testName + ".pdf", sourceFolder + "cmp_" + testName + ".pdf", destinationFolder, "diff01_")); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/TaggedPdfFormTest.java b/src/test/java/com/itextpdf/html2pdf/element/TaggedPdfFormTest.java index 879b70174..604941d78 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/TaggedPdfFormTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/TaggedPdfFormTest.java @@ -28,27 +28,23 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.exceptions.PdfException; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import org.xml.sax.SAXException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class TaggedPdfFormTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/TaggedPdfFormTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/TaggedPdfFormTest/"; - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -113,7 +109,7 @@ public void simpleRadioFormTagged() } @Test - @Ignore("DEVSIX-980. DefaultHtmlProcessor ERROR No worker found for tag datalist") + @Disabled("DEVSIX-980. DefaultHtmlProcessor ERROR No worker found for tag datalist") public void dataListFormTagged() throws IOException, InterruptedException, ParserConfigurationException, SAXException { convertToPdfAcroformFlattenAndCompare("dataListForm", sourceFolder, destinationFolder, true); @@ -126,14 +122,12 @@ public void fieldSetFormTagged() } @Test - @Ignore("DEVSIX-4601 exception is thrown on \"convert tagged PDF with acroform\" stage") - public void inputFormPrematureFlush() - throws IOException, InterruptedException, ParserConfigurationException, SAXException { - junitExpectedException.expect(PdfException.class); - junitExpectedException.expectMessage( - KernelExceptionMessageConstant.TAG_STRUCTURE_FLUSHING_FAILED_IT_MIGHT_BE_CORRUPTED); - - convertToPdfAcroformFlattenAndCompare("inputFormPrematureFlush", - sourceFolder, destinationFolder, true); + @Disabled("DEVSIX-4601 exception is thrown on \"convert tagged PDF with acroform\" stage") + public void inputFormPrematureFlush() { + Exception exception = Assertions.assertThrows(PdfException.class, + () -> convertToPdfAcroformFlattenAndCompare("inputFormPrematureFlush", + sourceFolder, destinationFolder, true)); + Assertions.assertEquals(KernelExceptionMessageConstant.TAG_STRUCTURE_FLUSHING_FAILED_IT_MIGHT_BE_CORRUPTED, + exception); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/TagsInsideButtonTest.java b/src/test/java/com/itextpdf/html2pdf/element/TagsInsideButtonTest.java index 6f93f109a..fe41c82cf 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/TagsInsideButtonTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/TagsInsideButtonTest.java @@ -23,27 +23,21 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.element; import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.junit.rules.ExpectedException; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import org.xml.sax.SAXException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class TagsInsideButtonTest extends ExtendedHtmlConversionITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/TagsInsideButtonTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/TagsInsideButtonTest/"; - @Rule - public ExpectedException junitExpectedException = ExpectedException.none(); - - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } diff --git a/src/test/java/com/itextpdf/html2pdf/element/TimeTest.java b/src/test/java/com/itextpdf/html2pdf/element/TimeTest.java index 516d26876..bc93845ea 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/TimeTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/TimeTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class TimeTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/TimeTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/TimeTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void time01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "timeTest01.html"), new File(destinationFolder + "timeTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "timeTest01.pdf", sourceFolder + "cmp_timeTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "timeTest01.pdf", sourceFolder + "cmp_timeTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/TitleTest.java b/src/test/java/com/itextpdf/html2pdf/element/TitleTest.java index 87d56d484..332e725d2 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/TitleTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/TitleTest.java @@ -27,23 +27,22 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.pdf.PdfReader; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class TitleTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/TitleTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/TitleTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -51,15 +50,15 @@ public static void beforeClass() { @Test public void title01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "titleTest01.html"), new File(destinationFolder + "titleTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "titleTest01.pdf", sourceFolder + "cmp_titleTest01.pdf", destinationFolder, "diff01_")); - Assert.assertEquals("Best title!", new PdfDocument(new PdfReader(destinationFolder + "titleTest01.pdf")).getDocumentInfo().getTitle()); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "titleTest01.pdf", sourceFolder + "cmp_titleTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertEquals("Best title!", new PdfDocument(new PdfReader(destinationFolder + "titleTest01.pdf")).getDocumentInfo().getTitle()); } @Test public void title02Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "titleTest02.html"), new File(destinationFolder + "titleTest02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "titleTest02.pdf", sourceFolder + "cmp_titleTest02.pdf", destinationFolder, "diff02_")); - Assert.assertEquals("Best title!", new PdfDocument(new PdfReader(destinationFolder + "titleTest02.pdf")).getDocumentInfo().getTitle()); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "titleTest02.pdf", sourceFolder + "cmp_titleTest02.pdf", destinationFolder, "diff02_")); + Assertions.assertEquals("Best title!", new PdfDocument(new PdfReader(destinationFolder + "titleTest02.pdf")).getDocumentInfo().getTitle()); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/TtTest.java b/src/test/java/com/itextpdf/html2pdf/element/TtTest.java index 49264c8f4..bc01264ab 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/TtTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/TtTest.java @@ -25,21 +25,20 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class TtTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/TtTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/TtTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -47,12 +46,12 @@ public static void beforeClass() { @Test public void TtTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "TtTest01.html"), new File(destinationFolder + "TtTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "TtTest01.pdf", sourceFolder + "cmp_TtTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "TtTest01.pdf", sourceFolder + "cmp_TtTest01.pdf", destinationFolder, "diff01_")); } @Test public void TtTest02() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "TtTest02.html"), new File(destinationFolder + "TtTest02.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "TtTest02.pdf", sourceFolder + "cmp_TtTest02.pdf", destinationFolder, "diff02_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "TtTest02.pdf", sourceFolder + "cmp_TtTest02.pdf", destinationFolder, "diff02_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/UTest.java b/src/test/java/com/itextpdf/html2pdf/element/UTest.java index d0dc269c7..545bd35d3 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/UTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/UTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class UTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/UTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/UTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,7 +48,7 @@ public static void beforeClass() { @Test public void uStrikeTest01() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "uTest01.html"), new File(destinationFolder + "uTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "uTest01.pdf", sourceFolder + "cmp_uTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "uTest01.pdf", sourceFolder + "cmp_uTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/element/VarTest.java b/src/test/java/com/itextpdf/html2pdf/element/VarTest.java index 55d2cce57..bc13dbaa9 100644 --- a/src/test/java/com/itextpdf/html2pdf/element/VarTest.java +++ b/src/test/java/com/itextpdf/html2pdf/element/VarTest.java @@ -25,23 +25,22 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.HtmlConverter; import com.itextpdf.kernel.utils.CompareTool; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class VarTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/element/VarTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/element/VarTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -49,6 +48,6 @@ public static void beforeClass() { @Test public void var01Test() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(sourceFolder + "varTest01.html"), new File(destinationFolder + "varTest01.pdf")); - Assert.assertNull(new CompareTool().compareByContent(destinationFolder + "varTest01.pdf", sourceFolder + "cmp_varTest01.pdf", destinationFolder, "diff01_")); + Assertions.assertNull(new CompareTool().compareByContent(destinationFolder + "varTest01.pdf", sourceFolder + "cmp_varTest01.pdf", destinationFolder, "diff01_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/events/PdfHtmlAcroformDocumentEventTest.java b/src/test/java/com/itextpdf/html2pdf/events/PdfHtmlAcroformDocumentEventTest.java index 6fca7baa4..1faf6a2bc 100644 --- a/src/test/java/com/itextpdf/html2pdf/events/PdfHtmlAcroformDocumentEventTest.java +++ b/src/test/java/com/itextpdf/html2pdf/events/PdfHtmlAcroformDocumentEventTest.java @@ -40,22 +40,21 @@ This file is part of the iText (R) project. import com.itextpdf.layout.element.Paragraph; import com.itextpdf.layout.properties.TextAlignment; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.FileOutputStream; import java.io.IOException; import java.util.List; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class PdfHtmlAcroformDocumentEventTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/events/PdfHtmlAcroformDocumentEventTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/events/PdfHtmlAcroformDocumentEventTest/"; - @BeforeClass + @BeforeAll public static void initDestinationFolder() { createOrClearDestinationFolder(destinationFolder); } @@ -77,7 +76,7 @@ public void endPageEventWithFieldTest() throws IOException, InterruptedException pdfDocument.close(); - Assert.assertNull(new CompareTool().compareByContent(pdfOutput, pdfComparison, destinationFolder)); + Assertions.assertNull(new CompareTool().compareByContent(pdfOutput, pdfComparison, destinationFolder)); } private PdfDocument addEventHandlersToPdfDocument(String pdfOutput, ConverterProperties converterProperties) diff --git a/src/test/java/com/itextpdf/html2pdf/events/PdfHtmlPageXofYEventHandlerTest.java b/src/test/java/com/itextpdf/html2pdf/events/PdfHtmlPageXofYEventHandlerTest.java index b1fb8eed1..b9b04e3d8 100644 --- a/src/test/java/com/itextpdf/html2pdf/events/PdfHtmlPageXofYEventHandlerTest.java +++ b/src/test/java/com/itextpdf/html2pdf/events/PdfHtmlPageXofYEventHandlerTest.java @@ -40,23 +40,22 @@ This file is part of the iText (R) project. import com.itextpdf.layout.element.Paragraph; import com.itextpdf.layout.properties.TextAlignment; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; import java.io.File; import java.io.FileInputStream; import java.io.IOException; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class PdfHtmlPageXofYEventHandlerTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/events/PdfHtmlPageXofYEventHandlerTest/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/events/PdfHtmlPageXofYEventHandlerTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createDestinationFolder(destinationFolder); } @@ -69,7 +68,7 @@ public void pageXofYHtmlTest() throws IOException, InterruptedException { String cmp = sourceFolder + "cmp_" + filename + ".pdf"; new PdfHtmlPageXofYEventHandlerTest().parseWithFooter(src, dest, sourceFolder); System.out.println("html: " + UrlUtil.getNormalizedFileUriString(src) + "\n"); - Assert.assertNull(new CompareTool().compareByContent(dest, cmp, destinationFolder, "diff_XofY_")); + Assertions.assertNull(new CompareTool().compareByContent(dest, cmp, destinationFolder, "diff_XofY_")); } diff --git a/src/test/java/com/itextpdf/html2pdf/resolver/UriResolverTest.java b/src/test/java/com/itextpdf/html2pdf/resolver/UriResolverTest.java index 4325193d4..c46b95bd7 100644 --- a/src/test/java/com/itextpdf/html2pdf/resolver/UriResolverTest.java +++ b/src/test/java/com/itextpdf/html2pdf/resolver/UriResolverTest.java @@ -29,23 +29,22 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class UriResolverTest extends ExtendedITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/resolver/UriResolverTest/"; private static final String DESTINATION_FOLDER = "./target/test/resources/com/itextpdf/html2pdf/resolver/UriResolverTest/"; - @BeforeClass + @BeforeAll public static void before() throws IOException { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -59,6 +58,6 @@ public void illegalColonCharTest() throws IOException, InterruptedException { ConverterProperties properties = new ConverterProperties().setBaseUri(SOURCE_FOLDER); HtmlConverter.convertToPdf(new File(srcHtml), new File(outPdf), properties); - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER, "diff_")); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER, "diff_")); } } diff --git a/src/test/java/com/itextpdf/html2pdf/resolver/font/FontsUnicodeCoverageTest.java b/src/test/java/com/itextpdf/html2pdf/resolver/font/FontsUnicodeCoverageTest.java index 57fe6e1c9..081e94ab6 100644 --- a/src/test/java/com/itextpdf/html2pdf/resolver/font/FontsUnicodeCoverageTest.java +++ b/src/test/java/com/itextpdf/html2pdf/resolver/font/FontsUnicodeCoverageTest.java @@ -26,17 +26,16 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.font.PdfFont; import com.itextpdf.kernel.font.PdfFontFactory; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class FontsUnicodeCoverageTest extends ExtendedITextTest { @Test @@ -87,10 +86,10 @@ public void compareShippedFontsCoverageTest() throws IOException { 3324, 3324, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794 ); - Assert.assertEquals("The number of Unicode glyphs within shipped fonts has been changed", - expectedUniCharsNumber, actualUniCharsNumber); - Assert.assertEquals("The Unicode ranges within fonts have been changed", - expectedUnicodeRanges, actualUnicodeRanges); + Assertions.assertEquals(expectedUniCharsNumber, actualUniCharsNumber, + "The number of Unicode glyphs within shipped fonts has been changed"); + Assertions.assertEquals(expectedUnicodeRanges, actualUnicodeRanges, + "The Unicode ranges within fonts have been changed"); } private static List readFontCollection() throws IOException { diff --git a/src/test/java/com/itextpdf/html2pdf/resolver/form/NameResolverTest.java b/src/test/java/com/itextpdf/html2pdf/resolver/form/NameResolverTest.java index 6253f1b5a..44284a77a 100644 --- a/src/test/java/com/itextpdf/html2pdf/resolver/form/NameResolverTest.java +++ b/src/test/java/com/itextpdf/html2pdf/resolver/form/NameResolverTest.java @@ -23,12 +23,11 @@ This file is part of the iText (R) project. package com.itextpdf.html2pdf.resolver.form; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.UnitTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(UnitTest.class) +@Tag("UnitTest") public class NameResolverTest extends ExtendedITextTest { @Test @@ -56,16 +55,16 @@ public void separatorTest() { private void runTest(String input, String expectedOutput) { FormFieldNameResolver nameResolver = new FormFieldNameResolver(); - Assert.assertEquals(expectedOutput, nameResolver.resolveFormName(input)); + Assertions.assertEquals(expectedOutput, nameResolver.resolveFormName(input)); } private void runTest(String[] input, String[] expectedOutput) { - Assert.assertTrue("Input and output should be the same length", input.length == expectedOutput.length); + Assertions.assertTrue(input.length == expectedOutput.length, "Input and output should be the same length"); FormFieldNameResolver nameResolver = new FormFieldNameResolver(); String[] output = new String[input.length]; for (int i = 0; i < input.length; ++i) { output[i] = nameResolver.resolveFormName(input[i]); } - Assert.assertArrayEquals(expectedOutput, output); + Assertions.assertArrayEquals(expectedOutput, output); } } diff --git a/src/test/java/com/itextpdf/html2pdf/resolver/resource/ExternalImageTest.java b/src/test/java/com/itextpdf/html2pdf/resolver/resource/ExternalImageTest.java index 97a5a01a2..eca0481dc 100644 --- a/src/test/java/com/itextpdf/html2pdf/resolver/resource/ExternalImageTest.java +++ b/src/test/java/com/itextpdf/html2pdf/resolver/resource/ExternalImageTest.java @@ -29,14 +29,13 @@ This file is part of the iText (R) project. import com.itextpdf.layout.element.Image; import com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.IOException; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ExternalImageTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/resolver/resource/ExternalImageTest/"; @@ -47,12 +46,12 @@ public void test() throws IOException { PdfXObject externalImage = resourceResolver.retrieveImage( "https://raw.githubusercontent.com/itext/itext7/develop/layout/src/test/resources/com/itextpdf/layout/ImageTest/itis.jpg"); - Assert.assertNotNull(externalImage); + Assertions.assertNotNull(externalImage); ImageData imageData = ImageDataFactory.create(sourceFolder + "itis.jpg"); Image localImage = new Image(imageData); - Assert.assertTrue(new CompareTool().compareStreams(externalImage.getPdfObject(), + Assertions.assertTrue(new CompareTool().compareStreams(externalImage.getPdfObject(), localImage.getXObject().getPdfObject())); } } diff --git a/src/test/java/com/itextpdf/html2pdf/resolver/resource/ExternalResourcesTest.java b/src/test/java/com/itextpdf/html2pdf/resolver/resource/ExternalResourcesTest.java index cab42bd15..e4b331ccf 100644 --- a/src/test/java/com/itextpdf/html2pdf/resolver/resource/ExternalResourcesTest.java +++ b/src/test/java/com/itextpdf/html2pdf/resolver/resource/ExternalResourcesTest.java @@ -24,13 +24,12 @@ This file is part of the iText (R) project. import com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; -import org.junit.Assert; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ExternalResourcesTest extends ExtendedITextTest { @Test // Android-Conversion-Ignore-Test (TODO DEVSIX-6459 fix the SecurityException(Permission denied) from UrlUtil method) @@ -40,6 +39,6 @@ public void externalStylesheetTest() { byte[] exByteArray = resourceResolver.retrieveBytesFromResource( "https://raw.githubusercontent.com/itext/i7j-pdfhtml/develop/src/test/resources/com/itextpdf/html2pdf/styles.css"); - Assert.assertNotNull(exByteArray); + Assertions.assertNotNull(exByteArray); } } diff --git a/src/test/java/com/itextpdf/html2pdf/resolver/resource/HtmlResourceResolverTest.java b/src/test/java/com/itextpdf/html2pdf/resolver/resource/HtmlResourceResolverTest.java index ba1136cb1..24936bd32 100644 --- a/src/test/java/com/itextpdf/html2pdf/resolver/resource/HtmlResourceResolverTest.java +++ b/src/test/java/com/itextpdf/html2pdf/resolver/resource/HtmlResourceResolverTest.java @@ -49,25 +49,24 @@ This file is part of the iText (R) project. import com.itextpdf.test.ExtendedITextTest; import com.itextpdf.test.annotations.LogMessage; import com.itextpdf.test.annotations.LogMessages; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; // TODO: DEVSIX-5968 Add new tests in HtmlResourceResolverTest -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class HtmlResourceResolverTest extends ExtendedITextTest { private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/resolver/resource/HtmlResourceResolverTest/"; private static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/resolver/resource/HtmlResourceResolverTest/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(DESTINATION_FOLDER); } @@ -79,7 +78,7 @@ public void resourceResolverHtmlWithSvgTest01() throws IOException, InterruptedE HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "resourceResolverHtmlWithSvgTest01.html"), new File(outPdf)); - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER)); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER)); } @Test @@ -104,7 +103,7 @@ public void resourceResolverTest07() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "resourceResolverTest07.html"), new File(outPdf)); - Assert.assertNull(new CompareTool().compareByContent( + Assertions.assertNull(new CompareTool().compareByContent( outPdf, cmpPdf, DESTINATION_FOLDER, "diff07_")); } @@ -146,7 +145,7 @@ public void resourceResolverTest07B() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File( SOURCE_FOLDER + "#r%e%25s@o%urces/resourceResolverTest07B.html"), new File(outPdf)); - Assert.assertNull(new CompareTool().compareByContent( + Assertions.assertNull(new CompareTool().compareByContent( outPdf, cmpPdf, DESTINATION_FOLDER, "diff07B_")); } @@ -160,7 +159,7 @@ public void resourceResolverTest07C() throws IOException, InterruptedException { HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "#r%e%25s@o%urces/resourceResolverTest07C.html"), new File(outPdf), new ConverterProperties().setBaseUri(SOURCE_FOLDER + "#r%e%25s@o%urces/..")); - Assert.assertNull(new CompareTool().compareByContent( + Assertions.assertNull(new CompareTool().compareByContent( outPdf, cmpPdf, DESTINATION_FOLDER, "diff07C_")); } @@ -210,7 +209,7 @@ public void resourceResolverCssWithSvg() throws IOException, InterruptedExceptio HtmlConverter.convertToPdf(new File(SOURCE_FOLDER + "resourceResolverCssWithSvg.html"), new File(outPdf)); - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER)); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER)); } @Test @@ -246,7 +245,7 @@ public void attemptToProcessBySvgProcessingUtilSvgWithImageTest() { PdfFormXObject pdfFormXObject = processingUtil.createXObjectFromProcessingResult(res, document); PdfDictionary resources = (PdfDictionary) pdfFormXObject.getResources().getPdfObject().get(PdfName.XObject); PdfDictionary fm1Dict = (PdfDictionary) resources.get(new PdfName("Fm1")); - Assert.assertTrue(((PdfDictionary) fm1Dict.get(PdfName.Resources)).containsKey(PdfName.XObject)); + Assertions.assertTrue(((PdfDictionary) fm1Dict.get(PdfName.Resources)).containsKey(PdfName.XObject)); } @Test @@ -269,7 +268,7 @@ public void attemptToProcessBySvgProcessingUtilSvgWithSvgTest() { PdfFormXObject pdfFormXObject = processingUtil.createXObjectFromProcessingResult(res, document); PdfDictionary resources = (PdfDictionary) pdfFormXObject.getResources().getPdfObject().get(PdfName.XObject); PdfDictionary fm1Dict = (PdfDictionary) resources.get(new PdfName("Fm1")); - Assert.assertTrue(((PdfDictionary) fm1Dict.get(PdfName.Resources)).containsKey(PdfName.XObject)); + Assertions.assertTrue(((PdfDictionary) fm1Dict.get(PdfName.Resources)).containsKey(PdfName.XObject)); } @Test @@ -297,7 +296,7 @@ public void svgInsideSvgTest() throws IOException, InterruptedException { document.add(new SvgProcessingUtil(resourceResolver).createSvgImageFromProcessingResult(result)); } - Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, DESTINATION_FOLDER, "diff")); + Assertions.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, DESTINATION_FOLDER, "diff")); } @Test @@ -511,7 +510,7 @@ private void convertHtmlStreamToPdf(String htmlPath, String outPdf, String cmpPd new ConverterProperties().setBaseUri(baseUri)); } - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER)); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER)); } private void convertHtmlFileToPdf(String htmlPath, String outPdf, String cmpPdf, ConverterProperties converterProperties) @@ -520,6 +519,6 @@ private void convertHtmlFileToPdf(String htmlPath, String outPdf, String cmpPdf, System.out.println("html: " + UrlUtil.getNormalizedFileUriString(htmlPath) + "\n"); HtmlConverter.convertToPdf(new File(htmlPath), new File(outPdf), converterProperties); - Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER)); + Assertions.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DESTINATION_FOLDER)); } } diff --git a/src/test/java/com/itextpdf/html2pdf/resolver/resource/ResourceReleaseResolverTest.java b/src/test/java/com/itextpdf/html2pdf/resolver/resource/ResourceReleaseResolverTest.java index 7f4b1bef6..b7e429ac8 100644 --- a/src/test/java/com/itextpdf/html2pdf/resolver/resource/ResourceReleaseResolverTest.java +++ b/src/test/java/com/itextpdf/html2pdf/resolver/resource/ResourceReleaseResolverTest.java @@ -27,26 +27,25 @@ This file is part of the iText (R) project. import com.itextpdf.html2pdf.resolver.font.DefaultFontProvider; import com.itextpdf.commons.utils.FileUtil; import com.itextpdf.test.ExtendedITextTest; -import com.itextpdf.test.annotations.type.IntegrationTest; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Tag; -@Category(IntegrationTest.class) +@Tag("IntegrationTest") public class ResourceReleaseResolverTest extends ExtendedITextTest { public static final String sourceFolder = "./src/test/resources/com/itextpdf/html2pdf/resolver/resource/"; public static final String destinationFolder = "./target/test/com/itextpdf/html2pdf/resolver/resource/release/"; - @BeforeClass + @BeforeAll public static void beforeClass() { createOrClearDestinationFolder(destinationFolder); } @@ -78,11 +77,11 @@ public void testThatSvgIsReleasedAfterConversion() throws IOException { // The resource must be freed after the conversion File resourceToBeRemoved = new File(workDirSvgFile); resourceToBeRemoved.delete(); - Assert.assertFalse(resourceToBeRemoved.exists()); + Assertions.assertFalse(resourceToBeRemoved.exists()); resourceToBeRemoved = new File(workDirImageFile); resourceToBeRemoved.delete(); - Assert.assertFalse(resourceToBeRemoved.exists()); + Assertions.assertFalse(resourceToBeRemoved.exists()); } @Test @@ -113,11 +112,11 @@ public void testThatLocalFontIsReleasedAfterConversion() throws IOException { // The resource must be freed after the conversion File resourceToBeRemoved = new File(workDirFontFile); resourceToBeRemoved.delete(); - Assert.assertFalse(resourceToBeRemoved.exists()); + Assertions.assertFalse(resourceToBeRemoved.exists()); } @Test - @Ignore("Ignored because currently the font file is not removed and test is failed. Remove this ignore after DEVSIX-3199 is fixed") + @Disabled("Ignored because currently the font file is not removed and test is failed. Remove this ignore after DEVSIX-3199 is fixed") // TODO unignore after DEVSIX-3199 is fixed public void testThatAddedFontIsReleasedAfterConversion() throws IOException { String dirName = "AddedFontIsReleased/"; @@ -144,7 +143,7 @@ public void testThatAddedFontIsReleasedAfterConversion() throws IOException { File resourceToBeRemoved = new File(workDirFontFile); FileUtil.deleteFile(resourceToBeRemoved); - Assert.assertFalse(resourceToBeRemoved.exists()); + Assertions.assertFalse(resourceToBeRemoved.exists()); } @Test @@ -171,6 +170,6 @@ public void testThatCssIsReleasedAfterConversion() throws IOException { File resourceToBeRemoved = new File(workDirCssFile); FileUtil.deleteFile(resourceToBeRemoved); - Assert.assertFalse(resourceToBeRemoved.exists()); + Assertions.assertFalse(resourceToBeRemoved.exists()); } } diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontFaceTest/bolderLighterFontWeightTest.html b/src/test/resources/com/itextpdf/html2pdf/css/FontFaceTest/bolderLighterFontWeightTest.html new file mode 100644 index 000000000..de266c08a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/FontFaceTest/bolderLighterFontWeightTest.html @@ -0,0 +1,12 @@ + + + + + + +

To test fon-weight resolution in @font-face, the divs below have all been assigned the same font-family, but with a different weight. In the font-face declarations, the weights will point to different font files

+
1. Droid Serif Regular
+
2. Droid Serif Bold
+ + + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontFaceTest/cmp_bolderLighterFontWeightTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/FontFaceTest/cmp_bolderLighterFontWeightTest.pdf new file mode 100644 index 000000000..aeb46fba9 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/FontFaceTest/cmp_bolderLighterFontWeightTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyFallbackTest/glyphsNotFound.html b/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyFallbackTest/glyphsNotFound.html new file mode 100644 index 000000000..76769bfc2 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyFallbackTest/glyphsNotFound.html @@ -0,0 +1,16 @@ + + + Font Family Test + + + +
これはダミーテキストですこれはダミーテキストです Some english text
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyFallbackTest/mixedJapaneseEnglish.html b/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyFallbackTest/mixedJapaneseEnglish.html new file mode 100644 index 000000000..8cc1b813f --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyFallbackTest/mixedJapaneseEnglish.html @@ -0,0 +1,16 @@ + + + Font Family Test + + + +
これはダミーテキストですこれはダミーテキストですSome English text insertedこれはダミーテキストですこれはダミーテキストです
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyFallbackTest/noBoldGlyphs.html b/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyFallbackTest/noBoldGlyphs.html new file mode 100644 index 000000000..bc149ea19 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyFallbackTest/noBoldGlyphs.html @@ -0,0 +1,6 @@ + + +
Bold:

これはダミーテキストですEnglish Text in Boldこれはダミーテキストです

+
Regular:
これはダミーテキストですEnglish text in Regular これはダミーテキストです
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyTest/cmp_selectFontInGroup.pdf b/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyTest/cmp_selectFontInGroup.pdf new file mode 100644 index 000000000..61dabfc38 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyTest/cmp_selectFontInGroup.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyTest/selectFontInGroup.html b/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyTest/selectFontInGroup.html new file mode 100644 index 000000000..c9969e801 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/FontFamilyTest/selectFontInGroup.html @@ -0,0 +1,20 @@ + + + Font Family Test + + + +

Font Family Test

+

Some text with Serif font from font collection.

+

test

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_cursiveFontTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_cursiveFontTest.pdf new file mode 100644 index 000000000..58ad81453 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_cursiveFontTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_fantasyFontTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_fantasyFontTest.pdf new file mode 100644 index 000000000..194fa211a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_fantasyFontTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_fontWithSansSerifTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_fontWithSansSerifTest.pdf new file mode 100644 index 000000000..b8ac8fab1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_fontWithSansSerifTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_fontWithSerifTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_fontWithSerifTest.pdf new file mode 100644 index 000000000..78d80cd49 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_fontWithSerifTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_monospaceFontTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_monospaceFontTest.pdf new file mode 100644 index 000000000..954ca8f24 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cmp_monospaceFontTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cursiveFontTest.html b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cursiveFontTest.html new file mode 100644 index 000000000..0b7715867 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/cursiveFontTest.html @@ -0,0 +1,19 @@ + + + Font Family Test + + + +

Font Family Test

+

Some text with cursive font.

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/fantasyFontTest.html b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/fantasyFontTest.html new file mode 100644 index 000000000..9f09573ec --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/fantasyFontTest.html @@ -0,0 +1,19 @@ + + + Font Family Test + + + +

Font Family Test

+

Some text with fantasy font.

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/fontWithSansSerifTest.html b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/fontWithSansSerifTest.html new file mode 100644 index 000000000..907fa0a96 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/fontWithSansSerifTest.html @@ -0,0 +1,19 @@ + + + Font Family Test + + + +

Font Family Test

+

Some text with Sans-Serif font.

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/fontWithSerifTest.html b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/fontWithSerifTest.html new file mode 100644 index 000000000..6ac5bc498 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/fontWithSerifTest.html @@ -0,0 +1,19 @@ + + + Font Family Test + + + +

Font Family Test

+

Some text with Serif font.

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/monospaceFontTest.html b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/monospaceFontTest.html new file mode 100644 index 000000000..f80e7834a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/FontStyleParameterizedTest/monospaceFontTest.html @@ -0,0 +1,19 @@ + + + Font Family Test + + + +

Font Family Test

+

Some text with monospace font.

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/basicGridArea1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/basicGridArea1.html new file mode 100644 index 000000000..b1656ceac --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/basicGridArea1.html @@ -0,0 +1,40 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/basicGridArea2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/basicGridArea2.html new file mode 100644 index 000000000..5b1b75224 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/basicGridArea2.html @@ -0,0 +1,36 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/borderBoxTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/borderBoxTest.html new file mode 100644 index 000000000..8ad70700c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/borderBoxTest.html @@ -0,0 +1,43 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+
+

Some bottom text

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/borderBoxTest2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/borderBoxTest2.html new file mode 100644 index 000000000..65f13a35c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/borderBoxTest2.html @@ -0,0 +1,46 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
+
+

Some bottom text

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_basicGridArea1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_basicGridArea1.pdf new file mode 100644 index 000000000..57c410650 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_basicGridArea1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_basicGridArea2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_basicGridArea2.pdf new file mode 100644 index 000000000..7c899153f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_basicGridArea2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_borderBoxTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_borderBoxTest.pdf new file mode 100644 index 000000000..017c899fa Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_borderBoxTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_borderBoxTest2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_borderBoxTest2.pdf new file mode 100644 index 000000000..fd81f1f98 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_borderBoxTest2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanOnSplitTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanOnSplitTest.pdf new file mode 100644 index 000000000..469c3dc1f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanOnSplitTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanOnSplitTest2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanOnSplitTest2.pdf new file mode 100644 index 000000000..a004fda64 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanOnSplitTest2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanTest.pdf new file mode 100644 index 000000000..dab607732 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanWithGaps100OnSplitTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanWithGaps100OnSplitTest.pdf new file mode 100644 index 000000000..cf3e52b0c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanWithGaps100OnSplitTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanWithGaps50OnSplitTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanWithGaps50OnSplitTest.pdf new file mode 100644 index 000000000..e2207fe72 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_differentRowSpanWithGaps50OnSplitTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_grid-area-switched-places.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_grid-area-switched-places.pdf new file mode 100644 index 000000000..ce61e5872 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_grid-area-switched-places.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_gridShorthandAdvanced.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_gridShorthandAdvanced.pdf new file mode 100644 index 000000000..986964f31 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_gridShorthandAdvanced.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_invalidTemplateAreas.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_invalidTemplateAreas.pdf new file mode 100644 index 000000000..4daa105c3 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_invalidTemplateAreas.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_splitOn2ndRowGapTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_splitOn2ndRowGapTest.pdf new file mode 100644 index 000000000..38b97d7aa Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_splitOn2ndRowGapTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasBasic.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasBasic.pdf new file mode 100644 index 000000000..45d92fd89 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasBasic.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasInvalidName.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasInvalidName.pdf new file mode 100644 index 000000000..39fa462dc Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasInvalidName.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasShorthandAdvanced.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasShorthandAdvanced.pdf new file mode 100644 index 000000000..0293a315d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasShorthandAdvanced.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasShorthandBasic.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasShorthandBasic.pdf new file mode 100644 index 000000000..ebdca1b5b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasShorthandBasic.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasStart.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasStart.pdf new file mode 100644 index 000000000..e20c93da1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasStart.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasStartAuto.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasStartAuto.pdf new file mode 100644 index 000000000..5f0a4338d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasStartAuto.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasStartEnd.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasStartEnd.pdf new file mode 100644 index 000000000..e8ac57b7d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasStartEnd.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasWithDots.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasWithDots.pdf new file mode 100644 index 000000000..c29b139c8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateAreasWithDots.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateShorthandWithoutLineNames.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateShorthandWithoutLineNames.pdf new file mode 100644 index 000000000..f5ab5da18 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/cmp_templateShorthandWithoutLineNames.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanOnSplitTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanOnSplitTest.html new file mode 100644 index 000000000..95aede07b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanOnSplitTest.html @@ -0,0 +1,94 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanOnSplitTest2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanOnSplitTest2.html new file mode 100644 index 000000000..f7f39c2e0 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanOnSplitTest2.html @@ -0,0 +1,95 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet. + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanTest.html new file mode 100644 index 000000000..39e021d89 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanTest.html @@ -0,0 +1,49 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua.
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanWithGaps100OnSplitTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanWithGaps100OnSplitTest.html new file mode 100644 index 000000000..fde9f3fbf --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanWithGaps100OnSplitTest.html @@ -0,0 +1,96 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet. + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanWithGaps50OnSplitTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanWithGaps50OnSplitTest.html new file mode 100644 index 000000000..3189260f4 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/differentRowSpanWithGaps50OnSplitTest.html @@ -0,0 +1,96 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet. + Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/grid-area-switched-places.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/grid-area-switched-places.html new file mode 100644 index 000000000..a5f509fae --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/grid-area-switched-places.html @@ -0,0 +1,53 @@ + + + + + + +
+
+

1st elem

+
+
+

2nd elem

+
+
+

3rd elem

+
+
+

4th elem

+
+
+

5th elem

+
+
+

6th elem

+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/gridShorthandAdvanced.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/gridShorthandAdvanced.html new file mode 100644 index 000000000..234674f4b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/gridShorthandAdvanced.html @@ -0,0 +1,42 @@ + + +CSS grid-template shorthand test + + +
+
Header
+ +
Main area
+
Footer
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/invalidTemplateAreas.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/invalidTemplateAreas.html new file mode 100644 index 000000000..04878056d --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/invalidTemplateAreas.html @@ -0,0 +1,46 @@ + + +CSS Grid Layout Test: Positioned grid items + + + + + +
+
Header
+ +
Main area
+
Footer
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/splitOn2ndRowGapTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/splitOn2ndRowGapTest.html new file mode 100644 index 000000000..e8ebd1b44 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/splitOn2ndRowGapTest.html @@ -0,0 +1,66 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet..
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasBasic.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasBasic.html new file mode 100644 index 000000000..ad574e808 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasBasic.html @@ -0,0 +1,46 @@ + + +CSS Grid Layout Test: Positioned grid items + + + + + +
+
Header
+ +
Main area
+
Footer
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasInvalidName.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasInvalidName.html new file mode 100644 index 000000000..99e20fba6 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasInvalidName.html @@ -0,0 +1,46 @@ + + +CSS Grid Layout Test: Positioned grid items + + + + + +
+
Header
+ +
Main area
+
Footer
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasShorthandAdvanced.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasShorthandAdvanced.html new file mode 100644 index 000000000..cfeb0ca9b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasShorthandAdvanced.html @@ -0,0 +1,42 @@ + + +CSS grid-template shorthand test + + +
+
Header
+ +
Main area
+
Footer
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasShorthandBasic.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasShorthandBasic.html new file mode 100644 index 000000000..956e3f0d1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasShorthandBasic.html @@ -0,0 +1,42 @@ + + +CSS grid-template shorthand test + + +
+
Header
+ +
Main area
+
Footer
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasStart.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasStart.html new file mode 100644 index 000000000..e265a09a1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasStart.html @@ -0,0 +1,46 @@ + + +CSS Grid Layout Test: Positioned grid items + + + + + +
+
Main area
+ +
Footer
+
Header
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasStartAuto.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasStartAuto.html new file mode 100644 index 000000000..8d511d1bd --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasStartAuto.html @@ -0,0 +1,46 @@ + + +CSS Grid Layout Test: Positioned grid items + + + + + +
+
Main area
+ +
Footer
+
Header
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasStartEnd.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasStartEnd.html new file mode 100644 index 000000000..ddbc9e709 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasStartEnd.html @@ -0,0 +1,46 @@ + + +CSS Grid Layout Test: Positioned grid items + + + + + +
+
Main area
+ +
Footer
+
Header
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasWithDots.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasWithDots.html new file mode 100644 index 000000000..b5a8af5b9 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateAreasWithDots.html @@ -0,0 +1,46 @@ + + +CSS Grid Layout Test: Positioned grid items + + + + + +
+
Header
+ +
Main area
+
Footer
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateShorthandWithoutLineNames.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateShorthandWithoutLineNames.html new file mode 100644 index 000000000..a31d48a92 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/templateShorthandWithoutLineNames.html @@ -0,0 +1,47 @@ + + + + + CSS grid-template shorthand test + + + +
+
Header
+ +
Main area
+
Footer
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/test1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/test1.html new file mode 100644 index 000000000..1524750cd --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridAreaTest/test1.html @@ -0,0 +1,42 @@ + + +CSS grid-template shorthand test + + +
+
Header
+ +
Main area
+
Footer
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_diff_units.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_diff_units.pdf new file mode 100644 index 000000000..8a5b1b03d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_diff_units.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_different_rows_cols_gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_different_rows_cols_gap.pdf new file mode 100644 index 000000000..66aa86425 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_different_rows_cols_gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_float_gap_value.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_float_gap_value.pdf new file mode 100644 index 000000000..5a8a2aad5 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_float_gap_value.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_gridColumnGapTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_gridColumnGapTest.pdf new file mode 100644 index 000000000..2013f1278 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_gridColumnGapTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_gridGapTest1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_gridGapTest1.pdf new file mode 100644 index 000000000..c152e5932 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_gridGapTest1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_gridGapTest2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_gridGapTest2.pdf new file mode 100644 index 000000000..1dadf1148 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_gridGapTest2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_gridRowGapTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_gridRowGapTest.pdf new file mode 100644 index 000000000..71fb53d9a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_gridRowGapTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_large_col_gap_value.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_large_col_gap_value.pdf new file mode 100644 index 000000000..f1553f061 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_large_col_gap_value.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_large_gap_value.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_large_gap_value.pdf new file mode 100644 index 000000000..6a55d2269 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_large_gap_value.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_large_row_gap_value.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_large_row_gap_value.pdf new file mode 100644 index 000000000..f3e53c0e4 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_large_row_gap_value.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_margin.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_margin.pdf new file mode 100644 index 000000000..6c2a95b08 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_margin.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_negative_col_gap_value.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_negative_col_gap_value.pdf new file mode 100644 index 000000000..142cc81dc Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_negative_col_gap_value.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_negative_gap_value.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_negative_gap_value.pdf new file mode 100644 index 000000000..6ae75280a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_negative_gap_value.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_negative_row_gap_value.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_negative_row_gap_value.pdf new file mode 100644 index 000000000..4cf983650 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_negative_row_gap_value.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_padding.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_padding.pdf new file mode 100644 index 000000000..0d90579ef Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_padding.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_small_values_gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_small_values_gap.pdf new file mode 100644 index 000000000..b0d2c9419 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_small_values_gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_cols_col_gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_cols_col_gap.pdf new file mode 100644 index 000000000..5bbacc63f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_cols_col_gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_cols_gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_cols_gap.pdf new file mode 100644 index 000000000..979504d48 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_cols_gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_auto_cols_gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_auto_cols_gap.pdf new file mode 100644 index 000000000..b18b84a0e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_auto_cols_gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_auto_rows_gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_auto_rows_gap.pdf new file mode 100644 index 000000000..0246c881a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_auto_rows_gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_big_cell_gap_1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_big_cell_gap_1.pdf new file mode 100644 index 000000000..07449dfa0 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_big_cell_gap_1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_big_cell_gap_2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_big_cell_gap_2.pdf new file mode 100644 index 000000000..e8d5176a1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_big_cell_gap_2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_few_big_cell_gap_1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_few_big_cell_gap_1.pdf new file mode 100644 index 000000000..167ead617 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_few_big_cell_gap_1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_few_big_cell_gap_2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_few_big_cell_gap_2.pdf new file mode 100644 index 000000000..ca86e1e1d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_few_big_cell_gap_2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_gap.pdf new file mode 100644 index 000000000..4b754e91c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_horz_cell_gap_1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_horz_cell_gap_1.pdf new file mode 100644 index 000000000..8d1ca9cef Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_horz_cell_gap_1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_horz_cell_gap_2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_horz_cell_gap_2.pdf new file mode 100644 index 000000000..741bca615 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_horz_cell_gap_2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_vert_cell_gap_1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_vert_cell_gap_1.pdf new file mode 100644 index 000000000..b4796c292 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_vert_cell_gap_1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_vert_cell_gap_2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_vert_cell_gap_2.pdf new file mode 100644 index 000000000..a42cc337a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_cols_vert_cell_gap_2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_gap.pdf new file mode 100644 index 000000000..82cd8642a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_row_gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_row_gap.pdf new file mode 100644 index 000000000..43be485fb Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/cmp_template_rows_row_gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/diff_units.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/diff_units.html new file mode 100644 index 000000000..cb714e0f1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/diff_units.html @@ -0,0 +1,87 @@ + + + + + + + +

5 px

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+

1 cm

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+

1 em, font-size 10pt

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+

15 pt

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+

2 rem

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+

4 ch

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+

10 vh

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/different_rows_cols_gap.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/different_rows_cols_gap.html new file mode 100644 index 000000000..bdb5bbfe0 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/different_rows_cols_gap.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/float_gap_value.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/float_gap_value.html new file mode 100644 index 000000000..3285036ee --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/float_gap_value.html @@ -0,0 +1,28 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/gridColumnGapTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/gridColumnGapTest.html new file mode 100644 index 000000000..ec75cc67c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/gridColumnGapTest.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/gridGapTest1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/gridGapTest1.html new file mode 100644 index 000000000..8c3918c0c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/gridGapTest1.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/gridGapTest2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/gridGapTest2.html new file mode 100644 index 000000000..8f66a4835 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/gridGapTest2.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/gridRowGapTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/gridRowGapTest.html new file mode 100644 index 000000000..c8ce8f721 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/gridRowGapTest.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/large_col_gap_value.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/large_col_gap_value.html new file mode 100644 index 000000000..482c7ab5f --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/large_col_gap_value.html @@ -0,0 +1,27 @@ + + + + + + + +

9999 px

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/large_gap_value.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/large_gap_value.html new file mode 100644 index 000000000..ac8ca8f6a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/large_gap_value.html @@ -0,0 +1,27 @@ + + + + + + + +

9999 px

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/large_row_gap_value.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/large_row_gap_value.html new file mode 100644 index 000000000..1bf018580 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/large_row_gap_value.html @@ -0,0 +1,27 @@ + + + + + + + +

9999 px

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/margin.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/margin.html new file mode 100644 index 000000000..f21bc940a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/margin.html @@ -0,0 +1,38 @@ + + + + + + + +

margin: 20px; gap: 5px;

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+

margin-top: 30px; margin-left: 10px; gap: 10px;

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/negative_col_gap_value.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/negative_col_gap_value.html new file mode 100644 index 000000000..018ef8d31 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/negative_col_gap_value.html @@ -0,0 +1,27 @@ + + + + + + + +

-100px;

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/negative_gap_value.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/negative_gap_value.html new file mode 100644 index 000000000..23cd4823d --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/negative_gap_value.html @@ -0,0 +1,27 @@ + + + + + + + +

-100px;

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/negative_row_gap_value.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/negative_row_gap_value.html new file mode 100644 index 000000000..549ea96af --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/negative_row_gap_value.html @@ -0,0 +1,27 @@ + + + + + + + +

-100px;

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/padding.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/padding.html new file mode 100644 index 000000000..f168ef18e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/padding.html @@ -0,0 +1,38 @@ + + + + + + + +

padding: 20px; gap: 5px;

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+

padding-top: 30px; padding-left: 10px; gap: 10px;

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/small_values_gap.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/small_values_gap.html new file mode 100644 index 000000000..fd64001e7 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/small_values_gap.html @@ -0,0 +1,47 @@ + + + + + + + +

0 px

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+

1 pt

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+

2 px

+
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_cols_col_gap.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_cols_col_gap.html new file mode 100644 index 000000000..77abb71cf --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_cols_col_gap.html @@ -0,0 +1,28 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_cols_gap.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_cols_gap.html new file mode 100644 index 000000000..35190d545 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_cols_gap.html @@ -0,0 +1,28 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_auto_cols_gap.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_auto_cols_gap.html new file mode 100644 index 000000000..6e2d9d8c1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_auto_cols_gap.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_auto_rows_gap.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_auto_rows_gap.html new file mode 100644 index 000000000..75634c7ab --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_auto_rows_gap.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_big_cell_gap_1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_big_cell_gap_1.html new file mode 100644 index 000000000..86aab3e51 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_big_cell_gap_1.html @@ -0,0 +1,36 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_big_cell_gap_2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_big_cell_gap_2.html new file mode 100644 index 000000000..5278aaf45 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_big_cell_gap_2.html @@ -0,0 +1,36 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_few_big_cell_gap_1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_few_big_cell_gap_1.html new file mode 100644 index 000000000..b14531e7b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_few_big_cell_gap_1.html @@ -0,0 +1,45 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_few_big_cell_gap_2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_few_big_cell_gap_2.html new file mode 100644 index 000000000..248e74ef5 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_few_big_cell_gap_2.html @@ -0,0 +1,50 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_gap.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_gap.html new file mode 100644 index 000000000..090ae2b32 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_gap.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_horz_cell_gap_1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_horz_cell_gap_1.html new file mode 100644 index 000000000..cc6d780f7 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_horz_cell_gap_1.html @@ -0,0 +1,34 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_horz_cell_gap_2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_horz_cell_gap_2.html new file mode 100644 index 000000000..0e26e694c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_horz_cell_gap_2.html @@ -0,0 +1,34 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_vert_cell_gap_1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_vert_cell_gap_1.html new file mode 100644 index 000000000..2764f15fd --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_vert_cell_gap_1.html @@ -0,0 +1,34 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_vert_cell_gap_2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_vert_cell_gap_2.html new file mode 100644 index 000000000..8a5965351 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_cols_vert_cell_gap_2.html @@ -0,0 +1,34 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_gap.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_gap.html new file mode 100644 index 000000000..c9c194236 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_gap.html @@ -0,0 +1,28 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_row_gap.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_row_gap.html new file mode 100644 index 000000000..63973d27c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridGapTest/template_rows_row_gap.html @@ -0,0 +1,28 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd1.pdf new file mode 100644 index 000000000..032a97061 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd2.pdf new file mode 100644 index 000000000..d2db94286 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd3.pdf new file mode 100644 index 000000000..893f9621b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd4.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd4.pdf new file mode 100644 index 000000000..1c2a1699c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd4.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd5.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd5.pdf new file mode 100644 index 000000000..306a94047 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_colStartEnd5.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_columnSpanExpandsStartToNegativeTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_columnSpanExpandsStartToNegativeTest.pdf new file mode 100644 index 000000000..085234138 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_columnSpanExpandsStartToNegativeTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement1.pdf new file mode 100644 index 000000000..3b7250a05 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement2.pdf new file mode 100644 index 000000000..c05b86fae Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement3.pdf new file mode 100644 index 000000000..9ed7426d5 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement4.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement4.pdf new file mode 100644 index 000000000..579e3cf30 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement4.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement5.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement5.pdf new file mode 100644 index 000000000..08db8cf9e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement5.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement6.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement6.pdf new file mode 100644 index 000000000..da35da8ef Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement6.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement7.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement7.pdf new file mode 100644 index 000000000..e8edc9f40 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_fewCellsPlacement7.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeAndPositiveIndexShorthandTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeAndPositiveIndexShorthandTest.pdf new file mode 100644 index 000000000..31a43224b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeAndPositiveIndexShorthandTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeIndexOutOfTemplateTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeIndexOutOfTemplateTest.pdf new file mode 100644 index 000000000..5644d5df9 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeIndexOutOfTemplateTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeIndexShorthandTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeIndexShorthandTest.pdf new file mode 100644 index 000000000..777e80ac2 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeIndexShorthandTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeIndexWithImplicitLinesTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeIndexWithImplicitLinesTest.pdf new file mode 100644 index 000000000..5545c1c4c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeIndexWithImplicitLinesTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeIndexWithoutTemplateTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeIndexWithoutTemplateTest.pdf new file mode 100644 index 000000000..d325031ba Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_negativeIndexWithoutTemplateTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_noTemplate1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_noTemplate1.pdf new file mode 100644 index 000000000..b0da036b5 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_noTemplate1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_noTemplate2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_noTemplate2.pdf new file mode 100644 index 000000000..590d693e4 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_noTemplate2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_rowStartEnd1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_rowStartEnd1.pdf new file mode 100644 index 000000000..df1cdef85 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_rowStartEnd1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_rowStartEnd2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_rowStartEnd2.pdf new file mode 100644 index 000000000..81e8cc2ef Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_rowStartEnd2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_rowStartEnd3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_rowStartEnd3.pdf new file mode 100644 index 000000000..3d055041b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_rowStartEnd3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_rowStartEnd4.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_rowStartEnd4.pdf new file mode 100644 index 000000000..1f8e542bb Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_rowStartEnd4.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeIndexWithoutTemplateTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeIndexWithoutTemplateTest.pdf new file mode 100644 index 000000000..6c4667c70 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeIndexWithoutTemplateTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartTest.pdf new file mode 100644 index 000000000..2c97dfd3d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartWithExplicitTemplatesTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartWithExplicitTemplatesTest.pdf new file mode 100644 index 000000000..2f97ac12d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartWithExplicitTemplatesTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartWithSingleTemplateTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartWithSingleTemplateTest.pdf new file mode 100644 index 000000000..68bef4efd Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartWithSingleTemplateTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartWithoutTemplatesTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartWithoutTemplatesTest.pdf new file mode 100644 index 000000000..c9858171e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartWithoutTemplatesTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartWithoutTemplatesTest2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartWithoutTemplatesTest2.pdf new file mode 100644 index 000000000..be65b5f9f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_spanToNegativeStartWithoutTemplatesTest2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoColumnSpans1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoColumnSpans1.pdf new file mode 100644 index 000000000..19e56155c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoColumnSpans1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoColumnSpans2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoColumnSpans2.pdf new file mode 100644 index 000000000..0b0bc88b7 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoColumnSpans2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoColumnSpans3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoColumnSpans3.pdf new file mode 100644 index 000000000..bceca41a6 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoColumnSpans3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoRowSpans1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoRowSpans1.pdf new file mode 100644 index 000000000..9606d943b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoRowSpans1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoRowSpans2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoRowSpans2.pdf new file mode 100644 index 000000000..fe812469d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoRowSpans2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoRowSpans3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoRowSpans3.pdf new file mode 100644 index 000000000..fea0b48c3 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/cmp_twoRowSpans3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd1.html new file mode 100644 index 000000000..6b6a5cfd2 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd1.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd2.html new file mode 100644 index 000000000..ed2228d15 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd2.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd3.html new file mode 100644 index 000000000..be4718f67 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd3.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd4.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd4.html new file mode 100644 index 000000000..620f5ba9f --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd4.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd5.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd5.html new file mode 100644 index 000000000..1c25d3c39 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/colStartEnd5.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/columnSpanExpandsStartToNegativeTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/columnSpanExpandsStartToNegativeTest.html new file mode 100644 index 000000000..47aabb945 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/columnSpanExpandsStartToNegativeTest.html @@ -0,0 +1,37 @@ + + + + + basic test #1 + + + +
+
One
+
Two
+
Three
+
Four
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement1.html new file mode 100644 index 000000000..5fa928703 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement1.html @@ -0,0 +1,42 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement2.html new file mode 100644 index 000000000..3478d857e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement2.html @@ -0,0 +1,42 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement3.html new file mode 100644 index 000000000..9bd13c0ee --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement3.html @@ -0,0 +1,43 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement4.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement4.html new file mode 100644 index 000000000..6d24b64cb --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement4.html @@ -0,0 +1,44 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement5.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement5.html new file mode 100644 index 000000000..02eac54b8 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement5.html @@ -0,0 +1,44 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement6.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement6.html new file mode 100644 index 000000000..4a5134997 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement6.html @@ -0,0 +1,49 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement7.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement7.html new file mode 100644 index 000000000..e40774790 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/fewCellsPlacement7.html @@ -0,0 +1,41 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeAndPositiveIndexShorthandTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeAndPositiveIndexShorthandTest.html new file mode 100644 index 000000000..2a28609d6 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeAndPositiveIndexShorthandTest.html @@ -0,0 +1,44 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
Ten
+
Eleven
+
Twelve
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeIndexOutOfTemplateTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeIndexOutOfTemplateTest.html new file mode 100644 index 000000000..e41c15fd0 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeIndexOutOfTemplateTest.html @@ -0,0 +1,61 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
Ten
+
Eleven
+
Twelve
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeIndexShorthandTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeIndexShorthandTest.html new file mode 100644 index 000000000..a3e2986c1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeIndexShorthandTest.html @@ -0,0 +1,43 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
Ten
+
Eleven
+
Twelve
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeIndexWithImplicitLinesTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeIndexWithImplicitLinesTest.html new file mode 100644 index 000000000..d78db7dd1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeIndexWithImplicitLinesTest.html @@ -0,0 +1,61 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
Ten
+
Eleven
+
Twelve
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeIndexWithoutTemplateTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeIndexWithoutTemplateTest.html new file mode 100644 index 000000000..9c6ac32b9 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/negativeIndexWithoutTemplateTest.html @@ -0,0 +1,65 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
Ten
+
Eleven
+
Twelve
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/noTemplate1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/noTemplate1.html new file mode 100644 index 000000000..86bf7df69 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/noTemplate1.html @@ -0,0 +1,36 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/noTemplate2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/noTemplate2.html new file mode 100644 index 000000000..286561397 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/noTemplate2.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/rowStartEnd1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/rowStartEnd1.html new file mode 100644 index 000000000..c3d6b8bf3 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/rowStartEnd1.html @@ -0,0 +1,38 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/rowStartEnd2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/rowStartEnd2.html new file mode 100644 index 000000000..132b3dda6 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/rowStartEnd2.html @@ -0,0 +1,38 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/rowStartEnd3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/rowStartEnd3.html new file mode 100644 index 000000000..5c9272f87 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/rowStartEnd3.html @@ -0,0 +1,38 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/rowStartEnd4.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/rowStartEnd4.html new file mode 100644 index 000000000..047ae516f --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/rowStartEnd4.html @@ -0,0 +1,38 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeIndexWithoutTemplateTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeIndexWithoutTemplateTest.html new file mode 100644 index 000000000..d3129c8d5 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeIndexWithoutTemplateTest.html @@ -0,0 +1,61 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
Ten
+
Eleven
+
Twelve
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartTest.html new file mode 100644 index 000000000..c11d49b6a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartTest.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartWithExplicitTemplatesTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartWithExplicitTemplatesTest.html new file mode 100644 index 000000000..bdd0974b9 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartWithExplicitTemplatesTest.html @@ -0,0 +1,38 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartWithSingleTemplateTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartWithSingleTemplateTest.html new file mode 100644 index 000000000..516e306d8 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartWithSingleTemplateTest.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartWithoutTemplatesTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartWithoutTemplatesTest.html new file mode 100644 index 000000000..cd81f95b7 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartWithoutTemplatesTest.html @@ -0,0 +1,36 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartWithoutTemplatesTest2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartWithoutTemplatesTest2.html new file mode 100644 index 000000000..2001b862d --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/spanToNegativeStartWithoutTemplatesTest2.html @@ -0,0 +1,36 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoColumnSpans1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoColumnSpans1.html new file mode 100644 index 000000000..07027d725 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoColumnSpans1.html @@ -0,0 +1,32 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoColumnSpans2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoColumnSpans2.html new file mode 100644 index 000000000..1e2a7157a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoColumnSpans2.html @@ -0,0 +1,32 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoColumnSpans3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoColumnSpans3.html new file mode 100644 index 000000000..d4e87ee65 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoColumnSpans3.html @@ -0,0 +1,32 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoRowSpans1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoRowSpans1.html new file mode 100644 index 000000000..8cbfc0f97 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoRowSpans1.html @@ -0,0 +1,32 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoRowSpans2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoRowSpans2.html new file mode 100644 index 000000000..77fecf49c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoRowSpans2.html @@ -0,0 +1,36 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoRowSpans3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoRowSpans3.html new file mode 100644 index 000000000..9eb753a07 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridItemPlacementTest/twoRowSpans3.html @@ -0,0 +1,36 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Siz
+
Seven
+
Eight
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_customIndentSpan.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_customIndentSpan.pdf new file mode 100644 index 000000000..4a045ef07 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_customIndentSpan.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_customIndentTrickySpan.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_customIndentTrickySpan.pdf new file mode 100644 index 000000000..23a94806e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_customIndentTrickySpan.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_duplicateLineNames.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_duplicateLineNames.pdf new file mode 100644 index 000000000..4642a90ea Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_duplicateLineNames.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameAutoRepeat.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameAutoRepeat.pdf new file mode 100644 index 000000000..36bb082cc Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameAutoRepeat.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameGridArea.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameGridArea.pdf new file mode 100644 index 000000000..9d1b09f3a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameGridArea.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameNth.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameNth.pdf new file mode 100644 index 000000000..a64bcd8f6 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameNth.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameRepeat.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameRepeat.pdf new file mode 100644 index 000000000..a7f698dff Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameRepeat.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameSpan.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameSpan.pdf new file mode 100644 index 000000000..365ed7b40 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenameSpan.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenamesCombined.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenamesCombined.pdf new file mode 100644 index 000000000..fed7657b1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_linenamesCombined.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_templateAreasNames.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_templateAreasNames.pdf new file mode 100644 index 000000000..527f9de32 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/cmp_templateAreasNames.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/customIndentSpan.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/customIndentSpan.html new file mode 100644 index 000000000..18187b761 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/customIndentSpan.html @@ -0,0 +1,56 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/customIndentTrickySpan.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/customIndentTrickySpan.html new file mode 100644 index 000000000..62c2017aa --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/customIndentTrickySpan.html @@ -0,0 +1,41 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/duplicateLineNames.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/duplicateLineNames.html new file mode 100644 index 000000000..51ad3dac3 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/duplicateLineNames.html @@ -0,0 +1,40 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameAutoRepeat.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameAutoRepeat.html new file mode 100644 index 000000000..8c7419297 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameAutoRepeat.html @@ -0,0 +1,41 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameGridArea.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameGridArea.html new file mode 100644 index 000000000..2808e4a29 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameGridArea.html @@ -0,0 +1,48 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameNth.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameNth.html new file mode 100644 index 000000000..ff085e257 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameNth.html @@ -0,0 +1,52 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameRepeat.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameRepeat.html new file mode 100644 index 000000000..dcdb682f3 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameRepeat.html @@ -0,0 +1,51 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameSpan.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameSpan.html new file mode 100644 index 000000000..57ddbeaaf --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenameSpan.html @@ -0,0 +1,46 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenamesCombined.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenamesCombined.html new file mode 100644 index 000000000..77656e659 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/linenamesCombined.html @@ -0,0 +1,51 @@ + + +CSS Grid Layout Test: Positioned grid items + + +
+
Header
+ +
Main area
+
Footer
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/templateAreasNames.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/templateAreasNames.html new file mode 100644 index 000000000..c2c645b0a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridLinenameTest/templateAreasNames.html @@ -0,0 +1,53 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis1.html new file mode 100644 index 000000000..903786e9b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis1.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis10.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis10.html new file mode 100644 index 000000000..261749856 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis10.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis11.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis11.html new file mode 100644 index 000000000..bd3cfd5c9 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis11.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis12.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis12.html new file mode 100644 index 000000000..f00dbaca5 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis12.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis13.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis13.html new file mode 100644 index 000000000..53a3ed282 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis13.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis14.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis14.html new file mode 100644 index 000000000..d2325f0b3 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis14.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis15.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis15.html new file mode 100644 index 000000000..b5e11ca04 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis15.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One One One One One One One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis16.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis16.html new file mode 100644 index 000000000..8e8fc3fd5 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis16.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One One One One One One One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis17.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis17.html new file mode 100644 index 000000000..7f1cbbe6a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis17.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One One One One One One One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis18.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis18.html new file mode 100644 index 000000000..b7455bea8 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis18.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One One One One One One One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis19.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis19.html new file mode 100644 index 000000000..79f6e4c3a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis19.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis2.html new file mode 100644 index 000000000..4617e8d7c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis2.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis20.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis20.html new file mode 100644 index 000000000..28430d10f --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis20.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis21.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis21.html new file mode 100644 index 000000000..d432545bb --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis21.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis3.html new file mode 100644 index 000000000..e3d1d4875 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis3.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis4.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis4.html new file mode 100644 index 000000000..f00dbaca5 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis4.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis5.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis5.html new file mode 100644 index 000000000..944bd3696 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis5.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis6.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis6.html new file mode 100644 index 000000000..a6e392c72 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis6.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis7.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis7.html new file mode 100644 index 000000000..4340ccd43 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis7.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis8.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis8.html new file mode 100644 index 000000000..608f813d4 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis8.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One One One One One One One One One One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis9.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis9.html new file mode 100644 index 000000000..9480807b4 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxis9.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr1.html new file mode 100644 index 000000000..59510385b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr1.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr2.html new file mode 100644 index 000000000..4fd9291b4 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr2.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr3.html new file mode 100644 index 000000000..da5d6d192 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr3.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr4.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr4.html new file mode 100644 index 000000000..c74d36ff3 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr4.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr5.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr5.html new file mode 100644 index 000000000..de6c76251 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr5.html @@ -0,0 +1,35 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr6.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr6.html new file mode 100644 index 000000000..ccd05c004 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/bothAxisOnlyFr6.html @@ -0,0 +1,35 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis1.pdf new file mode 100644 index 000000000..bed403672 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis10.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis10.pdf new file mode 100644 index 000000000..53c03777b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis10.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis11.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis11.pdf new file mode 100644 index 000000000..2cce383c0 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis11.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis12.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis12.pdf new file mode 100644 index 000000000..d1ede4321 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis12.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis13.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis13.pdf new file mode 100644 index 000000000..6775de7bc Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis13.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis14.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis14.pdf new file mode 100644 index 000000000..cb0604f0c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis14.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis15.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis15.pdf new file mode 100644 index 000000000..6f7fd238a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis15.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis16.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis16.pdf new file mode 100644 index 000000000..44c7d8dff Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis16.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis17.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis17.pdf new file mode 100644 index 000000000..72dd3c2c5 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis17.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis18.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis18.pdf new file mode 100644 index 000000000..e99bf0dd1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis18.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis19.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis19.pdf new file mode 100644 index 000000000..ccde8a206 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis19.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis2.pdf new file mode 100644 index 000000000..fb6067cb1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis20.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis20.pdf new file mode 100644 index 000000000..893e27a37 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis20.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis21.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis21.pdf new file mode 100644 index 000000000..cd629bcfa Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis21.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis3.pdf new file mode 100644 index 000000000..4e610d2ee Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis4.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis4.pdf new file mode 100644 index 000000000..756d0847a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis4.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis5.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis5.pdf new file mode 100644 index 000000000..209866a23 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis5.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis6.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis6.pdf new file mode 100644 index 000000000..e5eea1d60 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis6.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis7.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis7.pdf new file mode 100644 index 000000000..68572ef2c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis7.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis8.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis8.pdf new file mode 100644 index 000000000..4ff9654a2 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis8.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis9.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis9.pdf new file mode 100644 index 000000000..7fc7da544 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxis9.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr1.pdf new file mode 100644 index 000000000..d2963436c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr2.pdf new file mode 100644 index 000000000..764a0b9a6 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr3.pdf new file mode 100644 index 000000000..3a6489857 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr4.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr4.pdf new file mode 100644 index 000000000..d2a12ab51 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr4.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr5.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr5.pdf new file mode 100644 index 000000000..91d94d599 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr5.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr6.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr6.pdf new file mode 100644 index 000000000..b04540645 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_bothAxisOnlyFr6.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis1.pdf new file mode 100644 index 000000000..650478567 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis10.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis10.pdf new file mode 100644 index 000000000..bfad39217 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis10.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis11.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis11.pdf new file mode 100644 index 000000000..a0b01fb9f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis11.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis2.pdf new file mode 100644 index 000000000..83b13d08c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis3.pdf new file mode 100644 index 000000000..e5fb97623 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis4.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis4.pdf new file mode 100644 index 000000000..129332286 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis4.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis5.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis5.pdf new file mode 100644 index 000000000..70c75a377 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis5.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis6.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis6.pdf new file mode 100644 index 000000000..92b6a5b3e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis6.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis7.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis7.pdf new file mode 100644 index 000000000..7c97ef2b5 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis7.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis8.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis8.pdf new file mode 100644 index 000000000..bb45933e8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis8.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis9.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis9.pdf new file mode 100644 index 000000000..a0f77b920 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_colAxis9.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxAutoRepeat1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxAutoRepeat1.pdf new file mode 100644 index 000000000..b51dfabe8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxAutoRepeat1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxAutoRepeat2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxAutoRepeat2.pdf new file mode 100644 index 000000000..3fbf2c339 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxAutoRepeat2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxFitContent1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxFitContent1.pdf new file mode 100644 index 000000000..c857b62c4 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxFitContent1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxFitContent2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxFitContent2.pdf new file mode 100644 index 000000000..c61907123 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxFitContent2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxFitContentAutoRepeat1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxFitContentAutoRepeat1.pdf new file mode 100644 index 000000000..ef29df786 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxFitContentAutoRepeat1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxFitContentAutoRepeat2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxFitContentAutoRepeat2.pdf new file mode 100644 index 000000000..c522909b1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxFitContentAutoRepeat2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithBothAxisSpan1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithBothAxisSpan1.pdf new file mode 100644 index 000000000..0c391be53 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithBothAxisSpan1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithBothAxisSpan2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithBothAxisSpan2.pdf new file mode 100644 index 000000000..68a2a1260 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithBothAxisSpan2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithBothAxisSpan3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithBothAxisSpan3.pdf new file mode 100644 index 000000000..73a251fa8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithBothAxisSpan3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithContentAndFr.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithContentAndFr.pdf new file mode 100644 index 000000000..679f058f3 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithContentAndFr.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithSpan1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithSpan1.pdf new file mode 100644 index 000000000..a2202caea Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithSpan1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithSpan2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithSpan2.pdf new file mode 100644 index 000000000..d138bfd98 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithSpan2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithSpan3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithSpan3.pdf new file mode 100644 index 000000000..cf2c77604 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithSpan3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithSpan4.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithSpan4.pdf new file mode 100644 index 000000000..6e1c97985 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_minmaxWithSpan4.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis1.pdf new file mode 100644 index 000000000..55613a613 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis2.pdf new file mode 100644 index 000000000..c17637d81 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis3.pdf new file mode 100644 index 000000000..1b0b3187f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis4.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis4.pdf new file mode 100644 index 000000000..43be0acdf Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis4.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis5.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis5.pdf new file mode 100644 index 000000000..0ba643238 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis5.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis6.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis6.pdf new file mode 100644 index 000000000..e3d2fd3dd Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis6.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis7.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis7.pdf new file mode 100644 index 000000000..f94a57c52 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/cmp_rowAxis7.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis1.html new file mode 100644 index 000000000..070502d18 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis1.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis10.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis10.html new file mode 100644 index 000000000..96dd78964 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis10.html @@ -0,0 +1,34 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six
+
Seven
+
Eight
+
Nine Nine Nine Nine Nine Nine Nine Nine Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis11.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis11.html new file mode 100644 index 000000000..eb213debc --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis11.html @@ -0,0 +1,34 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six
+
Seven
+
Eight
+
Nine Nine Nine Nine Nine Nine Nine Nine Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis2.html new file mode 100644 index 000000000..840439990 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis2.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis3.html new file mode 100644 index 000000000..e5ea16732 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis3.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine Nine Nine NineNineNineNine Nine Nine Nine Nine Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis4.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis4.html new file mode 100644 index 000000000..0b69e4975 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis4.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine Nine Nine NineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNine Nine Nine Nine Nine Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis5.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis5.html new file mode 100644 index 000000000..af5f12592 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis5.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine Nine Nine NineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNine Nine Nine Nine Nine Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis6.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis6.html new file mode 100644 index 000000000..815e4ff73 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis6.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine Nine Nine NineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNineNine Nine Nine Nine Nine Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis7.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis7.html new file mode 100644 index 000000000..55e7b3f00 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis7.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six
+
Seven
+
Eight
+
Nine Nine Nine Nine Nine Nine Nine Nine Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis8.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis8.html new file mode 100644 index 000000000..b1ff3512c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis8.html @@ -0,0 +1,34 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six
+
Seven
+
Eight
+
Nine Nine Nine Nine Nine Nine Nine Nine Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis9.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis9.html new file mode 100644 index 000000000..f8cbdb72d --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/colAxis9.html @@ -0,0 +1,34 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six Six
+
Seven
+
Eight
+
Nine Nine Nine Nine Nine Nine Nine Nine Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxAutoRepeat1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxAutoRepeat1.html new file mode 100644 index 000000000..9eb3ef001 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxAutoRepeat1.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two Two Two
+
Three
+
Four Four Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxAutoRepeat2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxAutoRepeat2.html new file mode 100644 index 000000000..9eb3ef001 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxAutoRepeat2.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two Two Two
+
Three
+
Four Four Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxFitContent1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxFitContent1.html new file mode 100644 index 000000000..364971cea --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxFitContent1.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two Two Two
+
Three
+
Four Four Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxFitContent2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxFitContent2.html new file mode 100644 index 000000000..5051465ca --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxFitContent2.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two Two Two
+
Three
+
Four Four Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxFitContentAutoRepeat1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxFitContentAutoRepeat1.html new file mode 100644 index 000000000..7bc0e6f27 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxFitContentAutoRepeat1.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two Two Two
+
Three
+
Four Four Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxFitContentAutoRepeat2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxFitContentAutoRepeat2.html new file mode 100644 index 000000000..c6e784d66 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxFitContentAutoRepeat2.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two Two Two
+
Three
+
Four Four Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithBothAxisSpan1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithBothAxisSpan1.html new file mode 100644 index 000000000..c92aa3aad --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithBothAxisSpan1.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two Two Two
+
Three
+
Four Four Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithBothAxisSpan2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithBothAxisSpan2.html new file mode 100644 index 000000000..733f0db44 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithBothAxisSpan2.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two Two Two
+
Three
+
Four Four Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithBothAxisSpan3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithBothAxisSpan3.html new file mode 100644 index 000000000..5321eb326 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithBothAxisSpan3.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two Two Two
+
Three
+
Four Four Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithContentAndFr.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithContentAndFr.html new file mode 100644 index 000000000..8258b902c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithContentAndFr.html @@ -0,0 +1,30 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithSpan1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithSpan1.html new file mode 100644 index 000000000..c814b7376 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithSpan1.html @@ -0,0 +1,35 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithSpan2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithSpan2.html new file mode 100644 index 000000000..882800135 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithSpan2.html @@ -0,0 +1,35 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithSpan3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithSpan3.html new file mode 100644 index 000000000..7ce12b2b6 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithSpan3.html @@ -0,0 +1,35 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithSpan4.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithSpan4.html new file mode 100644 index 000000000..8704d0bda --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/minmaxWithSpan4.html @@ -0,0 +1,35 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis1.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis1.html new file mode 100644 index 000000000..caed41e4a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis1.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis2.html new file mode 100644 index 000000000..a1ea3da40 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis2.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis3.html new file mode 100644 index 000000000..cbfb07ded --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis3.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One One One One One One One One One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis4.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis4.html new file mode 100644 index 000000000..af69c74a2 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis4.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis5.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis5.html new file mode 100644 index 000000000..996e12bb5 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis5.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis6.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis6.html new file mode 100644 index 000000000..1b7c6ce55 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis6.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis7.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis7.html new file mode 100644 index 000000000..6b7c4f345 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridRelativeValuesTest/rowAxis7.html @@ -0,0 +1,34 @@ + + + + + + + +
+
One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/auto-cols-fixed.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/auto-cols-fixed.html new file mode 100644 index 000000000..041a1e364 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/auto-cols-fixed.html @@ -0,0 +1,32 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_auto-cols-fixed.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_auto-cols-fixed.pdf new file mode 100644 index 000000000..d1bdf5de4 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_auto-cols-fixed.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-borders.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-borders.pdf index 16361ef04..3ccd5f7e1 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-borders.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-borders.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-column-gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-column-gap.pdf index dd2599181..e21ed3e12 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-column-gap.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-column-gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-column-start-end.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-column-start-end.pdf index 03d600432..306a0199d 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-column-start-end.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-column-start-end.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-different-width-units.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-different-width-units.pdf index 049085859..d590d4094 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-different-width-units.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-different-width-units.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-enormous-size.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-enormous-size.pdf index 7209befdf..9e4758f11 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-enormous-size.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-enormous-size.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-fit-content-auto.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-fit-content-auto.pdf index c1befa55c..4e959baf4 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-fit-content-auto.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-fit-content-auto.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-fit-content.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-fit-content.pdf index 2d1fd6e21..80f8ac62f 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-fit-content.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-fit-content.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-fr.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-fr.pdf index eb10820e3..aa834ce18 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-fr.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-fr.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-grid-gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-grid-gap.pdf index f78d00bf4..87b82a248 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-grid-gap.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-grid-gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-height-width.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-height-width.pdf index 37bcff66a..20bcdd09e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-height-width.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-height-width.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-margin.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-margin.pdf index 0dec1d52c..08ccd6db5 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-margin.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-margin.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-minmax.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-minmax.pdf index 310d81e36..a54c9fa1a 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-minmax.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-minmax.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-mixed.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-mixed.pdf index f80305169..a0ad80c38 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-mixed.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-mixed.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-nested.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-nested.pdf index a2e265608..cd7dff502 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-nested.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-nested.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-padding.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-padding.pdf index 733fb278d..842436236 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-padding.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-padding.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-repeat-minmax.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-repeat-minmax.pdf index c023cd7cf..9e4a7f3af 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-repeat-minmax.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-repeat-minmax.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-repeat.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-repeat.pdf index f227631a7..124f0f429 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-repeat.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-repeat.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-with-flex-and-gaps.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-with-flex-and-gaps.pdf new file mode 100644 index 000000000..5c5fa012d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-with-flex-and-gaps.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-without-other-props-2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-without-other-props-2.pdf new file mode 100644 index 000000000..b5cb62907 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-without-other-props-2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-without-other-props.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-without-other-props.pdf index 8af7f9964..06e920bb3 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-without-other-props.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/cmp_template-cols-without-other-props.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/template-cols-grid-gap.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/template-cols-grid-gap.html index d4ed91138..58dc0c7ed 100644 --- a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/template-cols-grid-gap.html +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/template-cols-grid-gap.html @@ -5,7 +5,7 @@ .wrapper { display: grid; grid-template-columns: 50px 50px 50px 50px 50px; - grid-gap: 5px; + gap: 5px; } .wrapper > div { diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/template-cols-minmax.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/template-cols-minmax.html index a9fd734e7..e5dbefd82 100644 --- a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/template-cols-minmax.html +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/template-cols-minmax.html @@ -4,7 +4,7 @@ + + +
+ +
+
+ Bugfixes, finalize grid track sizing algorithm, add minmax support +
+
+ Support linenames +
+
+ Adding proper margins/paddings/borders support +
+
+ Adding grid shorthands support +
+
+ Adding proper margin collapsing support +
+
+
+ + + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/template-cols-without-other-props-2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/template-cols-without-other-props-2.html new file mode 100644 index 000000000..0c18d0d5a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateColumnTest/template-cols-without-other-props-2.html @@ -0,0 +1,33 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-borders.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-borders.pdf index c2a9d987b..ac78f7551 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-borders.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-borders.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-grid-row-col-gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-grid-row-col-gap.pdf index d07b1cd95..bd677facf 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-grid-row-col-gap.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-grid-row-col-gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-grid-start-end.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-grid-start-end.pdf index 0bf16b228..ef2191897 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-grid-start-end.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-grid-start-end.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-margins-paddings.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-margins-paddings.pdf index b91ae9d0d..1e34aee73 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-margins-paddings.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-margins-paddings.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-minmax.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-minmax.pdf index 7753bf254..d12d03139 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-minmax.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-minmax.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-mixed.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-mixed.pdf index 87d06b32a..7bdb19410 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-mixed.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-mixed.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-multipage.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-multipage.pdf index 3f96a8d8a..08412d6c1 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-multipage.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-multipage.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-nested.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-nested.pdf index af214b411..d61b66ae0 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-nested.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-nested.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-repeat-minmax.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-repeat-minmax.pdf index ef4cb274b..88754ac01 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-repeat-minmax.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-repeat-minmax.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-rows-auto.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-rows-auto.pdf index 6853cba6f..718458bd8 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-rows-auto.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-rows-auto.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-rows-fit-content-auto.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-rows-fit-content-auto.pdf index 5ea0af90e..1821a9392 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-rows-fit-content-auto.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-rows-fit-content-auto.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-without-other-props.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-without-other-props.pdf index d93467992..6c7e2b7ed 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-without-other-props.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/cmp_template-combined-without-other-props.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/template-combined-grid-row-col-gap.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/template-combined-grid-row-col-gap.html index fbab9b217..f01307ddb 100644 --- a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/template-combined-grid-row-col-gap.html +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/template-combined-grid-row-col-gap.html @@ -8,9 +8,9 @@ grid-template-rows: 250px 50px 50px; } - .wrapper { - grid-gap: 5px; - } + .wrapper { + gap: 5px; + } .wrapper > div, .wrapper2 > div { border: 2px solid darkblue; @@ -18,9 +18,9 @@ } .wrapper2 { - column-gap: 10px; - row-gap: 3px; - } + column-gap: 10px; + row-gap: 3px; + } diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/template-combined-grid-start-end.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/template-combined-grid-start-end.html index e30e01fcc..24e8bd7af 100644 --- a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/template-combined-grid-start-end.html +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/template-combined-grid-start-end.html @@ -6,7 +6,7 @@ display: grid; grid-template-columns: 100px 150px; grid-template-rows: 50px 50px 50px; - grid-gap: 5px; + gap: 5px; } .wrapper > div { diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/template-combined-minmax.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/template-combined-minmax.html index 0d4f542fd..785c60f21 100644 --- a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/template-combined-minmax.html +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateCombinedTest/template-combined-minmax.html @@ -4,8 +4,8 @@ + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/basic_absolute_position.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/basic_absolute_position.html new file mode 100644 index 000000000..84853ecc1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/basic_absolute_position.html @@ -0,0 +1,37 @@ + + + + + + + +
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+ +
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/basic_border.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/basic_border.html new file mode 100644 index 000000000..33802ceb7 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/basic_border.html @@ -0,0 +1,35 @@ + + + + + + + +
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+ +
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/border_big.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/border_big.html new file mode 100644 index 000000000..b053a324b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/border_big.html @@ -0,0 +1,126 @@ + + + + + + + +
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/border_big_with_overflow_x.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/border_big_with_overflow_x.html new file mode 100644 index 000000000..e32a75422 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/border_big_with_overflow_x.html @@ -0,0 +1,126 @@ + + + + + + + +
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_backgroundItemsOnTopOfBackgroundGrid.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_backgroundItemsOnTopOfBackgroundGrid.pdf new file mode 100644 index 000000000..6c905c2c1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_backgroundItemsOnTopOfBackgroundGrid.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_basic_border.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_basic_border.pdf new file mode 100644 index 000000000..5d4f00689 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_basic_border.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_border_big.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_border_big.pdf new file mode 100644 index 000000000..3c926a49a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_border_big.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_border_big_with_overflow_x.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_border_big_with_overflow_x.pdf new file mode 100644 index 000000000..b492770e1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_border_big_with_overflow_x.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_margin_all.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_margin_all.pdf new file mode 100644 index 000000000..987449d4e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_margin_all.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_margin_all_empty.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_margin_all_empty.pdf new file mode 100644 index 000000000..004132618 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_margin_all_empty.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_margin_all_with_empty_div.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_margin_all_with_empty_div.pdf new file mode 100644 index 000000000..ec8427685 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_margin_all_with_empty_div.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_paddingAll.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_paddingAll.pdf new file mode 100644 index 000000000..7e4e8a049 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_paddingAll.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_paddingAllToBigForWidth.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_paddingAllToBigForWidth.pdf new file mode 100644 index 000000000..0ec07d29f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_paddingAllToBigForWidth.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_padding_all_with_empty_div.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_padding_all_with_empty_div.pdf new file mode 100644 index 000000000..5548252eb Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_padding_all_with_empty_div.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_padding_overflow_x.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_padding_overflow_x.pdf new file mode 100644 index 000000000..e02f0bf02 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/cmp_padding_overflow_x.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/margin_all.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/margin_all.html new file mode 100644 index 000000000..be8848ad3 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/margin_all.html @@ -0,0 +1,27 @@ + + + + + + + +

+ top +

+
+

cell 1

+

cell 2

+

cell 3

+
+

+ top +

+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/margin_all_empty.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/margin_all_empty.html new file mode 100644 index 000000000..5a69525e1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/margin_all_empty.html @@ -0,0 +1,26 @@ + + + + + + + +

+ top +

+
+ +
+

+ top +

+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/margin_all_with_empty_div.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/margin_all_with_empty_div.html new file mode 100644 index 000000000..4248f61b8 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/margin_all_with_empty_div.html @@ -0,0 +1,28 @@ + + + + + + + +

+ top +

+
+
+
+
+
+

+ top +

+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/multiPagePadding.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/multiPagePadding.html new file mode 100644 index 000000000..502aad0f1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/multiPagePadding.html @@ -0,0 +1,172 @@ + + + + + + + +
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+ +
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/paddingAll.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/paddingAll.html new file mode 100644 index 000000000..c62fcb3f7 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/paddingAll.html @@ -0,0 +1,35 @@ + + + + + + + +
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+ +
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/paddingAllToBigForWidth.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/paddingAllToBigForWidth.html new file mode 100644 index 000000000..f1421ad58 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/paddingAllToBigForWidth.html @@ -0,0 +1,35 @@ + + + + + + + +
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+ +
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/padding_all_with_empty_div.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/padding_all_with_empty_div.html new file mode 100644 index 000000000..629e6b177 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/padding_all_with_empty_div.html @@ -0,0 +1,30 @@ + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/padding_overflow_x.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/padding_overflow_x.html new file mode 100644 index 000000000..247281747 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateElementPropertyContainerTest/padding_overflow_x.html @@ -0,0 +1,35 @@ + + + + + + + +
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+
item
+ +
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-2-levels-areas.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-2-levels-areas.pdf new file mode 100644 index 000000000..4fb09cd35 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-2-levels-areas.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-3-forms.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-3-forms.pdf new file mode 100644 index 000000000..979091146 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-3-forms.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-3-levels-multiple.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-3-levels-multiple.pdf new file mode 100644 index 000000000..da72a159e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-3-levels-multiple.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-3-levels-tables.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-3-levels-tables.pdf new file mode 100644 index 000000000..768736c61 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-3-levels-tables.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-3-levels.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-3-levels.pdf new file mode 100644 index 000000000..2d15faed5 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-3-levels.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-areas-with-border.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-areas-with-border.pdf new file mode 100644 index 000000000..1591e82e0 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-areas-with-border.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-areas.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-areas.pdf new file mode 100644 index 000000000..ee8aea54b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-areas.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-articles.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-articles.pdf new file mode 100644 index 000000000..7c7d93993 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-articles.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-forms.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-forms.pdf new file mode 100644 index 000000000..f2956ec27 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-forms.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-grid.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-grid.pdf new file mode 100644 index 000000000..4536aeaa8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-grid.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-images.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-images.pdf new file mode 100644 index 000000000..a864ae77a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-images.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-lists-odd-even.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-lists-odd-even.pdf new file mode 100644 index 000000000..1d1d155e1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-lists-odd-even.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-lists.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-lists.pdf new file mode 100644 index 000000000..763a844f1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-lists.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-mixed-content.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-mixed-content.pdf new file mode 100644 index 000000000..f46ba21e4 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-mixed-content.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-paragraphs.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-paragraphs.pdf new file mode 100644 index 000000000..24a70fb9c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-paragraphs.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-table-nested-grid.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-table-nested-grid.pdf new file mode 100644 index 000000000..c208e2287 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-table-nested-grid.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-table-with-mixed-content.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-table-with-mixed-content.pdf new file mode 100644 index 000000000..53c84ff1a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-table-with-mixed-content.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-table.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-table.pdf new file mode 100644 index 000000000..f1d7cf0f2 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/cmp_grid-nested-table.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-2-levels-areas.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-2-levels-areas.html new file mode 100644 index 000000000..9648c4e17 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-2-levels-areas.html @@ -0,0 +1,98 @@ + + + + + + + +
+
L1: 1
+
L1: 2
+
+ L1: 3 +
+
L2: 1
+
+ L2: 2 +
+

Header text

+ +
Main content
+
Footer text
+
+
+
L2: 3
+
+
+
L1: 4
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-3-forms.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-3-forms.html new file mode 100644 index 000000000..13199f5d3 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-3-forms.html @@ -0,0 +1,108 @@ + + + + + + + +
+
Level 1: 1
+
Level 1: 2
+
+ Level 1:3 +
+
Level 2: 1
+
+ Level 2: 2 +
+
Level 3: 1
+
+
+
+
+
+
Level 3: 2
+
Level 3: 3
+

Favorite season?

+
+ +
+ +
+ +
+ +
+
+
+
Level 3: 4
+
+
+
Level 2: 3
+
+ +
+
+
+
+
Level 1:4
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-3-levels-multiple.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-3-levels-multiple.html new file mode 100644 index 000000000..f64623006 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-3-levels-multiple.html @@ -0,0 +1,105 @@ + + + + + + + +
+
Level 1: 1
+
Level 1: 2
+
+
Level 2: 1
+
+ Level 2: 2 +
+
Level 2: 3
+
+
+
+ Level 1:3 +

Hi! Here is a random link that will lead you nowhere.

+

A title that won't give away anything

+
+
Level 2: 1
+
+ Level 2: 2 +
+
Level 2: 3
+
Level 2: 4
+
+
+
Level 1:4
+
Level 1:5
+
+
Level 3: 1
+
Level 3: 2
+
Level 3: 3
+
Level 3: 4
+
Level 3: 5
+
Level 3: 7
+
Level 3: 8
+
+
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-3-levels-tables.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-3-levels-tables.html new file mode 100644 index 000000000..9cd444157 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-3-levels-tables.html @@ -0,0 +1,111 @@ + + + + + + + +
+
Level 1: 1
+
Level 1: 2
+
+ Level 1:3 +
+
Level 2: 1
+
+ Level 2: 2 + + + + + + + + + + + + + + + + + +
H1H2
+
+
1
+
2
+
3
+
4
+
+
R1C2
R2C1R2C2
+
+
Level 2: 3
+
+
+
Level 1:4
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-3-levels.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-3-levels.html new file mode 100644 index 000000000..391c300a3 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-3-levels.html @@ -0,0 +1,82 @@ + + + + + + + +
+
Level 1: 1
+
Level 1: 2
+
+ Level 1:3 +
+
Level 2: 1
+
+ Level 2: 2 +
+
Level 3: 1
+
Level 3: 2
+
Level 3: 3
+
Level 3: 4
+
Level 3: 5
+
+
+
Level 2: 3
+
+
+
Level 1:4
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-areas-with-border.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-areas-with-border.html new file mode 100644 index 000000000..1641de76e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-areas-with-border.html @@ -0,0 +1,82 @@ + + + + + + + +
+
L 1: 1
+
L 1: 2 +
+

Header text

+ +
Main content
+
Footer text
+
+
+
+ L 1:3 +
+
L 1:4
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-areas.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-areas.html new file mode 100644 index 000000000..a94d82b56 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-areas.html @@ -0,0 +1,81 @@ + + + + + + + +
+
L 1: 1
+
L 1: 2 +
+

Header text

+ +
Main content
+
Footer text
+
+
+
+ L 1:3 +
+
L 1:4
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-articles.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-articles.html new file mode 100644 index 000000000..7748c783e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-articles.html @@ -0,0 +1,50 @@ + + + + + + +
+
+
+

Lorem Ipsum p1

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean magna ante, viverra in auctor eget, semper ac nisl.

+
+
+
+
+

Lorem Ipsum p2

+

Praesent ut euismod dui. Morbi vel aliquet dolor, nec vestibulum magna. Sed euismod libero at nulla pulvinar, quis blandit est cursus. Nullam gravida sit amet metus eu varius. Praesent at tortor sed lorem imperdiet cursus. Quisque aliquam pretium lacus quis tincidunt. Aliquam vel libero egestas, mollis ligula ut, sollicitudin mi.

+
+
+
+
+

Lorem Ipsum p3

+

Suspendisse et neque id mi mattis dignissim. Vivamus laoreet est a dolor dignissim blandit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam eget tellus in enim mattis iaculis.

+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-forms.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-forms.html new file mode 100644 index 000000000..5f05ef234 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-forms.html @@ -0,0 +1,83 @@ + + + + + + Grid Layout with Nested Form + + + +
+
1
+
2
+
3
+ +
+ + +
+
+ +
+
+
+
+ + + + + + + +
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-grid.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-grid.html new file mode 100644 index 000000000..cd64f267e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-grid.html @@ -0,0 +1,81 @@ + + + + + + +
+
+
+
1
+
2
+
3
+
4
+
+
+
Lonely 2
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
+
+
+
+
1
+
2
+
3
+
4
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-images.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-images.html new file mode 100644 index 000000000..d6953482c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-images.html @@ -0,0 +1,51 @@ + + + + + + +
+
+

jpg

+ Star +
+
+

png

+ Pentagon +
+
+

bmp

+ Circle +
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-lists-odd-even.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-lists-odd-even.html new file mode 100644 index 000000000..1cb831250 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-lists-odd-even.html @@ -0,0 +1,90 @@ + + + + + + +
+
+

Ordered List

+
    +
  1. Ordered1
  2. +
  3. Ordered2
  4. +
  5. Ordered3
  6. +
  7. Ordered4
  8. +
  9. Ordered5
  10. +
+
+
+

Unordered List

+
    +
  • Unordered1
  • +
  • Unordered2
  • +
  • Unordered3
  • +
  • Unordered4
  • +
  • Unordered5
  • +
  • Unordered6
  • +
  • Unordered7
  • +
  • Unordered8
  • +
+
+
+

Ordered List

+
    +
  1. Ordered1
  2. +
  3. Ordered2
  4. +
  5. Ordered3
  6. +
  7. Ordered4
  8. +
  9. Ordered5
  10. +
+
+
+

Unordered List

+
    +
  • Unordered1
  • +
  • Unordered2
  • +
  • Unordered3
  • +
  • Unordered4
  • +
  • Unordered5
  • +
  • Unordered6
  • +
  • Unordered7
  • +
  • Unordered8
  • +
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-lists.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-lists.html new file mode 100644 index 000000000..ae4f6597a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-lists.html @@ -0,0 +1,85 @@ + + + + + + +
+
+

Ordered List

+
    +
  1. Ordered1
  2. +
  3. Ordered2
  4. +
  5. Ordered3
  6. +
  7. Ordered4
  8. +
  9. Ordered5
  10. +
+
+
+

Unordered List

+
    +
  • Unordered1
  • +
  • Unordered2
  • +
  • Unordered3
  • +
  • Unordered4
  • +
  • Unordered5
  • +
  • Unordered6
  • +
  • Unordered7
  • +
  • Unordered8
  • +
+
+
+

Ordered List

+
    +
  1. Ordered1
  2. +
  3. Ordered2
  4. +
  5. Ordered3
  6. +
  7. Ordered4
  8. +
  9. Ordered5
  10. +
+
+
+

Unordered List

+
    +
  • Unordered1
  • +
  • Unordered2
  • +
  • Unordered3
  • +
  • Unordered4
  • +
  • Unordered5
  • +
  • Unordered6
  • +
  • Unordered7
  • +
  • Unordered8
  • +
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-mixed-content.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-mixed-content.html new file mode 100644 index 000000000..6217dee4a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-mixed-content.html @@ -0,0 +1,111 @@ + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
Header 1Header 2Header 3
Input 1Input 2Input 3
Input 4Input 5Input 6
+
+
+
    +
  • Item 1
  • +
  • Item 2
  • +
  • Item 3
  • +
+
+
+
+ +
+ +
+ +
+
+
+
+ Nested Div Text +
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-paragraphs.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-paragraphs.html new file mode 100644 index 000000000..dd81dd0be --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-paragraphs.html @@ -0,0 +1,60 @@ + + + + + + +
+
+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean magna ante, viverra in auctor eget, semper ac nisl. +

+ Praesent ut euismod dui. Morbi vel aliquet dolor, nec vestibulum magna. Sed euismod libero at nulla pulvinar, quis blandit est cursus. Nullam gravida sit amet metus eu varius. Praesent at tortor sed lorem imperdiet cursus. Quisque aliquam pretium lacus quis tincidunt. Aliquam vel libero egestas, mollis ligula ut, sollicitudin mi. +

+ Suspendisse et neque id mi mattis dignissim. Vivamus laoreet est a dolor dignissim blandit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam eget tellus in enim mattis iaculis. +

+

+

+
+
+

2nd elem

+
+
+

3rd elem

+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-table-nested-grid.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-table-nested-grid.html new file mode 100644 index 000000000..ecf7c0b57 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-table-nested-grid.html @@ -0,0 +1,85 @@ + + + + + + +
+
1
+
+ + + + + + + + + + + + + + + + + +
H1H2
+
+
1
+
2
+
3
+
4
+
+
R1C2
R2C1R2C2
+
+
3
+
4
+
5
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-table-with-mixed-content.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-table-with-mixed-content.html new file mode 100644 index 000000000..d3a15aa8c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-table-with-mixed-content.html @@ -0,0 +1,122 @@ + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
H1H2H3
+
    +
  1. Ordered1
  2. +
  3. Ordered2
  4. +
  5. Ordered3
  6. +
  7. Ordered4
  8. +
  9. Ordered5
  10. +
+
+
+ +
+ +
+ +
+
+
+

Article Title

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean magna ante, viverra in auctor eget, semper ac nisl.

+
+
+ + +
    +
  • List item
  • +
  • List item
  • +
  • List item
  • +
  • List item
  • +
  • List item
  • +
+
+
+ Text nested div +
+
+
+
+ L1:2 +
+
+ L1:3 +
+
+ L1:4 +
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-table.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-table.html new file mode 100644 index 000000000..6410365fe --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/grid-nested-table.html @@ -0,0 +1,80 @@ + + + + + + +
+
+

1

+
+
+ + + + + + + + + + + + + + + + + + + + +
H1H2H3
+

Row 1 Col 1

+
+

Row 1 Col 2

+
+

Row 1 Col 3

+
+

Row 2 Col 1

+
+

Row 2 Col 2

+
+

Row 2 Col 3

+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/test-bmp.bmp b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/test-bmp.bmp new file mode 100644 index 000000000..6a249aed3 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/test-bmp.bmp differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/test-jpg.jpg b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/test-jpg.jpg new file mode 100644 index 000000000..c777a1e86 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/test-jpg.jpg differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/test-png.png b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/test-png.png new file mode 100644 index 000000000..e8422f8b8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateNestedTest/test-png.png differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/auto-rows-fixed.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/auto-rows-fixed.html new file mode 100644 index 000000000..5d364ae93 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/auto-rows-fixed.html @@ -0,0 +1,27 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_auto-rows-fixed.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_auto-rows-fixed.pdf new file mode 100644 index 000000000..58d5a20fa Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_auto-rows-fixed.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_row-fit-content-percent.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_row-fit-content-percent.pdf new file mode 100644 index 000000000..d9bc8513b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_row-fit-content-percent.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-auto.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-auto.pdf index 3428f48f3..cd2d5f284 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-auto.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-auto.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-borders.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-borders.pdf index e91b84714..e4bb561a6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-borders.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-borders.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-different-width-units.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-different-width-units.pdf index 941e063db..d1c1f9852 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-different-width-units.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-different-width-units.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-fit-content-auto.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-fit-content-auto.pdf index 9c31c5430..3b36b94e3 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-fit-content-auto.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-fit-content-auto.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-fit-content.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-fit-content.pdf index 91116d54f..d1bac77ac 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-fit-content.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-fit-content.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-fr.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-fr.pdf index 34edcad0e..b157e00af 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-fr.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-fr.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-grid-gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-grid-gap.pdf index bc589bc01..1e8cc7f3e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-grid-gap.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-grid-gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-height-width.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-height-width.pdf index fb46eef08..dafaa8ec6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-height-width.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-height-width.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-margin.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-margin.pdf index 54c2f4ef2..a24206eb0 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-margin.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-margin.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-minmax.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-minmax.pdf index 94ef42ed9..389d094b5 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-minmax.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-minmax.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-mixed.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-mixed.pdf index 389b9fb78..4bbee49bf 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-mixed.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-mixed.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-multipage.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-multipage.pdf index 737f86019..ba8218a7f 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-multipage.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-multipage.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-nested.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-nested.pdf index 824b589e3..ebb2d5589 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-nested.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-nested.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-padding.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-padding.pdf index 5fea57ad6..2ffec03c0 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-padding.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-padding.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-repeat-minmax.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-repeat-minmax.pdf index 7ee8de464..3fa156deb 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-repeat-minmax.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-repeat-minmax.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-repeat.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-repeat.pdf index 70cd2816a..00ceaec62 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-repeat.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-repeat.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-row-gap.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-row-gap.pdf index 6bb8575b4..f58a42a41 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-row-gap.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-row-gap.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-start-end.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-start-end.pdf index dd779ec49..568506b69 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-start-end.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-start-end.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-without-other-props.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-without-other-props.pdf index 4277fcce5..ba67f452e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-without-other-props.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/cmp_template-rows-without-other-props.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/row-fit-content-percent.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/row-fit-content-percent.html new file mode 100644 index 000000000..6f5b0bcac --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/row-fit-content-percent.html @@ -0,0 +1,29 @@ + + + + + + + +
+
One One One One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/template-rows-grid-gap.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/template-rows-grid-gap.html index 55f95cad4..bb640a81a 100644 --- a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/template-rows-grid-gap.html +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplateRowTest/template-rows-grid-gap.html @@ -5,7 +5,7 @@ .wrapper { display: grid; grid-template-rows: 50px 50px 50px 50px 50px; - grid-gap: 5px; + gap: 5px; } .wrapper > div { diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFillRepeatWithFlexMinMaxTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFillRepeatWithFlexMinMaxTest.html new file mode 100644 index 000000000..a175d2409 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFillRepeatWithFlexMinMaxTest.html @@ -0,0 +1,30 @@ + + + + + + +
+
One One One
+
Two Two Two
+
Three Three Three
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFillRepeatWithGapsTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFillRepeatWithGapsTest.html new file mode 100644 index 000000000..5277e5637 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFillRepeatWithGapsTest.html @@ -0,0 +1,36 @@ + + + + + + +
+
One One One
+
Two Two Two
+
Three Three Three
+
Four Four Four
+
Five Five Five
+
Six Six Six
+
Seven Seven Seven
+
Eight Eight Eight
+
Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFillWithDefiniteMinMaxTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFillWithDefiniteMinMaxTest.html new file mode 100644 index 000000000..361066b1a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFillWithDefiniteMinMaxTest.html @@ -0,0 +1,37 @@ + + + + + + +
+
One One One
+
Two Two Two
+
Three Three Three
+
Four Four Four
+
Five Five Five
+
Six Six Six
+
Seven Seven Seven
+
Eight Eight Eight
+
Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFillWithIndefiniteMinMaxTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFillWithIndefiniteMinMaxTest.html new file mode 100644 index 000000000..28dcd46e0 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFillWithIndefiniteMinMaxTest.html @@ -0,0 +1,38 @@ + + + + + + +
+
One One One
+
Two Two Two
+
Three Three Three
+
Four Four Four
+
Five Five Five
+
Six Six Six
+
Seven Seven Seven
+
Eight Eight Eight
+
Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitOnIntrinsicAreaTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitOnIntrinsicAreaTest.html new file mode 100644 index 000000000..459124f60 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitOnIntrinsicAreaTest.html @@ -0,0 +1,35 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Fiv
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitOnIntrinsicAreaWithLargeBorderTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitOnIntrinsicAreaWithLargeBorderTest.html new file mode 100644 index 000000000..72ef7285e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitOnIntrinsicAreaWithLargeBorderTest.html @@ -0,0 +1,61 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Fiv
+
+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim + veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. +

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitOnIntrinsicAreaWithLargeMarginPaddingTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitOnIntrinsicAreaWithLargeMarginPaddingTest.html new file mode 100644 index 000000000..a110df7f1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitOnIntrinsicAreaWithLargeMarginPaddingTest.html @@ -0,0 +1,36 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Fiv
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitRepeatWithFlexMinMaxTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitRepeatWithFlexMinMaxTest.html new file mode 100644 index 000000000..712aec8d4 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitRepeatWithFlexMinMaxTest.html @@ -0,0 +1,30 @@ + + + + + + +
+
One One One
+
Two Two Two
+
Three Three Three
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitWithGapsTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitWithGapsTest.html new file mode 100644 index 000000000..1949f99a9 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitWithGapsTest.html @@ -0,0 +1,35 @@ + + + + + + +
+
Oneoneone one one one
+
TwoTwoTwo Two Two Two Two
+
Three
+
Four Four Four Four
+
Fiv Fiv Fiv Fiv Fiv Fiv
+
Six
+
Seven Seven Seven Seven Seven Seven
+
Eight
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitWithLargeBorderTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitWithLargeBorderTest.html new file mode 100644 index 000000000..238cb9297 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitWithLargeBorderTest.html @@ -0,0 +1,61 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Fiv
+
+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim + veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. +

+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitWithSingleCellTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitWithSingleCellTest.html new file mode 100644 index 000000000..b52dd9b2f --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoFitWithSingleCellTest.html @@ -0,0 +1,28 @@ + + + + + + +
+
One
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoRepeatOnIntrinsicAreaTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoRepeatOnIntrinsicAreaTest.html new file mode 100644 index 000000000..4aa3e8b88 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoRepeatOnIntrinsicAreaTest.html @@ -0,0 +1,31 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Fiv
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoRepeatWithFitContentTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoRepeatWithFitContentTest.html new file mode 100644 index 000000000..6186454d8 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoRepeatWithFitContentTest.html @@ -0,0 +1,31 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Fiv
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoRepeatWithIntrinsicArgumentTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoRepeatWithIntrinsicArgumentTest.html new file mode 100644 index 000000000..6fbc6b02e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoRepeatWithIntrinsicArgumentTest.html @@ -0,0 +1,31 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Fiv
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoRepeatWithLeadingMaxContentTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoRepeatWithLeadingMaxContentTest.html new file mode 100644 index 000000000..7b5602cc9 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/autoRepeatWithLeadingMaxContentTest.html @@ -0,0 +1,34 @@ + + + + + + +
+
Oneoneone one one one
+
TwoTwoTwo Two Two Two Two
+
Three
+
Four Four Four Four
+
Fiv Fiv Fiv Fiv Fiv Fiv
+
Six
+
Seven Seven Seven Seven Seven Seven
+
Eight
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnDenseFlowTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnDenseFlowTest.html new file mode 100644 index 000000000..69881108e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnDenseFlowTest.html @@ -0,0 +1,47 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFewDivs2Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFewDivs2Test.html new file mode 100644 index 000000000..0df768476 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFewDivs2Test.html @@ -0,0 +1,32 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFewDivsTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFewDivsTest.html new file mode 100644 index 000000000..2f6960678 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFewDivsTest.html @@ -0,0 +1,32 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFewDivsWithDisabledGridLayoutTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFewDivsWithDisabledGridLayoutTest.html new file mode 100644 index 000000000..2f6960678 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFewDivsWithDisabledGridLayoutTest.html @@ -0,0 +1,32 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFewDivsWithFrTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFewDivsWithFrTest.html new file mode 100644 index 000000000..03db59513 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFewDivsWithFrTest.html @@ -0,0 +1,32 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFlowTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFlowTest.html new file mode 100644 index 000000000..a9a3d975e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnFlowTest.html @@ -0,0 +1,47 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnMultiPageTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnMultiPageTest.html new file mode 100644 index 000000000..9b01efdb4 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnMultiPageTest.html @@ -0,0 +1,33 @@ + + + + + + + +
+
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnOneDivTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnOneDivTest.html new file mode 100644 index 000000000..33b4eb5fe --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnOneDivTest.html @@ -0,0 +1,34 @@ + + + + + + + +
+
+
One
+
Two
+
Three
+
Four
+
Five
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowFewDivs1Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowFewDivs1Test.html new file mode 100644 index 000000000..c0d9e3f5b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowFewDivs1Test.html @@ -0,0 +1,33 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowFewDivs2Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowFewDivs2Test.html new file mode 100644 index 000000000..e1682b1c4 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowFewDivs2Test.html @@ -0,0 +1,33 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowFewDivs3Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowFewDivs3Test.html new file mode 100644 index 000000000..fc02b931d --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowFewDivs3Test.html @@ -0,0 +1,33 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowFewDivs4Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowFewDivs4Test.html new file mode 100644 index 000000000..b9bf3ab23 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowFewDivs4Test.html @@ -0,0 +1,38 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
Ten
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd10Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd10Test.html new file mode 100644 index 000000000..caac9ef8e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd10Test.html @@ -0,0 +1,39 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd11Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd11Test.html new file mode 100644 index 000000000..b55768f38 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd11Test.html @@ -0,0 +1,50 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+ + + + + + +
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd12Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd12Test.html new file mode 100644 index 000000000..8212e9c96 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd12Test.html @@ -0,0 +1,51 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd13Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd13Test.html new file mode 100644 index 000000000..3face4407 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd13Test.html @@ -0,0 +1,39 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd14Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd14Test.html new file mode 100644 index 000000000..6a44200c5 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd14Test.html @@ -0,0 +1,38 @@ + + + + + + + + +
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd15Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd15Test.html new file mode 100644 index 000000000..78da40c98 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd15Test.html @@ -0,0 +1,40 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd16Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd16Test.html new file mode 100644 index 000000000..d12f9aae4 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd16Test.html @@ -0,0 +1,39 @@ + + + + + + +
+
One
+
Two
+
Three
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd17Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd17Test.html new file mode 100644 index 000000000..ba845d248 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd17Test.html @@ -0,0 +1,65 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+ +
One
+
One
+
One
+
One
+
One
+
One
+
One
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd18Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd18Test.html new file mode 100644 index 000000000..40bac8e81 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd18Test.html @@ -0,0 +1,39 @@ + + + + + + +
+
One One One One One One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd19Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd19Test.html new file mode 100644 index 000000000..c0cee8e86 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd19Test.html @@ -0,0 +1,43 @@ + + + + + + +
+
One
+
Two
+
two.5
+
Three
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd1Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd1Test.html new file mode 100644 index 000000000..bf61d1131 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd1Test.html @@ -0,0 +1,66 @@ + + + + + basic test #1 + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd2Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd2Test.html new file mode 100644 index 000000000..d6b6be546 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd2Test.html @@ -0,0 +1,43 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd3Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd3Test.html new file mode 100644 index 000000000..297cf181d --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd3Test.html @@ -0,0 +1,39 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd4Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd4Test.html new file mode 100644 index 000000000..4ccc1b354 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd4Test.html @@ -0,0 +1,37 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd5Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd5Test.html new file mode 100644 index 000000000..96e1e946a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd5Test.html @@ -0,0 +1,40 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd6Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd6Test.html new file mode 100644 index 000000000..2c4cacbaf --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd6Test.html @@ -0,0 +1,44 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd7Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd7Test.html new file mode 100644 index 000000000..31b5b5027 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd7Test.html @@ -0,0 +1,40 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd8Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd8Test.html new file mode 100644 index 000000000..b4790cb4e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd8Test.html @@ -0,0 +1,39 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd9Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd9Test.html new file mode 100644 index 000000000..14726183a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEnd9Test.html @@ -0,0 +1,45 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+ +
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEndTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEndTest.html new file mode 100644 index 000000000..9bd032fb1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEndTest.html @@ -0,0 +1,40 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEndWithInlineTextTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEndWithInlineTextTest.html new file mode 100644 index 000000000..e5a4ce181 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnRowStartEndWithInlineTextTest.html @@ -0,0 +1,44 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+ Five +
Six
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnStartEnd2Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnStartEnd2Test.html new file mode 100644 index 000000000..000f84d12 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnStartEnd2Test.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnStartEnd3Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnStartEnd3Test.html new file mode 100644 index 000000000..862c10bb1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnStartEnd3Test.html @@ -0,0 +1,38 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnStartEnd4Test.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnStartEnd4Test.html new file mode 100644 index 000000000..525f1f2f2 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnStartEnd4Test.html @@ -0,0 +1,50 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnStartEndTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnStartEndTest.html new file mode 100644 index 000000000..861b59f7d --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicColumnStartEndTest.html @@ -0,0 +1,41 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicGridAfterParagraphTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicGridAfterParagraphTest.html new file mode 100644 index 000000000..66c2a462b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicGridAfterParagraphTest.html @@ -0,0 +1,33 @@ + + + + + + + +

Some text

+
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicOnlyGridDisplayTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicOnlyGridDisplayTest.html new file mode 100644 index 000000000..815b80993 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicOnlyGridDisplayTest.html @@ -0,0 +1,31 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowDenseFlowTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowDenseFlowTest.html new file mode 100644 index 000000000..5a8c79633 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowDenseFlowTest.html @@ -0,0 +1,47 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowFewDivsTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowFewDivsTest.html new file mode 100644 index 000000000..62518cac2 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowFewDivsTest.html @@ -0,0 +1,32 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowFlowTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowFlowTest.html new file mode 100644 index 000000000..5f9bac33c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowFlowTest.html @@ -0,0 +1,47 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowOneDivTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowOneDivTest.html new file mode 100644 index 000000000..b155ecdb6 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowOneDivTest.html @@ -0,0 +1,35 @@ + + + + + + + +
+
+
One
+
Two
+
Three
+
Four
+
Five
+
+
+

Hey there

+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowStartEndTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowStartEndTest.html new file mode 100644 index 000000000..fac30a9d7 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/basicRowStartEndTest.html @@ -0,0 +1,37 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillRepeatWithFlexMinMaxTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillRepeatWithFlexMinMaxTest.pdf new file mode 100644 index 000000000..8bb7c4772 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillRepeatWithFlexMinMaxTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillRepeatWithGapsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillRepeatWithGapsTest.pdf new file mode 100644 index 000000000..0380c666c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillRepeatWithGapsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillWithDefiniteMinMax.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillWithDefiniteMinMax.pdf new file mode 100644 index 000000000..49274cd4f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillWithDefiniteMinMax.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillWithDefiniteMinMaxTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillWithDefiniteMinMaxTest.pdf new file mode 100644 index 000000000..aba913747 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillWithDefiniteMinMaxTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillWithIndefiniteMinMaxTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillWithIndefiniteMinMaxTest.pdf new file mode 100644 index 000000000..421e85f37 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFillWithIndefiniteMinMaxTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitOnIntrinsicAreaTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitOnIntrinsicAreaTest.pdf new file mode 100644 index 000000000..c89b0834e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitOnIntrinsicAreaTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitOnIntrinsicAreaWithLargeBorderTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitOnIntrinsicAreaWithLargeBorderTest.pdf new file mode 100644 index 000000000..621cb5f49 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitOnIntrinsicAreaWithLargeBorderTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitOnIntrinsicAreaWithLargeMarginPaddingTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitOnIntrinsicAreaWithLargeMarginPaddingTest.pdf new file mode 100644 index 000000000..ea54e450b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitOnIntrinsicAreaWithLargeMarginPaddingTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitRepeatWithFlexMinMaxTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitRepeatWithFlexMinMaxTest.pdf new file mode 100644 index 000000000..e8b0fc450 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitRepeatWithFlexMinMaxTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitWithGapsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitWithGapsTest.pdf new file mode 100644 index 000000000..50aa17091 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitWithGapsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitWithLargeBorderTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitWithLargeBorderTest.pdf new file mode 100644 index 000000000..1b095c13c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitWithLargeBorderTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitWithSingleCellTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitWithSingleCellTest.pdf new file mode 100644 index 000000000..6f51ef3cd Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoFitWithSingleCellTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoRepeatOnIntrinsicAreaTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoRepeatOnIntrinsicAreaTest.pdf new file mode 100644 index 000000000..19fced66a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoRepeatOnIntrinsicAreaTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoRepeatWithFitContentTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoRepeatWithFitContentTest.pdf new file mode 100644 index 000000000..74bf864ac Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoRepeatWithFitContentTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoRepeatWithIntrinsicArgumentTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoRepeatWithIntrinsicArgumentTest.pdf new file mode 100644 index 000000000..cac4e2aad Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoRepeatWithIntrinsicArgumentTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoRepeatWithLeadingMaxContentTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoRepeatWithLeadingMaxContentTest.pdf new file mode 100644 index 000000000..f9cb5f097 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_autoRepeatWithLeadingMaxContentTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnDenseFlowTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnDenseFlowTest.pdf new file mode 100644 index 000000000..260db6171 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnDenseFlowTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFewDivs2Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFewDivs2Test.pdf new file mode 100644 index 000000000..2fc071777 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFewDivs2Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFewDivsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFewDivsTest.pdf new file mode 100644 index 000000000..ec18cf761 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFewDivsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFewDivsWithDisabledGridLayoutTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFewDivsWithDisabledGridLayoutTest.pdf new file mode 100644 index 000000000..66a8c904e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFewDivsWithDisabledGridLayoutTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFewDivsWithFrTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFewDivsWithFrTest.pdf new file mode 100644 index 000000000..f6efd30f9 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFewDivsWithFrTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFlowTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFlowTest.pdf new file mode 100644 index 000000000..39c64a854 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnFlowTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnMultiPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnMultiPageTest.pdf new file mode 100644 index 000000000..fc07dd7eb Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnMultiPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnOneDivTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnOneDivTest.pdf new file mode 100644 index 000000000..4237ca874 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnOneDivTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowFewDivs1Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowFewDivs1Test.pdf new file mode 100644 index 000000000..d2afb897a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowFewDivs1Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowFewDivs2Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowFewDivs2Test.pdf new file mode 100644 index 000000000..38fa015b6 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowFewDivs2Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowFewDivs3Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowFewDivs3Test.pdf new file mode 100644 index 000000000..91037037f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowFewDivs3Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowFewDivs4Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowFewDivs4Test.pdf new file mode 100644 index 000000000..53fcc5266 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowFewDivs4Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd10Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd10Test.pdf new file mode 100644 index 000000000..152382732 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd10Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd11Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd11Test.pdf new file mode 100644 index 000000000..2de2830b0 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd11Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd12Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd12Test.pdf new file mode 100644 index 000000000..50351aaf2 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd12Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd13Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd13Test.pdf new file mode 100644 index 000000000..b842c3f80 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd13Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd14Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd14Test.pdf new file mode 100644 index 000000000..60fa4b05b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd14Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd15Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd15Test.pdf new file mode 100644 index 000000000..7d382e714 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd15Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd16Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd16Test.pdf new file mode 100644 index 000000000..e7327ce0e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd16Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd17Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd17Test.pdf new file mode 100644 index 000000000..e622b2e9a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd17Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd18Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd18Test.pdf new file mode 100644 index 000000000..841dc9cb8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd18Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd19Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd19Test.pdf new file mode 100644 index 000000000..6f1c11301 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd19Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd1Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd1Test.pdf new file mode 100644 index 000000000..d3381d445 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd1Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd2Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd2Test.pdf new file mode 100644 index 000000000..94e73f02f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd2Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd3Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd3Test.pdf new file mode 100644 index 000000000..db1461642 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd3Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd4Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd4Test.pdf new file mode 100644 index 000000000..2615ff203 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd4Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd5Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd5Test.pdf new file mode 100644 index 000000000..2db62889d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd5Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd6Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd6Test.pdf new file mode 100644 index 000000000..9926424b5 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd6Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd7Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd7Test.pdf new file mode 100644 index 000000000..3db584777 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd7Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd8Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd8Test.pdf new file mode 100644 index 000000000..3b7d0c1fd Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd8Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd9Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd9Test.pdf new file mode 100644 index 000000000..98c0ab6c4 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEnd9Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEndTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEndTest.pdf new file mode 100644 index 000000000..ecfdaecd7 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEndTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEndWithInlineTextTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEndWithInlineTextTest.pdf new file mode 100644 index 000000000..93441e034 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnRowStartEndWithInlineTextTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnStartEnd2Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnStartEnd2Test.pdf new file mode 100644 index 000000000..4def9366c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnStartEnd2Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnStartEnd3Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnStartEnd3Test.pdf new file mode 100644 index 000000000..1d36d7f88 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnStartEnd3Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnStartEndTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnStartEndTest.pdf new file mode 100644 index 000000000..36d9e664c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicColumnStartEndTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicGridAfterParagraphTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicGridAfterParagraphTest.pdf new file mode 100644 index 000000000..6fc3d6a56 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicGridAfterParagraphTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicOnlyGridDisplayTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicOnlyGridDisplayTest.pdf new file mode 100644 index 000000000..4ba43d10d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicOnlyGridDisplayTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowDenseFlowTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowDenseFlowTest.pdf new file mode 100644 index 000000000..a90dbd545 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowDenseFlowTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowFewDivsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowFewDivsTest.pdf new file mode 100644 index 000000000..c8e0e4d62 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowFewDivsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowFlowTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowFlowTest.pdf new file mode 100644 index 000000000..c27b86373 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowFlowTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowOneDivTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowOneDivTest.pdf new file mode 100644 index 000000000..d713a0ae3 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowOneDivTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowStartEndTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowStartEndTest.pdf new file mode 100644 index 000000000..af4c328cc Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_basicRowStartEndTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_columnFlowAutoFillTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_columnFlowAutoFillTest.pdf new file mode 100644 index 000000000..d4c1ad893 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_columnFlowAutoFillTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_columnFlowOnSplitTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_columnFlowOnSplitTest.pdf new file mode 100644 index 000000000..556fe9815 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_columnFlowOnSplitTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_divNestingTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_divNestingTest.pdf new file mode 100644 index 000000000..c30c9dc1c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_divNestingTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitContentOverflowingToNextPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitContentOverflowingToNextPageTest.pdf new file mode 100644 index 000000000..2152ba7b4 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitContentOverflowingToNextPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitContentTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitContentTest.pdf new file mode 100644 index 000000000..f01c7a517 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitContentTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitHorizontallyTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitHorizontallyTest.pdf new file mode 100644 index 000000000..f1e5f075b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitHorizontallyTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitOverflowingToNextPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitOverflowingToNextPageTest.pdf new file mode 100644 index 000000000..f8bd4c61a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitOverflowingToNextPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitTest.pdf new file mode 100644 index 000000000..ad20dd06b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_elementDoesntFitTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fitContentAndFrTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fitContentAndFrTest.pdf new file mode 100644 index 000000000..5cf0a511b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fitContentAndFrTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedFitContentTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedFitContentTest.pdf new file mode 100644 index 000000000..2a008524e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedFitContentTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedRepeatWithFitContentTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedRepeatWithFitContentTest.pdf new file mode 100644 index 000000000..09384d93f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedRepeatWithFitContentTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedRepeatWithGapsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedRepeatWithGapsTest.pdf new file mode 100644 index 000000000..eff4cbfd3 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedRepeatWithGapsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedRepeatWithMinMaxContentTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedRepeatWithMinMaxContentTest.pdf new file mode 100644 index 000000000..2697bcd43 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedRepeatWithMinMaxContentTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedTemplatesAndCellDoesNotHaveDirectNeighborTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedTemplatesAndCellDoesNotHaveDirectNeighborTest.pdf new file mode 100644 index 000000000..e88f040e5 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_fixedTemplatesAndCellDoesNotHaveDirectNeighborTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_grid-layout-em.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_grid-layout-em.pdf new file mode 100644 index 000000000..a3afc9103 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_grid-layout-em.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_grid-layout-rem.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_grid-layout-rem.pdf new file mode 100644 index 000000000..75bbf00a2 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_grid-layout-rem.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridInsideGridOnPageBreakTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridInsideGridOnPageBreakTest.pdf new file mode 100644 index 000000000..4795b734e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridInsideGridOnPageBreakTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridInsideGridTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridInsideGridTest.pdf new file mode 100644 index 000000000..6e48f724f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridInsideGridTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridShorthandColumnAutoFlowTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridShorthandColumnAutoFlowTest.pdf new file mode 100644 index 000000000..b626c3d6f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridShorthandColumnAutoFlowTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridShorthandRowAutoFlowTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridShorthandRowAutoFlowTest.pdf new file mode 100644 index 000000000..da27c6bcd Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridShorthandRowAutoFlowTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest.pdf new file mode 100644 index 000000000..a08837858 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest2.pdf new file mode 100644 index 000000000..6cbbe6006 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest3.pdf new file mode 100644 index 000000000..2dfd23d0b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest4.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest4.pdf new file mode 100644 index 000000000..3e214954e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest4.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest5.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest5.pdf new file mode 100644 index 000000000..9818771fe Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest5.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest6.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest6.pdf new file mode 100644 index 000000000..ff2ee95b2 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest6.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest7.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest7.pdf new file mode 100644 index 000000000..cfa67dffe Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest7.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest8.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest8.pdf new file mode 100644 index 000000000..fe9daa35e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridSplitPaddingMarginBorderTest8.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridWithBrTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridWithBrTest.pdf new file mode 100644 index 000000000..7a7da8ef5 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridWithBrTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridWithPageBreakTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridWithPageBreakTest.pdf new file mode 100644 index 000000000..644791e07 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridWithPageBreakTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridWithTableTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridWithTableTest.pdf new file mode 100644 index 000000000..1e2fc9b94 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_gridWithTableTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_imageElementDoesntFitTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_imageElementDoesntFitTest.pdf new file mode 100644 index 000000000..c3b9f4ba0 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_imageElementDoesntFitTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_imageElementsOn2ndPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_imageElementsOn2ndPageTest.pdf new file mode 100644 index 000000000..71c51ecfb Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_imageElementsOn2ndPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_inlineAutoFillTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_inlineAutoFillTest.pdf new file mode 100644 index 000000000..0913447b0 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_inlineAutoFillTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_invalidAutoRepeatTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_invalidAutoRepeatTest.pdf new file mode 100644 index 000000000..7ebdc3a17 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_invalidAutoRepeatTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_invalidParameterRepeatTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_invalidParameterRepeatTest.pdf new file mode 100644 index 000000000..8987d56cf Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_invalidParameterRepeatTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_invalidTemplateColumns.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_invalidTemplateColumns.pdf new file mode 100644 index 000000000..6f86ba8b7 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_invalidTemplateColumns.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_invalidTemplateRows.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_invalidTemplateRows.pdf new file mode 100644 index 000000000..fc5089caf Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_invalidTemplateRows.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_manyImageElementsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_manyImageElementsTest.pdf new file mode 100644 index 000000000..5dc772ae6 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_manyImageElementsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_maxHeightFlexRowsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_maxHeightFlexRowsTest.pdf new file mode 100644 index 000000000..86f390970 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_maxHeightFlexRowsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_maxHeightFlexRowsTest2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_maxHeightFlexRowsTest2.pdf new file mode 100644 index 000000000..670e377e2 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_maxHeightFlexRowsTest2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_maxHeightTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_maxHeightTest.pdf new file mode 100644 index 000000000..c82e15195 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_maxHeightTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minHeightFlexRowsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minHeightFlexRowsTest.pdf new file mode 100644 index 000000000..443f2b60e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minHeightFlexRowsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minHeightTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minHeightTest.pdf new file mode 100644 index 000000000..008b81aa1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minHeightTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minMaxAutoFillTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minMaxAutoFillTest.pdf new file mode 100644 index 000000000..5c648515e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minMaxAutoFillTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minMaxAutoFillWithHeightTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minMaxAutoFillWithHeightTest.pdf new file mode 100644 index 000000000..88a10f420 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minMaxAutoFillWithHeightTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minMaxAutoFillWithMaxHeightTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minMaxAutoFillWithMaxHeightTest.pdf new file mode 100644 index 000000000..e523a9c65 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minMaxAutoFillWithMaxHeightTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minMaxWithIndefiniteMinTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minMaxWithIndefiniteMinTest.pdf new file mode 100644 index 000000000..76c2813ea Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minMaxWithIndefiniteMinTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minmaxWithMaxFrTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minmaxWithMaxFrTest.pdf new file mode 100644 index 000000000..63ca45c7f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minmaxWithMaxFrTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minmaxWithMinFrTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minmaxWithMinFrTest.pdf new file mode 100644 index 000000000..11422fce8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_minmaxWithMinFrTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_mixedRepeatsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_mixedRepeatsTest.pdf new file mode 100644 index 000000000..c87e50f39 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_mixedRepeatsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_percentageFitContentWithFrTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_percentageFitContentWithFrTest.pdf new file mode 100644 index 000000000..6f517cb8d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_percentageFitContentWithFrTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_percentageTemplateHeightTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_percentageTemplateHeightTest.pdf new file mode 100644 index 000000000..e47c11e46 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_percentageTemplateHeightTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_percentageTemplateHeightWithFixedHeightTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_percentageTemplateHeightWithFixedHeightTest.pdf new file mode 100644 index 000000000..d7a613b1f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_percentageTemplateHeightWithFixedHeightTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest.pdf new file mode 100644 index 000000000..fe4477803 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest2.pdf new file mode 100644 index 000000000..ec0dcf6df Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest3.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest3.pdf new file mode 100644 index 000000000..a6d4bec2e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest3.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest4.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest4.pdf new file mode 100644 index 000000000..605c39628 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest4.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest5.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest5.pdf new file mode 100644 index 000000000..9ad6cb26e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest5.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest6.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest6.pdf new file mode 100644 index 000000000..2f9e20ef4 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_pointZeroFlexTest6.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_repeatInsideMinMaxTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_repeatInsideMinMaxTest.pdf new file mode 100644 index 000000000..4afac5106 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_repeatInsideMinMaxTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_resolvableAutoFillSimpleTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_resolvableAutoFillSimpleTest.pdf new file mode 100644 index 000000000..1540cf7c2 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_resolvableAutoFillSimpleTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_resolvableAutoFitWithMinMaxTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_resolvableAutoFitWithMinMaxTest.pdf new file mode 100644 index 000000000..38bfeb9ea Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_resolvableAutoFitWithMinMaxTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_rowColumnShorthandSimpleTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_rowColumnShorthandSimpleTest.pdf new file mode 100644 index 000000000..d0bbcdb1d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_rowColumnShorthandSimpleTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_severalValuesAutoFillTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_severalValuesAutoFillTest.pdf new file mode 100644 index 000000000..61794941f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_severalValuesAutoFillTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_shrankTemplateAfterAutoFitTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_shrankTemplateAfterAutoFitTest.pdf new file mode 100644 index 000000000..e80bd4d0f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_shrankTemplateAfterAutoFitTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_spanOnlyFrTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_spanOnlyFrTest.pdf new file mode 100644 index 000000000..8e5190afb Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_spanOnlyFrTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_subgridTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_subgridTest.pdf new file mode 100644 index 000000000..ca5fad405 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_subgridTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_textsWithOverflowTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_textsWithOverflowTest.pdf new file mode 100644 index 000000000..fa9cc82ae Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_textsWithOverflowTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_twoAutoRepeatsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_twoAutoRepeatsTest.pdf new file mode 100644 index 000000000..f9ff88e50 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/cmp_twoAutoRepeatsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/columnFlowAutoFillTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/columnFlowAutoFillTest.html new file mode 100644 index 000000000..76b154b33 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/columnFlowAutoFillTest.html @@ -0,0 +1,37 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/columnFlowOnSplitTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/columnFlowOnSplitTest.html new file mode 100644 index 000000000..41b5cdcce --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/columnFlowOnSplitTest.html @@ -0,0 +1,76 @@ + + + + + + + +

Some text

+
+
Elem 1. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Elem 2. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Elem 3. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Elem 4. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Elem 5. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Elem 6. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Elem 7. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/divNestingTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/divNestingTest.html new file mode 100644 index 000000000..79b577eb2 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/divNestingTest.html @@ -0,0 +1,239 @@ + + + + + PDF + + + + +
+
+
+ +
+
+
Full Name
+
+ +
+
+
+
Address
+
+ +
+
+
+
Mobile Phone
+
+ +
+
+
Type   [x] +
+
+
ID No.
+
+ +
+
+
+
Tax ID
+
+ +
+
+
+
DD/MM/YYYY
+
+ +
+
+
+
+
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitContentOverflowingToNextPageTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitContentOverflowingToNextPageTest.html new file mode 100644 index 000000000..5db5db6aa --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitContentOverflowingToNextPageTest.html @@ -0,0 +1,41 @@ + + + + + + + +

+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitContentTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitContentTest.html new file mode 100644 index 000000000..25ba62a0c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitContentTest.html @@ -0,0 +1,39 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitHorizontallyTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitHorizontallyTest.html new file mode 100644 index 000000000..6f0d32256 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitHorizontallyTest.html @@ -0,0 +1,34 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet, consetetur
+
Lorem ipsum dolor sit amet, consetetur
+
Lorem ipsum dolor sit amet, consetetur
+
Lorem ipsum dolor sit amet, consetetur
+
Lorem ipsum dolor sit amet, consetetur
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitOverflowingToNextPageTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitOverflowingToNextPageTest.html new file mode 100644 index 000000000..f0b73295c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitOverflowingToNextPageTest.html @@ -0,0 +1,41 @@ + + + + + + + +

+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitTest.html new file mode 100644 index 000000000..5683b17b2 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/elementDoesntFitTest.html @@ -0,0 +1,39 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fitContentAndFrTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fitContentAndFrTest.html new file mode 100644 index 000000000..539c5a007 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fitContentAndFrTest.html @@ -0,0 +1,36 @@ + + + + + + +
+
Test1
+
Test2
+
Test3 Test3 Test3 Test3 Test3 Test3 Test3 Test3
+
Test4Test4Test4Test4Test4 Test4 Test4 Test4 Test4 Test4 Test4 Test4
+
Test5
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedFitContentTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedFitContentTest.html new file mode 100644 index 000000000..ea36aedf7 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedFitContentTest.html @@ -0,0 +1,39 @@ + + + + + + +
+
One
+
Two Two Two Two Two Two Two Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedRepeatWithFitContentTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedRepeatWithFitContentTest.html new file mode 100644 index 000000000..2eadeeb93 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedRepeatWithFitContentTest.html @@ -0,0 +1,31 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Fiv
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedRepeatWithGapsTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedRepeatWithGapsTest.html new file mode 100644 index 000000000..d31f1ecd4 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedRepeatWithGapsTest.html @@ -0,0 +1,36 @@ + + + + + + +
+
One One One
+
Two Two Two
+
Three Three Three
+
Four Four Four
+
Five Five Five
+
Six Six Six
+
Seven Seven Seven
+
Eight Eight Eight
+
Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedRepeatWithMinMaxContentTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedRepeatWithMinMaxContentTest.html new file mode 100644 index 000000000..a964df430 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedRepeatWithMinMaxContentTest.html @@ -0,0 +1,34 @@ + + + + + + +
+
Oneoneone one one one
+
TwoTwoTwo Two Two Two Two
+
Three
+
Four Four Four Four
+
Fiv Fiv Fiv Fiv Fiv Fiv
+
Six
+
Seven Seven Seven Seven Seven Seven
+
Eight
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedTemplatesAndCellDoesNotHaveDirectNeighborTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedTemplatesAndCellDoesNotHaveDirectNeighborTest.html new file mode 100644 index 000000000..70bfbb71e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/fixedTemplatesAndCellDoesNotHaveDirectNeighborTest.html @@ -0,0 +1,51 @@ + + +CSS Grid Layout Test: Positioned grid items + + + + + +
+
Header
+ +
Main area
+
Footer
+
\ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/grid-layout-em.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/grid-layout-em.html new file mode 100644 index 000000000..3dfc7b2fa --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/grid-layout-em.html @@ -0,0 +1,35 @@ + + + + + + +
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/grid-layout-rem.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/grid-layout-rem.html new file mode 100644 index 000000000..17698b85b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/grid-layout-rem.html @@ -0,0 +1,38 @@ + + + + + + +
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridInsideGridOnPageBreakTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridInsideGridOnPageBreakTest.html new file mode 100644 index 000000000..88bd35306 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridInsideGridOnPageBreakTest.html @@ -0,0 +1,43 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet
+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridInsideGridTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridInsideGridTest.html new file mode 100644 index 000000000..31452fe9e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridInsideGridTest.html @@ -0,0 +1,43 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet
+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridShorthandColumnAutoFlowTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridShorthandColumnAutoFlowTest.html new file mode 100644 index 000000000..f8198d0ba --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridShorthandColumnAutoFlowTest.html @@ -0,0 +1,42 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridShorthandRowAutoFlowTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridShorthandRowAutoFlowTest.html new file mode 100644 index 000000000..236998e97 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridShorthandRowAutoFlowTest.html @@ -0,0 +1,42 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest.html new file mode 100644 index 000000000..61ba0292c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest.html @@ -0,0 +1,34 @@ + + + + + + + +
+
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest2.html new file mode 100644 index 000000000..69a00c58c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest2.html @@ -0,0 +1,42 @@ + + + + + + +
+
One
+
Two Two Two Two Two Two Two Two Two Two Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest3.html new file mode 100644 index 000000000..cd01c9863 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest3.html @@ -0,0 +1,96 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CountryCapital
DenmarkCopenhagen
FinlandHelsinki
NorwayOslo
BelgiumBrussels
NetherlandsAmsterdam
SwedenStockholm
GermanyBerlin
CanadaOttawa
AustraliaCanberra
AustriaVien
CroatiaZagreb
PolandWarsaw
+
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest4.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest4.html new file mode 100644 index 000000000..af100a989 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest4.html @@ -0,0 +1,96 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CountryCapital
DenmarkCopenhagen
FinlandHelsinki
NorwayOslo
BelgiumBrussels
NetherlandsAmsterdam
SwedenStockholm
GermanyBerlin
CanadaOttawa
AustraliaCanberra
AustriaVien
CroatiaZagreb
PolandWarsaw
+
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest5.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest5.html new file mode 100644 index 000000000..e0fa5897e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest5.html @@ -0,0 +1,36 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet
+ +
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest6.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest6.html new file mode 100644 index 000000000..eedd5adf2 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest6.html @@ -0,0 +1,45 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet
+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest7.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest7.html new file mode 100644 index 000000000..cd2295428 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest7.html @@ -0,0 +1,49 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet
+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest8.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest8.html new file mode 100644 index 000000000..22c1afed5 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridSplitPaddingMarginBorderTest8.html @@ -0,0 +1,48 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet
+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridWithBrTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridWithBrTest.html new file mode 100644 index 000000000..df6676e6e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridWithBrTest.html @@ -0,0 +1,38 @@ + + + + + + + +

Some text

+
+ +
Lorem ipsum dolor sit amet
+
+
+
+ + + + +
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridWithPageBreakTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridWithPageBreakTest.html new file mode 100644 index 000000000..97f207f6a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridWithPageBreakTest.html @@ -0,0 +1,36 @@ + + + + + + + +

Some text

+
+ +
Lorem ipsum dolor sit amet
+ +
div with page break
+ + + +
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridWithTableTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridWithTableTest.html new file mode 100644 index 000000000..3412a8752 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/gridWithTableTest.html @@ -0,0 +1,91 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CountryCapital
DenmarkCopenhagen
FinlandHelsinki
NorwayOslo
BelgiumBrussels
NetherlandsAmsterdam
SwedenStockholm
GermanyBerlin
CanadaOttawa
AustraliaCanberra
AustriaVien
CroatiaZagreb
PolandWarsaw
+
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/image.gif b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/image.gif new file mode 100644 index 000000000..fb073bdb6 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/image.gif differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/imageElementDoesntFitTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/imageElementDoesntFitTest.html new file mode 100644 index 000000000..47664198b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/imageElementDoesntFitTest.html @@ -0,0 +1,34 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet
+ +
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
Lorem ipsum dolor sit amet
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/imageElementsOn2ndPageTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/imageElementsOn2ndPageTest.html new file mode 100644 index 000000000..c835920b8 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/imageElementsOn2ndPageTest.html @@ -0,0 +1,38 @@ + + + + + + + +

Some text

+
+ +
Lorem ipsum dolor sit amet
+ + + + + + + +
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/inlineAutoFillTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/inlineAutoFillTest.html new file mode 100644 index 000000000..bb38d072a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/inlineAutoFillTest.html @@ -0,0 +1,39 @@ + + + + + + +
+
One
+
Two Two Two Two Two Two Two Two Two Two Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/invalidAutoRepeatTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/invalidAutoRepeatTest.html new file mode 100644 index 000000000..6bac68d69 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/invalidAutoRepeatTest.html @@ -0,0 +1,36 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/invalidParameterRepeatTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/invalidParameterRepeatTest.html new file mode 100644 index 000000000..a4cf3314f --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/invalidParameterRepeatTest.html @@ -0,0 +1,35 @@ + + + + + + +
+
One One One
+
Two Two Two
+
Three Three Three
+
Four Four Four
+
Five Five Five
+
Six Six Six
+
Seven Seven Seven
+
Eight Eight Eight
+
Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/invalidTemplateColumns.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/invalidTemplateColumns.html new file mode 100644 index 000000000..936955c7c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/invalidTemplateColumns.html @@ -0,0 +1,35 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/invalidTemplateRows.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/invalidTemplateRows.html new file mode 100644 index 000000000..e0392425d --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/invalidTemplateRows.html @@ -0,0 +1,35 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/manyImageElementsTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/manyImageElementsTest.html new file mode 100644 index 000000000..ddfacb293 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/manyImageElementsTest.html @@ -0,0 +1,38 @@ + + + + + + + +

Some text

+
+ +
Lorem ipsum dolor sit amet
+ + + + + + + +
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/maxHeightFlexRowsTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/maxHeightFlexRowsTest.html new file mode 100644 index 000000000..273e7e587 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/maxHeightFlexRowsTest.html @@ -0,0 +1,35 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+

some text

+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/maxHeightFlexRowsTest2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/maxHeightFlexRowsTest2.html new file mode 100644 index 000000000..da680d6e5 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/maxHeightFlexRowsTest2.html @@ -0,0 +1,34 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/maxHeightTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/maxHeightTest.html new file mode 100644 index 000000000..182b200ed --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/maxHeightTest.html @@ -0,0 +1,35 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+

some text

+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minHeightFlexRowsTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minHeightFlexRowsTest.html new file mode 100644 index 000000000..da5081c8a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minHeightFlexRowsTest.html @@ -0,0 +1,35 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+

some text

+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minHeightTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minHeightTest.html new file mode 100644 index 000000000..ab4a3ac1c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minHeightTest.html @@ -0,0 +1,34 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minMaxAutoFillTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minMaxAutoFillTest.html new file mode 100644 index 000000000..d7ac906df --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minMaxAutoFillTest.html @@ -0,0 +1,39 @@ + + + + + + +
+
One
+
Two Two Two Two Two Two Two Two Two Two Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minMaxAutoFillWithHeightTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minMaxAutoFillWithHeightTest.html new file mode 100644 index 000000000..42970f62d --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minMaxAutoFillWithHeightTest.html @@ -0,0 +1,40 @@ + + + + + + +
+
One
+
Two Two Two Two Two Two Two Two Two Two Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minMaxAutoFillWithMaxHeightTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minMaxAutoFillWithMaxHeightTest.html new file mode 100644 index 000000000..9244ddd15 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minMaxAutoFillWithMaxHeightTest.html @@ -0,0 +1,40 @@ + + + + + + +
+
One
+
Two Two Two Two Two Two Two Two Two Two Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minMaxWithIndefiniteMinTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minMaxWithIndefiniteMinTest.html new file mode 100644 index 000000000..bec31c410 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minMaxWithIndefiniteMinTest.html @@ -0,0 +1,36 @@ + + + + + + +
+
One One One
+
Two Two Two
+
Three Three Three
+
Four Four Four
+
Five Five Five
+
Six Six Six
+
Seven Seven Seven
+
Eight Eight Eight
+
Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minmaxWithMaxFrTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minmaxWithMaxFrTest.html new file mode 100644 index 000000000..daebde02c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minmaxWithMaxFrTest.html @@ -0,0 +1,36 @@ + + + + + + +
+
One One One
+
Two Two Two
+
Three Three Three
+
Four Four Four
+
Five Five Five
+
Six Six Six
+
Seven Seven Seven
+
Eight Eight Eight
+
Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minmaxWithMinFrTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minmaxWithMinFrTest.html new file mode 100644 index 000000000..44a456870 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/minmaxWithMinFrTest.html @@ -0,0 +1,36 @@ + + + + + + +
+
One One One
+
Two Two Two
+
Three Three Three
+
Four Four Four
+
Five Five Five
+
Six Six Six
+
Seven Seven Seven
+
Eight Eight Eight
+
Nine Nine Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/mixedFitContentTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/mixedFitContentTest.html new file mode 100644 index 000000000..32ac96cd3 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/mixedFitContentTest.html @@ -0,0 +1,40 @@ + + + + + + +
+
One
+
Two Two Two Two Two Two Two Two Two Two Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/mixedRepeatsTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/mixedRepeatsTest.html new file mode 100644 index 000000000..8bebf33d7 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/mixedRepeatsTest.html @@ -0,0 +1,36 @@ + + + + + + +
+
One One One One One
+
Two Two Two Two Two
+
Three Three Three Three Three
+
Four Four Four Four Four
+
Five Five Five Five Five
+
Six Six Six Six Six
+
Seven Seven Seven Seven Seven
+
Eight Eight Eight Eight Eight
+
Nine Nine Nine Nine Nine
+
Ten Ten Ten Ten Ten
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/percentageFitContentWithFrTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/percentageFitContentWithFrTest.html new file mode 100644 index 000000000..27631c356 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/percentageFitContentWithFrTest.html @@ -0,0 +1,41 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/percentageTemplateHeightTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/percentageTemplateHeightTest.html new file mode 100644 index 000000000..a6585b4ba --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/percentageTemplateHeightTest.html @@ -0,0 +1,40 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/percentageTemplateHeightWithFixedHeightTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/percentageTemplateHeightWithFixedHeightTest.html new file mode 100644 index 000000000..60ce138a1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/percentageTemplateHeightWithFixedHeightTest.html @@ -0,0 +1,42 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest.html new file mode 100644 index 000000000..302885b68 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest.html @@ -0,0 +1,32 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Fiv
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest2.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest2.html new file mode 100644 index 000000000..03d63398b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest2.html @@ -0,0 +1,32 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Fiv
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest3.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest3.html new file mode 100644 index 000000000..f523957b4 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest3.html @@ -0,0 +1,37 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five Five Five Five Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest4.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest4.html new file mode 100644 index 000000000..3787b7af0 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest4.html @@ -0,0 +1,37 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
FiveFiveFiveFiveFiveFiveFive
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest5.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest5.html new file mode 100644 index 000000000..f2b84428f --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest5.html @@ -0,0 +1,38 @@ + + + + + + +
+
OneOneOneOneOneOneOneOneOne
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest6.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest6.html new file mode 100644 index 000000000..983560179 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/pointZeroFlexTest6.html @@ -0,0 +1,37 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
FiveFiveFiveFiveFiveFiveFive
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/repeatInsideMinMaxTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/repeatInsideMinMaxTest.html new file mode 100644 index 000000000..533dbf335 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/repeatInsideMinMaxTest.html @@ -0,0 +1,30 @@ + + + + + + +
+
One
+
Two
+
Three
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/resolvableAutoFillSimpleTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/resolvableAutoFillSimpleTest.html new file mode 100644 index 000000000..11394b6ad --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/resolvableAutoFillSimpleTest.html @@ -0,0 +1,29 @@ + + + + + + +
+
One
+
Two
+
Three
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/resolvableAutoFitWithMinMaxTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/resolvableAutoFitWithMinMaxTest.html new file mode 100644 index 000000000..dba437fa9 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/resolvableAutoFitWithMinMaxTest.html @@ -0,0 +1,29 @@ + + + + + + +
+
One
+
Two
+
Three
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/rowColumnShorthandSimpleTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/rowColumnShorthandSimpleTest.html new file mode 100644 index 000000000..229c1d35e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/rowColumnShorthandSimpleTest.html @@ -0,0 +1,49 @@ + + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/severalValuesAutoFillTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/severalValuesAutoFillTest.html new file mode 100644 index 000000000..ed7d86599 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/severalValuesAutoFillTest.html @@ -0,0 +1,38 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Five
+
Six
+
Seven
+
Eight
+
Nine
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/shrankTemplateAfterAutoFitTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/shrankTemplateAfterAutoFitTest.html new file mode 100644 index 000000000..eb9156669 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/shrankTemplateAfterAutoFitTest.html @@ -0,0 +1,41 @@ + + + + + Grid test for shrank template with auto-fit + + + +

The test passes if it has the same visual effect as reference.

+
+
+
+
+
+
+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/spanOnlyFrTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/spanOnlyFrTest.html new file mode 100644 index 000000000..8347ec176 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/spanOnlyFrTest.html @@ -0,0 +1,38 @@ + + + + + + +
+
OneOneOneOneOneOneOneOneOne
+
Two
+
Three
+
Four
+
Five
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/subgridTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/subgridTest.html new file mode 100644 index 000000000..ed33c14dc --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/subgridTest.html @@ -0,0 +1,41 @@ + + + Subgrid Example + + + +
+
Parent 1
+
Parent 2
+
Parent 3
+
+
Child 1
+
Child 2
+
Child 3
+
+
Parent 4
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/textsWithOverflowTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/textsWithOverflowTest.html new file mode 100644 index 000000000..13ff9dfa1 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/textsWithOverflowTest.html @@ -0,0 +1,59 @@ + + + + + + + +

Some text

+
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et + dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet + clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, + consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed + diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea + takimata sanctus est Lorem ipsum dolor sit amet.
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/twoAutoRepeatsTest.html b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/twoAutoRepeatsTest.html new file mode 100644 index 000000000..e7f163a71 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/grid/GridTemplatesTest/twoAutoRepeatsTest.html @@ -0,0 +1,32 @@ + + + + + + +
+
One
+
Two
+
Three
+
Four
+
Fiv
+
+ + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAllTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAllTest.pdf index b619071c1..958ed9714 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAllTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAllTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAlwaysTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAlwaysTest.pdf index bf741f5ac..26e64060b 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAlwaysTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAlwaysTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAutoInsideColTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAutoInsideColTest.pdf index 9a41286b0..5f6aad2e6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAutoInsideColTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAutoInsideColTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAutoTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAutoTest.pdf index b923354e6..6fd7974fc 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAutoTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAutoTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidColumnTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidColumnTest.pdf index 40ea085ab..efce9a28e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidColumnTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidColumnTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidInsideColTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidInsideColTest.pdf index 232b0e9cc..d3fb93f95 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidInsideColTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidInsideColTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidPageTest.pdf index d79711eab..4c2a3703d 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidPageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidTest.pdf index 5031ce717..e3c5602c0 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterAvoidTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterColumnTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterColumnTest.pdf index c84641cde..15b89ec2c 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterColumnTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterColumnTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterLeftTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterLeftTest.pdf index 43f734b21..80847e514 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterLeftTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterLeftTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterPageTest.pdf index f3efa549d..f907816d3 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterPageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterRightTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterRightTest.pdf index 2440d11dd..2234e897e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterRightTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakAfterRightTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAllTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAllTest.pdf index 3308e53f5..7801baa34 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAllTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAllTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAlwaysTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAlwaysTest.pdf index a9b5a0a9b..90f9b3fb2 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAlwaysTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAlwaysTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAutoInsideColTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAutoInsideColTest.pdf index 84755aebc..68e05df17 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAutoInsideColTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAutoInsideColTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAutoTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAutoTest.pdf index 02907fb94..db9919b53 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAutoTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAutoTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidColumnTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidColumnTest.pdf index 888f555e4..ca93ba669 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidColumnTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidColumnTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidInsideColTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidInsideColTest.pdf index 0caff5d61..8b7de46f7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidInsideColTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidInsideColTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidPageTest.pdf index ab025ff1b..df5d5dfe8 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidPageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidTest.pdf index 89aa0c52e..a357bb496 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeAvoidTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeColumnTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeColumnTest.pdf index 5315996ee..9684ac097 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeColumnTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeColumnTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeLeftTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeLeftTest.pdf index 4d83f6f05..9d9d2e8f8 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeLeftTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeLeftTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeRightTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeRightTest.pdf index a8f853e07..6c756d420 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeRightTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakBeforeRightTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAutoTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAutoTest.pdf index c4eae4471..cb989f14b 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAutoTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAutoTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidColumnTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidColumnTest.pdf index 0321d397b..3e1e6b7e7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidColumnTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidColumnTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidInsideColumnTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidInsideColumnTest.pdf index c45e2346f..045704233 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidInsideColumnTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidInsideColumnTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidPageTest.pdf index 39bec5f9b..6be9e80d7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidPageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidTest.pdf index d791d030d..4374aed42 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_breakInsideAvoidTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterAlwaysTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterAlwaysTest.pdf index 461720396..77c06b57e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterAlwaysTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterAlwaysTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterAutoTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterAutoTest.pdf index d0f3c9eb0..f236473c0 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterAutoTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterAutoTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterAvoidPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterAvoidPageTest.pdf index b02060142..694f8953d 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterAvoidPageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterAvoidPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementAlwaysTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementAlwaysTest.pdf index 1ab11e162..d11f3c8b9 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementAlwaysTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementAlwaysTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementDivAlwaysTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementDivAlwaysTest.pdf index 473e80935..d918304cd 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementDivAlwaysTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterInnerElementDivAlwaysTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterLeftTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterLeftTest.pdf index 19982beea..e342ac725 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterLeftTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterLeftTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterPageInsideColumnTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterPageInsideColumnTest.pdf index 9e3330791..81d10eaf0 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterPageInsideColumnTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterPageInsideColumnTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterRightTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterRightTest.pdf index f68cad097..4707e0de4 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterRightTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakAfterRightTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAlwaysTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAlwaysTest.pdf index 070b74d02..a3728a5e5 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAlwaysTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAlwaysTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAutoTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAutoTest.pdf index 89636e34a..fcb12a7db 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAutoTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAutoTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAvoidPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAvoidPageTest.pdf index 487083320..b0798eaa8 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAvoidPageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAvoidPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAvoidTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAvoidTest.pdf index 748f6f48d..92104f966 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAvoidTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeAvoidTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeInnerElementAlwaysTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeInnerElementAlwaysTest.pdf index 27dd5efa0..ae22465d7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeInnerElementAlwaysTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeInnerElementAlwaysTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeLeftTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeLeftTest.pdf index 88b4d89b5..55e084b6f 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeLeftTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeLeftTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeRightTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeRightTest.pdf index d80b27075..0dda8ccc5 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeRightTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakBeforeRightTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakInsideAutoTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakInsideAutoTest.pdf index 73b584ada..9e5c7c22a 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakInsideAutoTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakInsideAutoTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakInsideAvoidTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakInsideAvoidTest.pdf index 9dbad6e62..4efad13ff 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakInsideAvoidTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/BreakTest/cmp_pageBreakInsideAvoidTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicArticleTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicArticleTest.pdf index d6cd9c154..22547ebf2 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicArticleTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicArticleTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicDisplayPropertyTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicDisplayPropertyTest.pdf index 80e5cf378..ce1357d35 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicDisplayPropertyTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicDisplayPropertyTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicDisplayPropertyWithNestedColumnsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicDisplayPropertyWithNestedColumnsTest.pdf index 603fbfd24..c134ce99b 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicDisplayPropertyWithNestedColumnsTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicDisplayPropertyWithNestedColumnsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicDivTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicDivTest.pdf index bf5c76d08..e1370475e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicDivTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicDivTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFlexPropertyTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFlexPropertyTest.pdf index 9c18499e2..b232d3b89 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFlexPropertyTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFlexPropertyTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFloatPropertyTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFloatPropertyTest.pdf index 6d36c8b6f..835cb4128 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFloatPropertyTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFloatPropertyTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFormMultiPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFormMultiPageTest.pdf index bf6cb7cbb..29b894f2d 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFormMultiPageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFormMultiPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFormTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFormTest.pdf index 9a6d47876..f296d8e25 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFormTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicFormTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicOrphans1Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicOrphans1Test.pdf index f6db233ab..63b3f2ed6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicOrphans1Test.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicOrphans1Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicOrphans2Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicOrphans2Test.pdf index f4d27fdb5..5a9394db7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicOrphans2Test.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicOrphans2Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicPTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicPTest.pdf index 6aaf57b0c..10731ef1e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicPTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicPTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicSectionTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicSectionTest.pdf index 1bae63407..65e3460b8 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicSectionTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicSectionTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicTableTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicTableTest.pdf index a571f584b..d20e280f8 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicTableTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicTableTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicWidows1Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicWidows1Test.pdf index 12669a6ec..28dceedb9 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicWidows1Test.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicWidows1Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicWidows2Test.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicWidows2Test.pdf index 5a5957429..79fc896d6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicWidows2Test.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_basicWidows2Test.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_bigFormMultiPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_bigFormMultiPageTest.pdf index cf39ac79a..f18765cb9 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_bigFormMultiPageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_bigFormMultiPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_biggerThanColumnImageOverflowHiddenTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_biggerThanColumnImageOverflowHiddenTest.pdf index 2abb257cd..456b60cec 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_biggerThanColumnImageOverflowHiddenTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_biggerThanColumnImageOverflowHiddenTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_biggerThanColumnImageOverflowScrollTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_biggerThanColumnImageOverflowScrollTest.pdf index d8e69a93a..0174d93c2 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_biggerThanColumnImageOverflowScrollTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_biggerThanColumnImageOverflowScrollTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_biggerThanColumnImageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_biggerThanColumnImageTest.pdf index 664a5763b..5d74792d6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_biggerThanColumnImageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_biggerThanColumnImageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_childBorderTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_childBorderTest.pdf index 0941f52ec..bee387288 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_childBorderTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_childBorderTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_childMarginTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_childMarginTest.pdf index 0081c3ca3..fe46ca0e2 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_childMarginTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_childMarginTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_childPaddingTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_childPaddingTest.pdf index 21688415a..cbecc7c7c 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_childPaddingTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_childPaddingTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_diffElementsInsidePTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_diffElementsInsidePTest.pdf index 9852d1100..84d6ed487 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_diffElementsInsidePTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_diffElementsInsidePTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_height_multipage.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_height_multipage.pdf index 65c91f9db..2e6bbb9fc 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_height_multipage.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_height_multipage.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_multiple_attributes.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_multiple_attributes.pdf index 5f46e30a5..f057ad62d 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_multiple_attributes.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_multiple_attributes.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_multiple_attributes1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_multiple_attributes1.pdf index 16cb0252c..2470036e8 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_multiple_attributes1.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_multiple_attributes1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_multiple_attributes2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_multiple_attributes2.pdf index a4f263c57..b89562a8f 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_multiple_attributes2.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_multiple_attributes2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_nestingBetweenPagesTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_nestingBetweenPagesTest.pdf index b3bea570a..569add207 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_nestingBetweenPagesTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_nestingBetweenPagesTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_splitEmptyContinuousBlockElementBetweenColumns.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_splitEmptyContinuousBlockElementBetweenColumns.pdf index 9de1263d9..ed7c8dc8b 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_splitEmptyContinuousBlockElementBetweenColumns.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_splitEmptyContinuousBlockElementBetweenColumns.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_splitEmptyParagraphElementsBetweenColumns.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_splitEmptyParagraphElementsBetweenColumns.pdf index acfa8d98d..d17e51872 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_splitEmptyParagraphElementsBetweenColumns.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_splitEmptyParagraphElementsBetweenColumns.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_splitInnerParagraphBetweenColumns.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_splitInnerParagraphBetweenColumns.pdf index 5f2d4ef85..944aa225a 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_splitInnerParagraphBetweenColumns.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_splitInnerParagraphBetweenColumns.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_tripleNestingBetweenPagesTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_tripleNestingBetweenPagesTest.pdf index f7c271a84..c914b6d71 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_tripleNestingBetweenPagesTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_tripleNestingBetweenPagesTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_tripleNestingTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_tripleNestingTest.pdf index bac1af159..a779ac884 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_tripleNestingTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/cmp_tripleNestingTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/tripleNestingBetweenPagesTest.html b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/tripleNestingBetweenPagesTest.html index b0d96de24..a4ca48a45 100644 --- a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/tripleNestingBetweenPagesTest.html +++ b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnCountTest/tripleNestingBetweenPagesTest.html @@ -13,6 +13,9 @@

Columnized Content

This is the seventh paragraph of the columnized content.

This is the eighth paragraph of the columnized content.

This is the ninth paragraph of the columnized content.

+

This is the tenth paragraph of the columnized content.

+

This is the eleven paragraph of the columnized content.

+

Columnized Div 1

diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnGapTest/cmp_mixedElementsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnGapTest/cmp_mixedElementsTest.pdf index d989d10c7..cc14b0633 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnGapTest/cmp_mixedElementsTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnGapTest/cmp_mixedElementsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnGapTest/cmp_nestedElementsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnGapTest/cmp_nestedElementsTest.pdf index a24e7256b..76eac64dd 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnGapTest/cmp_nestedElementsTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnGapTest/cmp_nestedElementsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigBordersTest.html b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigBordersTest.html new file mode 100644 index 000000000..bfc31da8a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigBordersTest.html @@ -0,0 +1,34 @@ + + + + + +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim + veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. +
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigBordersWithoutWidtConstraintTest.html b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigBordersWithoutWidtConstraintTest.html new file mode 100644 index 000000000..e549d5fcd --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigBordersWithoutWidtConstraintTest.html @@ -0,0 +1,34 @@ + + + + + +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim + veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. +
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigMargingsPaddingsBordersTest.html b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigMargingsPaddingsBordersTest.html new file mode 100644 index 000000000..769cfc4eb --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigMargingsPaddingsBordersTest.html @@ -0,0 +1,34 @@ + + + + + +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim + veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. +
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigMarginsTest.html b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigMarginsTest.html new file mode 100644 index 000000000..b69c96bb7 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigMarginsTest.html @@ -0,0 +1,34 @@ + + + + + +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim + veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. +
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigPaddingsTest.html b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigPaddingsTest.html new file mode 100644 index 000000000..73d22e5ef --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/bigPaddingsTest.html @@ -0,0 +1,34 @@ + + + + + +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim + veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad + minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat + cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id + est laborum. +
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicArticleTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicArticleTest.pdf index dc76af690..2ab0dd68b 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicArticleTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicArticleTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicDisplayPropertyTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicDisplayPropertyTest.pdf index 57a477201..860e68221 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicDisplayPropertyTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicDisplayPropertyTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicDivTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicDivTest.pdf index b6a081c91..d8578170a 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicDivTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicDivTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicDivWithImageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicDivWithImageTest.pdf index fbeb5201e..0acee97ac 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicDivWithImageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicDivWithImageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicFlexPropertyTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicFlexPropertyTest.pdf index 287dac3e1..cafafed61 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicFlexPropertyTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicFlexPropertyTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicFloatPropertyTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicFloatPropertyTest.pdf index 83262229e..2565b2ad5 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicFloatPropertyTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicFloatPropertyTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicSectionTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicSectionTest.pdf index 9839c4ef5..1327d248a 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicSectionTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_basicSectionTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigBordersTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigBordersTest.pdf new file mode 100644 index 000000000..771d8fcf2 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigBordersTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigBordersWithoutWidtConstraintTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigBordersWithoutWidtConstraintTest.pdf new file mode 100644 index 000000000..ec709b21c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigBordersWithoutWidtConstraintTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigMargingsPaddingsBordersTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigMargingsPaddingsBordersTest.pdf new file mode 100644 index 000000000..668ef681a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigMargingsPaddingsBordersTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigMarginsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigMarginsTest.pdf new file mode 100644 index 000000000..f0d1e1a21 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigMarginsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigPaddingsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigPaddingsTest.pdf new file mode 100644 index 000000000..67a05b608 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_bigPaddingsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_columnizedContentInTableTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_columnizedContentInTableTest.pdf index accf7df8c..13387e24c 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_columnizedContentInTableTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_columnizedContentInTableTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_columnizedShortPInTableCellWithHeightTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_columnizedShortPInTableCellWithHeightTest.pdf index 45f659195..57d985b35 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_columnizedShortPInTableCellWithHeightTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_columnizedShortPInTableCellWithHeightTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_columnizedShortParagraphsInTableCellTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_columnizedShortParagraphsInTableCellTest.pdf index 44c97a80e..7a279ffe7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_columnizedShortParagraphsInTableCellTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_columnizedShortParagraphsInTableCellTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_diffElementsInsidePTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_diffElementsInsidePTest.pdf index 46c651999..cb0c24b78 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_diffElementsInsidePTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_diffElementsInsidePTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_displayPropertyWithNestedColumnsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_displayPropertyWithNestedColumnsTest.pdf index 38d2eef79..f9f6b3635 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_displayPropertyWithNestedColumnsTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_displayPropertyWithNestedColumnsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_formMultiPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_formMultiPageTest.pdf index 95f9df9f2..f7f6c3aa8 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_formMultiPageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_formMultiPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_formWithNestedElementsMultiPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_formWithNestedElementsMultiPageTest.pdf index a68645f6d..faa29040d 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_formWithNestedElementsMultiPageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_formWithNestedElementsMultiPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_formWithNestedElementsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_formWithNestedElementsTest.pdf index eeafb9e9c..64b6312d5 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_formWithNestedElementsTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_formWithNestedElementsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_mixedElementsInContainer.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_mixedElementsInContainer.pdf index 17fb847b8..8a9b3f29c 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_mixedElementsInContainer.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_mixedElementsInContainer.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_nestedElementsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_nestedElementsTest.pdf index bcd8b1618..47ad915ce 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_nestedElementsTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_nestedElementsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_oneParagraphSpecifiedWithDifferentWidthTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_oneParagraphSpecifiedWithDifferentWidthTest.pdf index 791ca3b12..62641c054 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_oneParagraphSpecifiedWithDifferentWidthTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_oneParagraphSpecifiedWithDifferentWidthTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_overlaidContentInDivWithImageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_overlaidContentInDivWithImageTest.pdf index b09803cfe..3b856e30e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_overlaidContentInDivWithImageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_overlaidContentInDivWithImageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_overlaidFlexContentInColumnContainerTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_overlaidFlexContentInColumnContainerTest.pdf index 40a6bfc1c..cb364c5f3 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_overlaidFlexContentInColumnContainerTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_overlaidFlexContentInColumnContainerTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_paragraphsInsideContainer.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_paragraphsInsideContainer.pdf index 9971bb3af..036ba081b 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_paragraphsInsideContainer.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnWidthTest/cmp_paragraphsInsideContainer.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_columnsAndWidthPropertyTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_columnsAndWidthPropertyTest.pdf index d5fb7be0e..9424b6000 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_columnsAndWidthPropertyTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_columnsAndWidthPropertyTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_formMultiPageTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_formMultiPageTest.pdf index ba4858f01..c25eeec39 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_formMultiPageTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_formMultiPageTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_mixedElementsTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_mixedElementsTest.pdf index 391816c1a..f6ecddf0d 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_mixedElementsTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_mixedElementsTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_nestedColCColWContentTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_nestedColCColWContentTest.pdf index 6ad05bee4..3231387ef 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_nestedColCColWContentTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_nestedColCColWContentTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_nestedColContentTest.pdf b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_nestedColContentTest.pdf index 84b623755..9e8075d7e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_nestedColContentTest.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnsTest/cmp_nestedColContentTest.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/abs-pos-grid-container-parent-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/abs-pos-grid-container-parent-001.html new file mode 100644 index 000000000..30d556a47 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/abs-pos-grid-container-parent-001.html @@ -0,0 +1,112 @@ + + +CSS Grid Layout Test: Absolute positioning grid container parent + + + + + + + + +
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/abs-pos-grid-container-parent-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/abs-pos-grid-container-parent-001.pdf new file mode 100644 index 000000000..1168d9bad Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/abs-pos-grid-container-parent-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/absolute-positioning-definite-sizes-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/absolute-positioning-definite-sizes-001.html new file mode 100644 index 000000000..014396d49 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/absolute-positioning-definite-sizes-001.html @@ -0,0 +1,51 @@ + + +CSS Grid Layout Test: Absolute positioning definite sizes + + + + + + + + + + + + + +
+ +
+
XXX X
+
XX XXX XX
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/absolute-positioning-definite-sizes-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/absolute-positioning-definite-sizes-001.pdf new file mode 100644 index 000000000..15b1c8787 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/absolute-positioning-definite-sizes-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/absolute-positioning-grid-container-parent-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/absolute-positioning-grid-container-parent-002.pdf new file mode 100644 index 000000000..374edda15 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/absolute-positioning-grid-container-parent-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/descendant-static-position-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/descendant-static-position-001.html new file mode 100644 index 000000000..ec19e4acf --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/descendant-static-position-001.html @@ -0,0 +1,90 @@ + + + +CSS Grid Layout Test: Grid aligned descendants with static position + + + + + + + +There should be no red: + +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ + + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/descendant-static-position-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/descendant-static-position-001.pdf new file mode 100644 index 000000000..95a71a730 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/descendant-static-position-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/descendant-static-position-002.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/descendant-static-position-002.html new file mode 100644 index 000000000..97fa299c0 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/descendant-static-position-002.html @@ -0,0 +1,101 @@ + + + +CSS Grid Layout Test: Grid aligned descendants with static position (direction: rtl) + + + + + + + +There should be no red: + +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ + + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/descendant-static-position-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/descendant-static-position-002.pdf new file mode 100644 index 000000000..f7d013246 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/descendant-static-position-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-001.html new file mode 100644 index 000000000..8fd4eca36 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-001.html @@ -0,0 +1,95 @@ + + + + + + CSS Test: Static position of abspos children in a grid container, with various "align-self" values + + + + + + +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-001.pdf new file mode 100644 index 000000000..09ac1e80c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-img-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-img-001.html new file mode 100644 index 000000000..05e036ace --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-img-001.html @@ -0,0 +1,122 @@ + + + + + + CSS Test: Static position of abspos replaced children in a grid container, with various "align-self" values + + + + + + +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-img-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-img-001.pdf new file mode 100644 index 000000000..ea4567149 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-img-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-001.html new file mode 100644 index 000000000..31def24fe --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-001.html @@ -0,0 +1,99 @@ + + + + + + CSS Test: Static position of abspos children in a RTL grid container, with various "align-self" values + + + + + + +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-001.pdf new file mode 100644 index 000000000..0aa687d45 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-002.pdf new file mode 100644 index 000000000..d2e50516b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-003.pdf new file mode 100644 index 000000000..1e91062f9 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-004.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-004.html new file mode 100644 index 000000000..12805427e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-004.html @@ -0,0 +1,99 @@ + + + + + + CSS Test: Static position of abspos LTR children in a RTL static-pos grid container, with various "align-self" values + + + + + + +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-004.pdf new file mode 100644 index 000000000..4fee845e4 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-last-baseline-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-last-baseline-002.pdf new file mode 100644 index 000000000..68ad9caf2 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-last-baseline-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-last-baseline-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-last-baseline-003.pdf new file mode 100644 index 000000000..35d3e183f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-rtl-last-baseline-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-safe-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-safe-001.html new file mode 100644 index 000000000..58ccaaf01 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-safe-001.html @@ -0,0 +1,55 @@ + + + + + + CSS Test: Testing safe overflow-position for align-self and justify-self in absolutely positioned boxes in grid containers in both horizontal and vertical writing modes + + + + + + +
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-safe-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-safe-001.pdf new file mode 100644 index 000000000..4ddd8c67f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-safe-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-001.html new file mode 100644 index 000000000..2feeb2c3a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-001.html @@ -0,0 +1,100 @@ + + + + + + CSS Test: Static position of abspos children in a vertical-rl grid container, with various "align-self" values + + + + + + +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-001.pdf new file mode 100644 index 000000000..f747635b3 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-002.pdf new file mode 100644 index 000000000..98343e0cb Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-003.pdf new file mode 100644 index 000000000..445f43629 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-004.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-004.html new file mode 100644 index 000000000..84e9265aa --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-004.html @@ -0,0 +1,100 @@ + + + + + + CSS Test: Static position of abspos horizontal-tb children in a static-pos vertical-rl grid container, with various "align-self" values + + + + + + +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-004.pdf new file mode 100644 index 000000000..0f4793b61 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-last-baseline-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-last-baseline-002.pdf new file mode 100644 index 000000000..45dee022c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-last-baseline-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-last-baseline-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-last-baseline-003.pdf new file mode 100644 index 000000000..0928eb4c9 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-align-self-vertWM-last-baseline-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-001.html new file mode 100644 index 000000000..3f9a59f6b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-001.html @@ -0,0 +1,100 @@ + + + + + + CSS Test: Static position of abspos children in a grid container, with various "justify-self" values + + + + + + +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-001.pdf new file mode 100644 index 000000000..f7cc42a5e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-002.pdf new file mode 100644 index 000000000..3a9ac2b00 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-001.html new file mode 100644 index 000000000..6ecbcb20a --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-001.html @@ -0,0 +1,122 @@ + + + + + + CSS Test: Static position of abspos replaced children in a grid container, with various "justify-self" values + + + + + + +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-001.pdf new file mode 100644 index 000000000..978d208e3 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-002.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-002.html new file mode 100644 index 000000000..1ce8b3856 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-002.html @@ -0,0 +1,121 @@ + + + + + + CSS Test: Static position of abspos replaced children in a static-pos grid container, with various "justify-self" values + + + + + + +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-002.pdf new file mode 100644 index 000000000..8a8d71c77 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-last-baseline-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-last-baseline-002.pdf new file mode 100644 index 000000000..5cd20dc5a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-img-last-baseline-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-001.html new file mode 100644 index 000000000..3080c4945 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-001.html @@ -0,0 +1,100 @@ + + + + + + CSS Test: Static position of abspos children in a RTL grid container, with various "justify-self" values + + + + + + +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-001.pdf new file mode 100644 index 000000000..2fad16734 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-002.pdf new file mode 100644 index 000000000..a370df766 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-003.pdf new file mode 100644 index 000000000..178685325 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-004.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-004.html new file mode 100644 index 000000000..a8647bbe8 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-004.html @@ -0,0 +1,100 @@ + + + + + + CSS Test: Static position of abspos LTR children in a RTL static-pos grid container, with various "justify-self" values + + + + + + +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-004.pdf new file mode 100644 index 000000000..53b50455b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-last-baseline-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-last-baseline-002.pdf new file mode 100644 index 000000000..44bde7d60 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-last-baseline-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-last-baseline-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-last-baseline-003.pdf new file mode 100644 index 000000000..74c2c6046 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-rtl-last-baseline-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-001.html new file mode 100644 index 000000000..ef5af105f --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-001.html @@ -0,0 +1,99 @@ + + + + + + CSS Test: Static position of abspos children in a vertical-rl grid container, with various "justify-self" values + + + + + + +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-001.pdf new file mode 100644 index 000000000..92b89af6a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-002.pdf new file mode 100644 index 000000000..4155c489c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-003.pdf new file mode 100644 index 000000000..51dbbb91d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-004.pdf new file mode 100644 index 000000000..7c483dd74 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-last-baseline-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-last-baseline-002.pdf new file mode 100644 index 000000000..f66cb682f Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-last-baseline-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-last-baseline-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-last-baseline-003.pdf new file mode 100644 index 000000000..b82bd3abe Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-last-baseline-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-last-baseline-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-last-baseline-004.pdf new file mode 100644 index 000000000..ec8090786 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-abspos-staticpos-justify-self-vertWM-last-baseline-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-paint-positioned-children-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-paint-positioned-children-001.html new file mode 100644 index 000000000..7f91dc31b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-paint-positioned-children-001.html @@ -0,0 +1,40 @@ + + +CSS Grid Layout Test: Grid paint positioned children + + + + + + +

This test passes if you see a gray box with a black border color with 5 rectangles inside. The first line contains a purple, orange, yellow and magenta boxes. Bellow them you should see a 90px cyan box.

+ +
+
+
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-paint-positioned-children-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-paint-positioned-children-001.pdf new file mode 100644 index 000000000..c185386b0 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-paint-positioned-children-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-001.html new file mode 100644 index 000000000..ff0c04e24 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-001.html @@ -0,0 +1,53 @@ + + + +CSS Grid Layout Test: Grid positioned item dynamic change + + + + + + +

Test passes if there is a filled green square and no red.

+ +
+
+
+
+
+
+
+ + + + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-001.pdf new file mode 100644 index 000000000..c5775966b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-002.pdf new file mode 100644 index 000000000..04dbdc2b1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-004.pdf new file mode 100644 index 000000000..2a0fd4124 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-006.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-006.pdf new file mode 100644 index 000000000..0342fbe8d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-item-dynamic-change-006.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-items-background-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-items-background-001.html new file mode 100644 index 000000000..515c2632b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-items-background-001.html @@ -0,0 +1,79 @@ + + +CSS Grid Layout Test: Grid positioned items background + + + + + + + + +

The test passes if you see 4 green boxes and no red.

+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-items-background-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-items-background-001.pdf new file mode 100644 index 000000000..ced1c4748 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/grid-positioned-items-background-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-001.html new file mode 100644 index 000000000..54f937def --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-001.html @@ -0,0 +1,58 @@ + + +CSS Grid Layout Test: Orthogonal positioned grid items + + + + + + +

The test passes if it has the same output than the reference.

+ +
+
First item
+
Second item
+
Third item
+
Fourth item
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-001.pdf new file mode 100644 index 000000000..6f916faee Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-002.pdf new file mode 100644 index 000000000..df15ae9ba Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-003.pdf new file mode 100644 index 000000000..415972234 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-004.pdf new file mode 100644 index 000000000..a17970039 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-005.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-005.pdf new file mode 100644 index 000000000..0cb89c6ed Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-005.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-006.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-006.pdf new file mode 100644 index 000000000..87511baaf Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-006.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-007.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-007.pdf new file mode 100644 index 000000000..da67e13e9 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-007.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-008.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-008.pdf new file mode 100644 index 000000000..5119fd953 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-008.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-009.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-009.pdf new file mode 100644 index 000000000..c2023787d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-009.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-010.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-010.pdf new file mode 100644 index 000000000..c6249045d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-010.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-011.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-011.pdf new file mode 100644 index 000000000..3a1979b09 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-011.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-012.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-012.pdf new file mode 100644 index 000000000..2d7ea7b44 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-012.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-013.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-013.pdf new file mode 100644 index 000000000..a2aef04f9 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-013.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-014.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-014.pdf new file mode 100644 index 000000000..72412798b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-014.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-015.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-015.pdf new file mode 100644 index 000000000..b9e8f23be Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-015.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-016.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-016.pdf new file mode 100644 index 000000000..3be8552b9 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-016.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-017.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-017.html new file mode 100644 index 000000000..f0f91ec32 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-017.html @@ -0,0 +1,62 @@ + + +CSS Grid Layout Test: Orthogonal positioned grid items + + + + + + +

The test passes if it has the same output than the reference.

+ +
+
First item
+
Second item
+
Third item
+
Fourth item
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-017.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-017.pdf new file mode 100644 index 000000000..e557d6199 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/orthogonal-positioned-grid-items-017.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-001.html new file mode 100644 index 000000000..48dee4bfc --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-001.html @@ -0,0 +1,57 @@ + + +CSS Grid Layout Test: Positioned grid items + + + + + + +

The test passes if it has the same output than the reference.

+ +
+
First item
+
Second item
+
Third item
+
Fourth item
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-001.pdf new file mode 100644 index 000000000..f791744a6 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-004.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-004.html new file mode 100644 index 000000000..525fe0571 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-004.html @@ -0,0 +1,59 @@ + + +CSS Grid Layout Test: Positioned grid items + + + + + + +

The test passes if it has the same output than the reference.

+ +
+
First item
+
Second item
+
Third item
+
Fourth item
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-004.pdf new file mode 100644 index 000000000..ca1e51269 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-009.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-009.pdf new file mode 100644 index 000000000..f64e87e0e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-009.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-017.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-017.pdf new file mode 100644 index 000000000..e511da03d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-017.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-025.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-025.html new file mode 100644 index 000000000..d4c1b01a5 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-025.html @@ -0,0 +1,34 @@ + + + +CSS Grid Layout Test: Positioned grid items + + + + + +
+
+
+
+ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-025.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-025.pdf new file mode 100644 index 000000000..2b3276454 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-025.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-negative-indices-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-negative-indices-001.html new file mode 100644 index 000000000..f723b2486 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-negative-indices-001.html @@ -0,0 +1,55 @@ + + +CSS Grid Layout Test: Absolutely positioned items with negative indices + + + + + +

The test passes if it has the same output than the reference.

+
+
First item
+
Second item
+
Third item
+
Fourth item
+
\ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-negative-indices-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-negative-indices-001.pdf new file mode 100644 index 000000000..b6b8eca1a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-negative-indices-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-negative-indices-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-negative-indices-002.pdf new file mode 100644 index 000000000..d3333aa10 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-negative-indices-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-negative-indices-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-negative-indices-003.pdf new file mode 100644 index 000000000..08c5054e8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/abspos/positioned-grid-items-negative-indices-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-001.html new file mode 100644 index 000000000..a03ce153b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-001.html @@ -0,0 +1,69 @@ + + + + + + + + + +
+
line1
line2
+
line1
line2
+
line1
line2
+
line1
line2
+
line1
line2
+
line1
line2
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-001.pdf new file mode 100644 index 000000000..0baaef00b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-grid-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-grid-001.html new file mode 100644 index 000000000..d59e70601 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-grid-001.html @@ -0,0 +1,112 @@ + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-grid-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-grid-001.pdf new file mode 100644 index 000000000..0bb956f4e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-grid-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-multicol-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-multicol-001.html new file mode 100644 index 000000000..d7d6faabb --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-multicol-001.html @@ -0,0 +1,143 @@ + + + + + + + + + +
+
+
+
+

+
+
+

+
+
+

+
+
+
+ +
+
+
+
+

+
+
+

+
+
+

+
+
+
+ + +
+
+
+
+
+
+
+

+
+
+

+
+
+

+
+
+
+ +
+
+
+
+
+
+
+

+
+
+

+
+
+

+
+
+
+ + +
+
+
+
+

+
+
+

+
+
+

+
+
+
+
+
+
+ +
+
+
+
+

+
+
+

+
+
+

+
+
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-multicol-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-multicol-001.pdf new file mode 100644 index 000000000..5d6737785 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-multicol-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-overflow-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-overflow-001.html new file mode 100644 index 000000000..66f9eb1bc --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-overflow-001.html @@ -0,0 +1,91 @@ + + + + + + + + +
+

+
+
+
+
+
+
+ +
+

+
+
+
+
+
+
+ +
+

+
+
+
+
+
+
+ +
+

+
+
+
+
+
+
+ +
+

+
+
+
+
+
+
+ +
+

+
+
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-overflow-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-overflow-001.pdf new file mode 100644 index 000000000..14caf88c1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-overflow-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-vertical.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-vertical.html new file mode 100644 index 000000000..88fc79276 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-vertical.html @@ -0,0 +1,129 @@ + + +CSS Grid Layout Test: grid align baseline vertical + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+ +
+
ahem
+
+
+
+
+
+ +
+
ahem
+

+
+
+
+ +
+
ahem
+
+
+
+
+
+ +
+
ahem
+

+
+
+
+ +
+ + + + + + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-vertical.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-vertical.pdf new file mode 100644 index 000000000..d08263964 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-baseline-vertical.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-distribution.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-distribution.html new file mode 100644 index 000000000..caa9e912e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-distribution.html @@ -0,0 +1,338 @@ + +CSS Grid Layout Test: aligned content distribution + + + + + + + + + + + + + + + + + +

This test checks that the align-content property is applied correctly when using content-distribution values.

+ +
+

direction: LTR | align-content: 'space-between'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'space-around'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'space-evenly'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'stretch'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'space-between'

+
+
+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'space-around'

+
+
+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'space-evenly'

+
+
+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'stretch'

+
+
+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'space-between'

+
+
+
+
+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'space-around'

+
+
+
+
+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'space-evenly'

+
+
+
+
+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'stretch'

+
+
+
+
+
+
+
+
+
+
+
+ + +
+

direction: RTL | align-content: 'space-between'

+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'space-around'

+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'space-evenly'

+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'stretch'

+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'space-between'

+
+
+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'space-around'

+
+
+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'space-evenly'

+
+
+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'stretch'

+
+
+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'space-between'

+
+
+
+
+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'space-around'

+
+
+
+
+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'space-evenly'

+
+
+
+
+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'stretch'

+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-distribution.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-distribution.pdf new file mode 100644 index 000000000..da5a3676a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-distribution.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-vertical-lr.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-vertical-lr.html new file mode 100644 index 000000000..4639ea130 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-vertical-lr.html @@ -0,0 +1,100 @@ + + +CSS Grid Layout test: align-content in vertical-lr + + + + + + + + + + + + + + + + + + + +
+

direction: LTR | align-content: 'center'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'start'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'end'

+
+
+
+
+
+
+
+ + +
+

direction: RTL | align-content: 'center'

+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'start'

+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'end'

+
+
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-vertical-lr.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-vertical-lr.pdf new file mode 100644 index 000000000..ac96607ad Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-vertical-lr.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-vertical-rl.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-vertical-rl.html new file mode 100644 index 000000000..8c57183e9 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-vertical-rl.html @@ -0,0 +1,101 @@ + + +CSS Grid Layout test: align-content in vertical-rl + + + + + + + + + + + + + + + + + + + + +
+

direction: LTR | align-content: 'center'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'start'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'end'

+
+
+
+
+
+
+
+ + +
+

direction: RTL | align-content: 'center'

+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'start'

+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'end'

+
+
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-vertical-rl.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-vertical-rl.pdf new file mode 100644 index 000000000..99430e56a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content-vertical-rl.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content.html new file mode 100644 index 000000000..6b60f3e4e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content.html @@ -0,0 +1,177 @@ + + +CSS Grid Layout test: align-content property + + + + + + + + + + + + + + + + + + +
+

direction: LTR | align-content: 'center'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'left'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'right'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'start'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'end'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'flex-start'

+
+
+
+
+
+
+
+ +
+

direction: LTR | align-content: 'flex-end

+
+
+
+
+
+
+
+ + +
+

direction: LTR | align-content: 'auto' (resolved to 'start')

+
+
+
+
+
+
+
+ + +
+

direction: RTL | align-content: 'center'

+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'left'

+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'right'

+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'start'

+
+
+
+
+
+
+
+ +
+

direction: RTL | align-content: 'end'

+
+
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content.pdf new file mode 100644 index 000000000..b222abc6a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-align-content.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-content-distribution-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-content-distribution-001.html new file mode 100644 index 000000000..7b53a2897 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-content-distribution-001.html @@ -0,0 +1,44 @@ + + +CSS Grid Layout Test: Content Distribution 'space-evenly' on 2x2 grid + + + + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-content-distribution-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-content-distribution-001.pdf new file mode 100644 index 000000000..9a50a7291 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-content-distribution-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-content-distribution-015.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-content-distribution-015.html new file mode 100644 index 000000000..ef4c857db --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-content-distribution-015.html @@ -0,0 +1,54 @@ + + +CSS Grid Layout Test: Content Distribution 'space-between' and gaps on 4x4 grid + + + + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-content-distribution-015.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-content-distribution-015.pdf new file mode 100644 index 000000000..b808ff0fa Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-content-distribution-015.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-gutters-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-gutters-001.html new file mode 100644 index 000000000..310aa4322 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-gutters-001.html @@ -0,0 +1,29 @@ + + +CSS Grid Layout Test: Support for gap shorthand property of row-gap and column-gap + + + + + + +

The test passes if it has the same visual effect as reference.

+
+
+
+
+
+
\ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-gutters-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-gutters-001.pdf new file mode 100644 index 000000000..ac155609c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-gutters-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-gutters-005.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-gutters-005.html new file mode 100644 index 000000000..cc67190af --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-gutters-005.html @@ -0,0 +1,30 @@ + + +CSS Grid Layout Test: Support for row-gap and column-gap properties + + + + + + +

The test passes if it has the same visual effect as reference.

+
+
+
+
+
+
\ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-gutters-005.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-gutters-005.pdf new file mode 100644 index 000000000..a032072ce Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-gutters-005.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-item-auto-margins-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-item-auto-margins-001.html new file mode 100644 index 000000000..be5eb6efb --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-item-auto-margins-001.html @@ -0,0 +1,23 @@ + + + + + +

Test passes if there is a filled green square and no red.

+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-item-auto-margins-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-item-auto-margins-001.pdf new file mode 100644 index 000000000..f7807f92d Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/alignment/grid-item-auto-margins-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/empty-grid-within-flexbox.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/empty-grid-within-flexbox.html new file mode 100644 index 000000000..ee6748647 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/empty-grid-within-flexbox.html @@ -0,0 +1,33 @@ + + +CSS Grid Layout Test: Sizing of an empty grid within a flexbox + + + + + + +

Test passes if there is a filled green square and no red.

+ +
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/empty-grid-within-flexbox.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/empty-grid-within-flexbox.pdf new file mode 100644 index 000000000..aad9ed18c Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/empty-grid-within-flexbox.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-important.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-important.html new file mode 100644 index 000000000..42896ed20 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-important.html @@ -0,0 +1,17 @@ + + + + CSS Grid: !important flag parsing + + + + + +
Some text.
+ + + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-important.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-important.pdf new file mode 100644 index 000000000..8e3e356d1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-important.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-item-non-auto-height-stretch-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-item-non-auto-height-stretch-001.html new file mode 100644 index 000000000..458ed020e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-item-non-auto-height-stretch-001.html @@ -0,0 +1,22 @@ + +Grid items only stretch if block-size computes to auto + + + + + +
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-item-non-auto-height-stretch-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-item-non-auto-height-stretch-001.pdf new file mode 100644 index 000000000..e5a2abcba Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-item-non-auto-height-stretch-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-item-percentage-quirk-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-item-percentage-quirk-001.html new file mode 100644 index 000000000..0956b7a02 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-item-percentage-quirk-001.html @@ -0,0 +1,9 @@ + + + +

There should be a filled green square below, and no red.

+
+
+ +
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-item-percentage-quirk-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-item-percentage-quirk-001.pdf new file mode 100644 index 000000000..0965abe76 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-item-percentage-quirk-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-tracks-fractional-fr.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-tracks-fractional-fr.html new file mode 100644 index 000000000..6600cef65 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-tracks-fractional-fr.html @@ -0,0 +1,18 @@ + +Tests fractional fr-units which should multiply to whole numbers. + + + +
+
+
+
+
+ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-tracks-fractional-fr.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-tracks-fractional-fr.pdf new file mode 100644 index 000000000..477d46db8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-tracks-fractional-fr.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-within-flexbox-definite-change.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-within-flexbox-definite-change.html new file mode 100644 index 000000000..03b3e67b2 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-within-flexbox-definite-change.html @@ -0,0 +1,10 @@ + + + + +

Test passes if there is a filled green square.

+
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-within-flexbox-definite-change.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-within-flexbox-definite-change.pdf new file mode 100644 index 000000000..0aa06f866 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid-within-flexbox-definite-change.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/auto-repeat-pos-container-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/auto-repeat-pos-container-001.html new file mode 100644 index 000000000..7d65f6c54 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/auto-repeat-pos-container-001.html @@ -0,0 +1,41 @@ + +CSS Grid: auto-repeat tracks on a positioned grid container. + + + + + + + + +

Test passes if you get a grid with 5 rows of 20px and 4 columns of 25px.

+ +

+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/auto-repeat-pos-container-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/auto-repeat-pos-container-001.pdf new file mode 100644 index 000000000..b69ccfc3b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/auto-repeat-pos-container-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-max-size-002.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-max-size-002.html new file mode 100644 index 000000000..ae1e7e103 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-max-size-002.html @@ -0,0 +1,58 @@ + + +CSS Grid Layout Test: Auto repeat tracks and percentage max sizes + + + + + + + + + + +
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-max-size-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-max-size-002.pdf new file mode 100644 index 000000000..d67916691 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-max-size-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-min-max-size-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-min-max-size-001.html new file mode 100644 index 000000000..72ff3ace5 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-min-max-size-001.html @@ -0,0 +1,55 @@ + + +CSS Grid Layout Test: Auto repeat tracks with min and max sizes + + + + + + + + + + +
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-min-max-size-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-min-max-size-001.pdf new file mode 100644 index 000000000..1cd9e8868 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-min-max-size-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-min-size-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-min-size-001.html new file mode 100644 index 000000000..ba59ab3d0 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-min-size-001.html @@ -0,0 +1,85 @@ + + +CSS Grid Layout Test: Auto repeat tracks and min sizes + + + + + + + + + + +
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-min-size-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-min-size-001.pdf new file mode 100644 index 000000000..a23ada073 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-min-size-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-minmax.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-minmax.html new file mode 100644 index 000000000..f6c7af1e7 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-minmax.html @@ -0,0 +1,10 @@ + + + +

Test passes if there is a filled green square.

+
+
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-minmax.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-minmax.pdf new file mode 100644 index 000000000..8850d05d8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-minmax.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-multiple-values-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-multiple-values-001.html new file mode 100644 index 000000000..085d94996 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-multiple-values-001.html @@ -0,0 +1,55 @@ + + + + + + CSS Grid Layout Test: Auto Repaeat with Multiple Tracks and Gutters + + + + + + + +

The test passes if it has the same visual effect as reference.

+
+
+
+
+
+
+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-multiple-values-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-multiple-values-001.pdf new file mode 100644 index 000000000..057639d15 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-auto-repeat-multiple-values-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-layout-basic.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-layout-basic.html new file mode 100644 index 000000000..578f70173 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-layout-basic.html @@ -0,0 +1,43 @@ + + + + CSS Grid Layout Test: basic + + + + + + + +

The test passes if it has the same visual effect as reference.

+
+
 
+
 
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-layout-basic.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-layout-basic.pdf new file mode 100644 index 000000000..14d947019 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-layout-basic.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-layout-repeat-notation.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-layout-repeat-notation.html new file mode 100644 index 000000000..ac0273f83 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-layout-repeat-notation.html @@ -0,0 +1,56 @@ + + + + CSS Grid Layout Test: repeat notation + + + + + + + +

The test passes if it has the same visual effect as reference.

+
+
 
+
 
+
 
+
 
+
 
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-layout-repeat-notation.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-layout-repeat-notation.pdf new file mode 100644 index 000000000..80226d00b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-layout-repeat-notation.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-support-named-grid-lines-002.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-support-named-grid-lines-002.html new file mode 100644 index 000000000..6b3b19ef9 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-support-named-grid-lines-002.html @@ -0,0 +1,219 @@ + + +CSS Grid Layout Test: Support for named grid lines when 'grid-template-columns' and 'grid-template-rows' have multiple values inside of a repeat. + + + + + + +

The test passes if it has the same visual effect as reference.

+ + +
+
+
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-support-named-grid-lines-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-support-named-grid-lines-002.pdf new file mode 100644 index 000000000..bd98abc87 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-support-named-grid-lines-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-template-columns-fit-content-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-template-columns-fit-content-001.html new file mode 100644 index 000000000..ddff3cf7b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-template-columns-fit-content-001.html @@ -0,0 +1,358 @@ + + + +CSS Grid Layout Test: grid-template-columns fit-content() + + + + + + + + + +

The test passes if it has the same output than the reference.

+ +
+

Only fit-content() and with fixed size tracks.

+
+
XXX
+
+
+ +
+
XXX
+
XXX
+
+
+
+ +
+
XXX XXX
+
+
+ +
+
XXX XXX
+
+
+
+ +
+
XXX XXX
+
XXX XXX
+
+
+
+ +
+
XXX XXX XXX
+
+
+ +
+
XXX XXX XXX
+
+
+
+ +
+
XXX XXX XXX
+
XXX XXX XXX
+
+
+
+ +
+
XXX XX XXX
+
+
+
+ +
+
XXXXX
+
XXX XX XXX
+
+
+
+ +
+
XXXXX
+
XXX XX XXX
+
+
+
+ +
+ +
+

fit-content() with other content-sized tracks.

+
+
XXX XX XXX
+
+
+
+ +
+
XXXXX
+
XXX XX XXX
+
+
+
+ +
+
XXXXX
+
XXX XX XXX
+
+
+
+ +
+
XXX XX XXX
+
+
+
+ +
+
XXXXX
+
XXX XX XXX
+
+
+
+ +
+
XXXXX
+
XXX XX XXX
+
+
+
+ +
+
XXX XX XXX
+
+
+
+
+ +
+
XXX XX XXX
+
+
+
+
+ +
+
XXX XX XXX
+
+
+
+
+ +
+
XXX XX
+
XXX XX XXX
+
+
+
+
+ +
+
XXX XX
+
XXX XX XXX
+
+
+
+
+ +
+
XXX XX
+
XXX XX XXX
+
+
+
+
+
+ +
+

fit-content() with percentage arguments.

+
+
XXX
+
+
+ +
+
XXX
+
XXX
+
+
+
+ +
+
XX XX
+
+
+ +
+
XXX XXX
+
+
+
+ +
+
X X X
+
XXX XXX
+
+
+
+ +
+
XXX XXX XXX
+
+
+ +
+
XXX XXX XXX
+
+
+
+ +
+
XXX XXX XXX
+
XXX XXX XXX
+
+
+
+
+ +
+

max-content < fit-content() argument.

+ +
+
XXX XXX
+
+
+ +
+
XXX XXX
+
+
+
+ +
+
XXX XXX
+
XXX XXX
+
+
+
+ +
+
XXX XXX
+
+
+
+ +
+
XX
+
XXX XXX
+
+
+
+ +
+
XX XX XX XX
+
XXX XXX
+
+
+
+ +
+
XX XX XX XX
+
XXX XXX
+
+
+
+ +
+
XX XX XX XX
+
XXX XXX
+
+
+
+
+ +
+
XX XX XX XX
+
XXX XXX
+
+
+
+
+ +
+
XX XX XX XX
+
XXX XXX
+
+
+
+
+ +
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-template-columns-fit-content-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-template-columns-fit-content-001.pdf new file mode 100644 index 000000000..ac36f620e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-template-columns-fit-content-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-template-rows-fit-content-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-template-rows-fit-content-001.html new file mode 100644 index 000000000..8ae57cdf6 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-template-rows-fit-content-001.html @@ -0,0 +1,358 @@ + + + +CSS Grid Layout Test: grid-template-rows fit-content() + + + + + + + + + +

The test passes if it has the same output than the reference.

+ +
+
XXX
+
+
+ +
+
XXX
+
XXX
+
+
+
+ +
+
XXX XXX
+
+
+ +
+
XXX XXX
+
+
+
+ +
+
XXX XXX
+
XXX XXX
+
+
+
+ +
+
XXX XXX XXX
+
+
+ +
+
XXX XXX XXX
+
+
+
+ +
+
XXX XXX XXX
+
XXX XXX XXX
+
+
+
+ +
+
XXX XX XXX
+
+
+
+ +
+
XXXXX
+
XXX XX XXX
+
+
+
+ +
+
XXXXX
+
XXX XX XXX
+
+
+
+
+ +
+
+ +
+
XXX XX XXX
+
+
+
+ +
+
XXXXX
+
XXX XX XXX
+
+
+
+ +
+
XXXXX
+
XXX XX XXX
+
+
+
+ +
+
XXX XX XXX
+
+
+
+ +
+
XXXXX
+
XXX XX XXX
+
+
+
+ +
+
XXXXX
+
XXX XX XXX
+
+
+
+ +
+
XXX XX XXX
+
+
+
+
+ +
+
XXX XX XXX
+
+
+
+
+ +
+
XXX XX XXX
+
+
+
+
+ +
+
XXX XX
+
XXX XX XXX
+
+
+
+
+ +
+
XXX XX
+
XXX XX XXX
+
+
+
+
+ +
+
XXX XX
+
XXX XX XXX
+
+
+
+
+ +
+
+ +
+
XXX
+
+
+ +
+
XXX
+
XXX
+
+
+
+ +
+
XX XX
+
+
+ +
+
XXX XXX
+
+
+
+ +
+
X X X
+
XXX XXX
+
+
+
+ +
+
XXX XXX XXX
+
+
+ +
+
XXX XXX XXX
+
+
+
+ +
+
XXX XXX XXX
+
XXX XXX XXX
+
+
+
+ +
+
+ +
+
XXX XXX
+
+
+ +
+
XXX XXX
+
+
+
+ +
+
XXX XXX
+
XXX XXX
+
+
+
+ +
+
XXX XXX
+
+
+
+ +
+
XX
+
XXX XXX
+
+
+
+ +
+
XX XX XX XX
+
XXX XXX
+
+
+
+ +
+
XX XX XX XX
+
XXX XXX
+
+
+
+ +
+
XX XX XX XX
+
XXX XXX
+
+
+
+
+ +
+
XX XX XX XX
+
XXX XXX
+
+
+
+
+ +
+
XX XX XX XX
+
XXX XXX
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-template-rows-fit-content-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-template-rows-fit-content-001.pdf new file mode 100644 index 000000000..2155b459a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_definition/grid-template-rows-fit-content-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-img-item-percent-max-height-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-img-item-percent-max-height-001.html new file mode 100644 index 000000000..375ed2908 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-img-item-percent-max-height-001.html @@ -0,0 +1,13 @@ + + +CSS Grid Layout Test: % max height of grid items + + + + + +

Test passes if there is a filled green square.

+ +
+ +
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-img-item-percent-max-height-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-img-item-percent-max-height-001.pdf new file mode 100644 index 000000000..9c099a8d4 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-img-item-percent-max-height-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-item-containing-block-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-item-containing-block-001.html new file mode 100644 index 000000000..1dca0dcaa --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-item-containing-block-001.html @@ -0,0 +1,37 @@ + + +CSS Grid Layout Test: Grid item sizing + + + + + + +

Test passes if there is a filled green square and no red.

+ +
+
+
+
+
+ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-item-containing-block-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-item-containing-block-001.pdf new file mode 100644 index 000000000..1c60d182a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-item-containing-block-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-item-flex-container-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-item-flex-container-001.html new file mode 100644 index 000000000..56c999c55 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-item-flex-container-001.html @@ -0,0 +1,132 @@ + + +CSS Grid Layout Test: Grid item which is also a flex container + + + + + + + + +
+ +
grid-template-rows: minmax(auto, auto);
+ +
+
+
+
+
+
+
+ +
grid-template-rows: minmax(min-content, auto);
+ +
+
+
+
+
+
+
+ +
grid-template-rows: minmax(max-content, auto);
+ +
+
+
+
+
+
+
+ +
grid-template-rows: minmax(auto, min-content);
+ +
+
+
+
+
+
+
+ +
grid-template-rows: minmax(min-content, min-content);
+ +
+
+
+
+
+
+
+ +
grid-template-rows: minmax(max-content, min-content);
+ +
+
+
+
+
+
+
+ +
grid-template-rows: minmax(auto, max-content);
+ +
+
+
+
+
+
+
+ +
grid-template-rows: minmax(min-content, max-content);
+ +
+
+
+
+
+
+
+ +
grid-template-rows: minmax(max-content, max-content);
+ +
+
+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-item-flex-container-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-item-flex-container-001.pdf new file mode 100644 index 000000000..21fc14793 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-item-flex-container-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-minimum-size-grid-items-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-minimum-size-grid-items-001.html new file mode 100644 index 000000000..2abb4b0a5 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-minimum-size-grid-items-001.html @@ -0,0 +1,37 @@ + + +CSS Grid Layout Test: Minimum size of grid items + + + + + + + +

Test passes if there is a filled green square and no red.

+ +
+
+
IT E
+
+ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-minimum-size-grid-items-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-minimum-size-grid-items-001.pdf new file mode 100644 index 000000000..d5244aa79 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-minimum-size-grid-items-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-minimum-size-grid-items-006.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-minimum-size-grid-items-006.html new file mode 100644 index 000000000..7ff6bfd2b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-minimum-size-grid-items-006.html @@ -0,0 +1,34 @@ + + +CSS Grid Layout Test: Minimum size of grid items + + + + + + +

Test passes if there is a filled green square and no red.

+ +
+
+ Image download support must be enabled +
+ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-minimum-size-grid-items-006.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-minimum-size-grid-items-006.pdf new file mode 100644 index 000000000..fe04ad2cd Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-minimum-size-grid-items-006.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-order-property-auto-placement-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-order-property-auto-placement-001.html new file mode 100644 index 000000000..c66d35a2f --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-order-property-auto-placement-001.html @@ -0,0 +1,55 @@ + + +CSS Grid Layout Test: 'order' property affects grid items auto-placement position + + + + + + + +

Test passes if there are four filled squares with the same size and no red.

+

Blue and yellow squares in the first line; lime and magenta squares in the second line (exactly in this order).

+ +
+
+
M
+
L
+
Y
+
B
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-order-property-auto-placement-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-order-property-auto-placement-001.pdf new file mode 100644 index 000000000..825f31fbd Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/grid-order-property-auto-placement-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/overflow-auto-max-height-percentage.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/overflow-auto-max-height-percentage.html new file mode 100644 index 000000000..62273b87e --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/overflow-auto-max-height-percentage.html @@ -0,0 +1,69 @@ + + + + + Testcase for bug 1526567 + + + + + + + + + +
+ +
+ + + + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/overflow-auto-max-height-percentage.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/overflow-auto-max-height-percentage.pdf new file mode 100644 index 000000000..3e593a02b Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/overflow-auto-max-height-percentage.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/table-with-infinite-max-intrinsic-width.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/table-with-infinite-max-intrinsic-width.html new file mode 100644 index 000000000..877e982cd --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/table-with-infinite-max-intrinsic-width.html @@ -0,0 +1,14 @@ + +Table grid item with infinite max intrinsic inline size + + + +

Test passes if there is a filled green square.

+
+ + + + + +
  
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/table-with-infinite-max-intrinsic-width.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/table-with-infinite-max-intrinsic-width.pdf new file mode 100644 index 000000000..5032bd674 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_items/table-with-infinite-max-intrinsic-width.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/display-grid.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/display-grid.html new file mode 100644 index 000000000..7c6b74332 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/display-grid.html @@ -0,0 +1,107 @@ + + + + CSS Grid Layout: display: grid + + + + + + + + +

Test passes if there are 4 green rectangles and no red.

+ +
+
+
cell1
+
cell2
+
cell3
+
cell4
+
+
+ + + + + + + + + + + +
cell1cell2
cell3cell4
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/display-grid.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/display-grid.pdf new file mode 100644 index 000000000..dff8a97f1 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/display-grid.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-container-ignores-first-letter-002.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-container-ignores-first-letter-002.html new file mode 100644 index 000000000..42014addf --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-container-ignores-first-letter-002.html @@ -0,0 +1,17 @@ + + +CSS Grid Layout Test: '::first-letter' is ignored in button grid containers + + + + + + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-container-ignores-first-letter-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-container-ignores-first-letter-002.pdf new file mode 100644 index 000000000..e3388ffbf Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-container-ignores-first-letter-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-float-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-float-001.html new file mode 100644 index 000000000..521a3bd6c --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-float-001.html @@ -0,0 +1,39 @@ + + +CSS Grid Layout Test: 'float' has no effect on grid items + + + + + + +

Test passes if there is a filled green square and no red.

+ +
+ +
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-float-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-float-001.pdf new file mode 100644 index 000000000..35e72d24a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-float-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-float-002.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-float-002.html new file mode 100644 index 000000000..63532585d --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-float-002.html @@ -0,0 +1,37 @@ + + +CSS Grid Layout Test: 'float' and 'clear' have no effect on a grid item. + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+ + + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-float-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-float-002.pdf new file mode 100644 index 000000000..093f38250 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-float-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-floats-no-intrude-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-floats-no-intrude-001.html new file mode 100644 index 000000000..31eab4ba6 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-floats-no-intrude-001.html @@ -0,0 +1,35 @@ + + +CSS Grid Layout Test: floats do not intrude into a grid + + + + +

Test passes if there is a filled green square and no red.

+ +
+ +
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-floats-no-intrude-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-floats-no-intrude-001.pdf new file mode 100644 index 000000000..d2c44b883 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-floats-no-intrude-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-margins-no-collapse-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-margins-no-collapse-001.html new file mode 100644 index 000000000..764cca9ce --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-margins-no-collapse-001.html @@ -0,0 +1,17 @@ + + +CSS Grid Layout Test: grid's margins do not collapse + + + + + +

This text should be green and body and paragraph margins should not collapse.

diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-margins-no-collapse-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-margins-no-collapse-001.pdf new file mode 100644 index 000000000..2fe370185 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-margins-no-collapse-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-overflow-padding-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-overflow-padding-001.html new file mode 100644 index 000000000..a7e56b863 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-overflow-padding-001.html @@ -0,0 +1,22 @@ + + +CSS Grid Layout Test: Grid padding 'overflowing' the grid container size + + + + + + + + +

The test passes if you see a grey square below and both scrollbars are visible.

+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-overflow-padding-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-overflow-padding-001.pdf new file mode 100644 index 000000000..324fa3dc7 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/grid_model/grid-overflow-padding-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/grid-support-grid-auto-columns-rows-001.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/grid-support-grid-auto-columns-rows-001.html new file mode 100644 index 000000000..e61ced340 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/grid-support-grid-auto-columns-rows-001.html @@ -0,0 +1,40 @@ + + + + + CSS Grid Layout Test: Support for 'grid-auto-columns' and 'grid-auto-rows' properties + + + + + + +

The test passes if it has the same visual effect as reference.

+
+
+
+
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/grid-support-grid-auto-columns-rows-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/grid-support-grid-auto-columns-rows-001.pdf new file mode 100644 index 000000000..81c8ececd Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/grid-support-grid-auto-columns-rows-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/grid-support-grid-auto-columns-rows-002.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/grid-support-grid-auto-columns-rows-002.html new file mode 100644 index 000000000..2e90b4601 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/grid-support-grid-auto-columns-rows-002.html @@ -0,0 +1,59 @@ + + +CSS Grid Layout Test: Support for 'grid-auto-columns' and 'grid-auto-rows' accepting track listing as value + + + + + +

The test passes if it has the same visual effect as reference.

+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/grid-support-grid-auto-columns-rows-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/grid-support-grid-auto-columns-rows-002.pdf new file mode 100644 index 000000000..5cd8633cc Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/implicit_grids/grid-support-grid-auto-columns-rows-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/min-size-auto-overflow-clip.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/min-size-auto-overflow-clip.html new file mode 100644 index 000000000..3dfd2c18f --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/min-size-auto-overflow-clip.html @@ -0,0 +1,22 @@ + + + + + +overflow: visible and clip behave the same for min-size purposes + +
+
+
+
+
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/min-size-auto-overflow-clip.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/min-size-auto-overflow-clip.pdf new file mode 100644 index 000000000..094f16aed Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/min-size-auto-overflow-clip.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-grid-span.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-grid-span.html new file mode 100644 index 000000000..21aad9970 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-grid-span.html @@ -0,0 +1,43 @@ + + + + CSS Grid Layout Test: grid span + + + + + + + +

The test passes if it has the same visual effect as reference.

+
+
 
+
 
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-grid-span.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-grid-span.pdf new file mode 100644 index 000000000..7a6562ed6 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-grid-span.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-lines-shorthands.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-lines-shorthands.html new file mode 100644 index 000000000..756e08c44 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-lines-shorthands.html @@ -0,0 +1,41 @@ + + + + CSS Grid Layout Test: grid lines shorthands + + + + + + + +

The test passes if it has the same visual effect as reference.

+
+
 
+
 
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-lines-shorthands.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-lines-shorthands.pdf new file mode 100644 index 000000000..8acb68c23 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-lines-shorthands.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-lines.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-lines.html new file mode 100644 index 000000000..62bfc8d7b --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-lines.html @@ -0,0 +1,43 @@ + + + + CSS Grid Layout Test: grid lines + + + + + + + +

The test passes if it has the same visual effect as reference.

+
+
 
+
 
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-lines.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-lines.pdf new file mode 100644 index 000000000..80d612d66 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-lines.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-placement-shorthands.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-placement-shorthands.html new file mode 100644 index 000000000..be9867981 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-placement-shorthands.html @@ -0,0 +1,43 @@ + + + + CSS Grid Layout Test: placement shorthand + + + + + + + +

The test passes if it has the same visual effect as reference.

+
+
 
+
 
+
+ + diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-placement-shorthands.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-placement-shorthands.pdf new file mode 100644 index 000000000..8579e0e9e Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/placement/grid-layout-placement-shorthands.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-checkbox-input.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-checkbox-input.html new file mode 100644 index 000000000..c6a34a828 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-checkbox-input.html @@ -0,0 +1,6 @@ + + + +
+ +
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-checkbox-input.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-checkbox-input.pdf new file mode 100644 index 000000000..4461ed904 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-checkbox-input.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-radio-input.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-radio-input.html new file mode 100644 index 000000000..9ae9d7be0 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-radio-input.html @@ -0,0 +1,6 @@ + + + +
+ +
diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-radio-input.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-radio-input.pdf new file mode 100644 index 000000000..d5f642c7a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-radio-input.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-text-input-overflow.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-text-input-overflow.pdf new file mode 100644 index 000000000..d69d005c3 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/stretch-grid-item-text-input-overflow.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/tracks-stretched-diff-flex-factors-sum.html b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/tracks-stretched-diff-flex-factors-sum.html new file mode 100644 index 000000000..912cd0725 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/tracks-stretched-diff-flex-factors-sum.html @@ -0,0 +1,57 @@ + +CSS Grid: 'stretch' content alignment on flex tracks. + + + + + + + + + + + + + + +
+

When the sum of all track's flex factor is < 1, they don't exhaust the available space, which is used to stretch the 'auto' sized tracks.

+
+
+
+
+
+
+
+ +
+

When the sum of all track's flex factor is >= 1, they exhaust the available space, hence the 'stretch' alignment is not applied to the 'auto' sized tracks.

+
+
+
+
+
+
+
+ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/tracks-stretched-diff-flex-factors-sum.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/tracks-stretched-diff-flex-factors-sum.pdf new file mode 100644 index 000000000..a1153fd22 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_grid/tracks-stretched-diff-flex-factors-sum.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/abspos-after-spanner-static-pos.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/abspos-after-spanner-static-pos.pdf index 4eeaeb3c6..468862aa9 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/abspos-after-spanner-static-pos.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/abspos-after-spanner-static-pos.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/as-column-flex-item.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/as-column-flex-item.pdf index b8c1e004b..d90bd848b 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/as-column-flex-item.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/as-column-flex-item.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/balance-grid-container-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/balance-grid-container-ref.pdf index 4259a1628..62d83c551 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/balance-grid-container-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/balance-grid-container-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/balance-grid-container.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/balance-grid-container.pdf index 666d76e93..ffc644ba7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/balance-grid-container.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/balance-grid-container.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/column-break-inside-avoid-1-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/column-break-inside-avoid-1-ref.pdf index 64b8280ad..01768194e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/column-break-inside-avoid-1-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/column-break-inside-avoid-1-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/column-break-inside-avoid-1.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/column-break-inside-avoid-1.pdf index ad073e8c7..648b87c0e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/column-break-inside-avoid-1.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/column-break-inside-avoid-1.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/fixedpos-static-pos-with-viewport-cb-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/fixedpos-static-pos-with-viewport-cb-003.pdf index ee39aad0b..35fee5f93 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/fixedpos-static-pos-with-viewport-cb-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/fixedpos-static-pos-with-viewport-cb-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-005.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-005.pdf index c81d13001..593827303 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-005.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-005.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-006.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-006.pdf index 18585acdd..c7eb1ba63 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-006.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-006.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-007.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-007.pdf index 42d38b39f..f0d151cdb 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-007.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-007.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-008.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-008.pdf index 17c3fce51..cf3965325 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-008.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-basic-008.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-block-no-clip-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-block-no-clip-001.pdf index 810b04812..17613d991 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-block-no-clip-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-block-no-clip-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-block-no-clip-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-block-no-clip-002.pdf index 9b9220c45..3b6c1a128 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-block-no-clip-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-block-no-clip-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-001.pdf index d9291dccb..61e626518 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-002.pdf index 7a877271b..e3764dcdc 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-003.pdf index e047dc8bd..cd7e4362e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-004.pdf index 1f2defc42..12f010260 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-004.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-005.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-005.pdf index 5af060922..45ccf0acb 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-005.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-breaking-005.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-clip-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-clip-001.pdf index e8a218e9c..6d16fbed7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-clip-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-clip-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-clip-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-clip-002.pdf index 9c916add4..101dffd10 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-clip-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-clip-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-collapsing-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-collapsing-001.pdf index 7fe255b46..d60cd7684 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-collapsing-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-collapsing-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-columns-invalid-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-columns-invalid-001.pdf index fc472c267..99c025639 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-columns-invalid-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-columns-invalid-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-columns-invalid-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-columns-invalid-002.pdf index 8e910fafa..ce1a4dc0e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-columns-invalid-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-columns-invalid-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-columns-toolong-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-columns-toolong-001.pdf index 763c35f82..e627bfc2e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-columns-toolong-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-columns-toolong-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-containing-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-containing-001.pdf index 8feaa866f..1c3abd588 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-containing-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-containing-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-computed-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-computed-003.pdf index 3572f0311..c51f81da3 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-computed-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-computed-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-computed-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-computed-004.pdf index e7f00cd4a..3cf2d1f1a 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-computed-004.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-computed-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-negative-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-negative-001.pdf index 1ab519b9d..1086e5177 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-negative-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-negative-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-negative-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-negative-002.pdf index 66066aa49..3ee150458 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-negative-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-negative-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-non-integer-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-non-integer-001.pdf index f07592657..5f8aa5ece 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-non-integer-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-non-integer-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-non-integer-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-non-integer-002.pdf index 20a2c6315..cf7bb2bdf 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-non-integer-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-non-integer-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-non-integer-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-non-integer-003.pdf index 0a894713b..9845ce149 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-non-integer-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-count-non-integer-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-fill-auto-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-fill-auto-002.pdf index 17c18d24c..55d11d7cd 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-fill-auto-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-fill-auto-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-fill-auto-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-fill-auto-003.pdf index 8f7272776..d978a1040 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-fill-auto-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-fill-auto-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-fill-balance-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-fill-balance-001.pdf index cb8702563..d85d50e36 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-fill-balance-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-fill-balance-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-002.pdf index ae7a80454..ba4d5b961 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-003.pdf index 3c8966cc6..e83f09eda 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-large-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-large-001.pdf index 1fdb62788..05dc4e03b 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-large-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-large-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-large-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-large-002.pdf index 5fa47c586..f73b196fd 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-large-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-large-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-negative-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-negative-001.pdf index 4e8a7e490..5b58d8eb0 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-negative-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-negative-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-percentage-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-percentage-001.pdf index 8701675e3..2e1cf35a6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-percentage-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-gap-percentage-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-height-block-child-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-height-block-child-001.pdf index b9b3a78ee..52b20d840 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-height-block-child-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-height-block-child-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-inherit-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-inherit-001.pdf index 6838a4eca..5b94c4347 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-inherit-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-inherit-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-inherit-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-inherit-002.pdf index 353006399..b1fb3a3ec 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-inherit-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-inherit-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-003.pdf index 098e50ff9..8257cad0b 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-004.pdf index b4e410ea9..338e08312 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-004.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-005.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-005.pdf index 09dc295dc..3425b55bf 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-005.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-005.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-008-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-008-ref.pdf index 2d591c237..a5ab4efb9 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-008-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-008-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-008.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-008.pdf index 57e17550e..cb5560d76 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-008.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-list-item-008.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-margin-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-margin-003.pdf index 76bbf25f9..25e8c1102 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-margin-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-margin-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-margin-child-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-margin-child-001.pdf index 3cd51c28e..94fec3bb3 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-margin-child-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-margin-child-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-002.pdf index 8514a6646..e64173a8c 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-005.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-005.pdf index aa772a328..64d8d2ded 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-005.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-005.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-028.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-028.pdf index 20fd1c41a..c15888525 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-028.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-028.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-column-rule-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-column-rule-001.pdf index f7745778a..8f4c8c037 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-column-rule-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-column-rule-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-001.pdf index 792831edf..de06e59d7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-003.pdf index 4d2032dc3..89c6a158f 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-004.pdf index df1e57c2c..a23f52ebf 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-004.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-005.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-005.pdf index 5b63497f0..1fa24f3e1 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-005.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-nested-margin-005.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-oof-inline-cb-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-oof-inline-cb-001.pdf index 5498f5a4c..5124943eb 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-oof-inline-cb-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-oof-inline-cb-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-oof-inline-cb-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-oof-inline-cb-002.pdf index cd46f1670..ee0ad2e8d 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-oof-inline-cb-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-oof-inline-cb-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-overflow-clip.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-overflow-clip.pdf index 8e8f583f2..48a7ed7a5 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-overflow-clip.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-overflow-clip.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-002.pdf index 3ca035393..d97d81597 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-003.pdf index 2d6e82fb0..f70e9a0f0 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-color-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-color-001.pdf index 399b33018..e7e3bdd95 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-color-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-color-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-fraction-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-fraction-001.pdf index 0e0e2f909..ace2d1e24 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-fraction-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-fraction-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-fraction-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-fraction-002.pdf index 2be4ff3cd..95a61e4f7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-fraction-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-fraction-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-fraction-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-fraction-003.pdf index e9611f87a..6f10a3538 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-fraction-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-fraction-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-large-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-large-001.pdf index 88da8fcb4..74656d6b4 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-large-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-large-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-large-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-large-002.pdf index 4c3477a31..1d4645ac6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-large-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-large-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-nested-balancing-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-nested-balancing-003.pdf index 33cb1a4a1..923349091 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-nested-balancing-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-nested-balancing-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-nested-balancing-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-nested-balancing-004.pdf index 48167b4fc..796a9e8bd 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-nested-balancing-004.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-nested-balancing-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-px-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-px-001.pdf index 0bb010500..79b505c54 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-px-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-px-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-shorthand-2.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-shorthand-2.pdf index 790f24969..15ac1ccf0 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-shorthand-2.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-shorthand-2.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-stacking-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-stacking-001.pdf index d74709511..250a5e9ed 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-stacking-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-rule-stacking-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-shorthand-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-shorthand-001.pdf index 2fef5672d..15a7a7dda 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-shorthand-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-shorthand-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-001.pdf index b4ba6eadc..0c24b8bf7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-002.pdf index 94c93cff2..d892ac4ae 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-004-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-004-ref.pdf index b6b0a680e..8caf3d3a6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-004-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-004-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-004.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-004.pdf index 240cf31be..b73ac9f7d 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-004.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-004.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-005-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-005-ref.pdf index 9c9cf33c6..71af99468 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-005-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-005-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-005.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-005.pdf index 92aab4299..c462e3731 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-005.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-005.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-008.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-008.pdf index e3dccfdef..a3a30d62c 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-008.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-008.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-009.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-009.pdf index 5823aaa1c..080222f7d 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-009.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-009.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-010-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-010-ref.pdf index 235f40103..31ec8fd43 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-010-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-010-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-010.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-010.pdf index 04c60cf35..59588285a 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-010.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-010.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-002.pdf index 984b38e59..edc703d35 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-003.pdf index 33a856096..3fd7749e6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-006-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-006-ref.pdf index 925cec3ac..7d974d9d8 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-006-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-006-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-006.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-006.pdf index b7523adae..812f195fa 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-006.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-006.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-007.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-007.pdf index ac88070d0..595bfe799 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-007.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-children-height-007.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-001-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-001-ref.pdf index 2077136da..ce98ee446 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-001-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-001-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-002-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-002-ref.pdf index eb8c5948b..c09ed75aa 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-002-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-002-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-003-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-003-ref.pdf index 67eded599..79f4dad87 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-003-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-003-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-004-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-004-ref.pdf index 2eff6cfac..7d6e15d5e 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-004-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-004-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-007-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-007-ref.pdf index eff5377f5..e858bb1e4 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-007-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-007-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-010-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-010-ref.pdf index d6fb04ee4..5eee1a3a1 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-010-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-010-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-012-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-012-ref.pdf index dc3d22ae2..fbdd0bbe7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-012-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-add-012-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-remove-005-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-remove-005-ref.pdf index 0678651fe..37a627ef9 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-remove-005-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-dynamic-remove-005-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-001-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-001-ref.pdf index ec8f81a66..6a82530de 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-001-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-001-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-001.pdf index 304e63575..fb2b8c77b 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-002-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-002-ref.pdf index e4a2343c5..ae6c974ba 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-002-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-002-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-002.pdf index 0b7dbf855..eac281597 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-003-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-003-ref.pdf index 58978c40e..f868c5510 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-003-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-003-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-003.pdf index 9fc8ffe78..579af7220 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-fieldset-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-001.pdf index 670905770..f5f28b076 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-002.pdf index 7b211449c..e6e96928c 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-003.pdf index 18b9a68f0..e16f997b7 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-bottom-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-bottom-001.pdf index bb2763ee0..bd6803b84 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-bottom-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-bottom-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-nested-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-nested-001.pdf index ea1308667..4dea25fd8 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-nested-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-nested-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-nested-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-nested-002.pdf index 0eb3e6516..efe5d9f72 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-nested-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-nested-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-nested-firstchild-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-nested-firstchild-001.pdf index 6c79b7f49..9c63e22b1 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-nested-firstchild-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-margin-nested-firstchild-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-rule-001-ref.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-rule-001-ref.pdf index da19e64c0..aa868c48b 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-rule-001-ref.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-rule-001-ref.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-rule-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-rule-001.pdf index a0bd3520a..592f652d6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-rule-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-all-rule-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-float-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-float-001.pdf index 787f94fb3..5b8b90895 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-float-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-float-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-none-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-none-001.pdf index 5d0874934..2b4d04994 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-none-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-span-none-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-002.pdf index e830194ad..b015af954 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-003.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-003.pdf index 264ae1c52..e7dc9aae0 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-003.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-003.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-large-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-large-001.pdf index 195a445cf..1afe827e6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-large-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-large-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-large-002.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-large-002.pdf index 03505ae0d..2a09ab094 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-large-002.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-large-002.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-small-001.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-small-001.pdf index 712ef85de..8b358690a 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-small-001.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/multicol-width-small-001.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/nested-at-outer-boundary-as-fieldset.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/nested-at-outer-boundary-as-fieldset.pdf index c8d6fbdd3..02c92ebe6 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/nested-at-outer-boundary-as-fieldset.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/nested-at-outer-boundary-as-fieldset.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/nested-at-outer-boundary-as-legend.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/nested-at-outer-boundary-as-legend.pdf index 75e9828af..f477c79f5 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/nested-at-outer-boundary-as-legend.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/nested-at-outer-boundary-as-legend.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/nested-oofs-in-relative-multicol.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/nested-oofs-in-relative-multicol.pdf index e93a58c32..e2923f2cc 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/nested-oofs-in-relative-multicol.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/nested-oofs-in-relative-multicol.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/spanner-fragmentation-008.pdf b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/spanner-fragmentation-008.pdf index 575480482..6b260aed4 100644 Binary files a/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/spanner-fragmentation-008.pdf and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/css_multicol/spanner-fragmentation-008.pdf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/1x1-lime.png b/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/1x1-lime.png new file mode 100644 index 000000000..cb397fb09 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/1x1-lime.png differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/alignment.css b/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/alignment.css new file mode 100644 index 000000000..d4c970c52 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/alignment.css @@ -0,0 +1,367 @@ +/* align-self */ +.alignSelfAuto { align-self: auto; } +.alignSelfNormal { align-self: normal; } +.alignSelfStretch { align-self: stretch; } +.alignSelfStart { align-self: start; } +.alignSelfEnd { align-self: end; } +.alignSelfCenter { align-self: center; } +.alignSelfRight { align-self: right; } +.alignSelfLeft { align-self: left; } + +.alignSelfFlexStart { align-self: flex-start; } +.alignSelfFlexEnd { align-self: flex-end; } + +.alignSelfSelfStart { align-self: self-start; } +.alignSelfSelfEnd { align-self: self-end; } + +.alignSelfSafeCenter { align-self: safe center; } +.alignSelfUnsafeCenter { align-self: unsafe center; } +.alignSelfSafeEnd { align-self: safe end; } +.alignSelfUnsafeEnd { align-self: unsafe end; } +.alignSelfSafeSelfEnd { align-self: safe self-end; } +.alignSelfUnsafeSelfEnd { align-self: unsafe self-end; } +.alignSelfSafeSelfStart { align-self: safe self-start; } +.alignSelfUnsafeSelfStart { align-self: unsafe self-start; } +.alignSelfSafeRight { align-self: safe right; } +.alignSelfUnsafeRight { align-self: unsafe right; } +.alignSelfSafeLeft { align-self: safe left; } +.alignSelfUnsafeLeft { align-self: unsafe left; } +.alignSelfSafeFlexEnd { align-self: safe flex-end; } +.alignSelfUnsafeFlexEnd { align-self: unsafe flex-end; } +.alignSelfSafeFlexStart { align-self: safe flex-start; } +.alignSelfUnsafeFlexStart { align-self: unsafe flex-start; } + +.alignSelfBaseline { align-self: baseline; } +.alignSelfFirstBaseline { align-self: first baseline; } +.alignSelfLastBaseline { align-self: last baseline; } + +/* align-items */ +.alignItemsAuto { align-items: auto; } +.alignItemsNormal { align-items: normal; } +.alignItemsStretch { align-items: stretch; } +.alignItemsStart { align-items: start; } +.alignItemsCenter { align-items: center; } +.alignItemsEnd { align-items: end; } +.alignItemsLeft { align-items: left; } +.alignItemsRight { align-items: right; } + +.alignItemsFlexStart { align-items: flex-start; } +.alignItemsFlexEnd { align-items: flex-end; } + +.alignItemsSelfStart { align-items: self-start; } +.alignItemsSelfEnd { align-items: self-end; } + +.alignItemsSafeCenter { align-items: safe center; } +.alignItemsUnsafeCenter { align-items: unsafe center; } +.alignItemsSafeEnd { align-items: safe end; } +.alignItemsUnsafeEnd { align-items: unsafe end; } +.alignItemsSafeSelfEnd { align-items: safe self-end; } +.alignItemsUnsafeSelfEnd { align-items: unsafe self-end; } +.alignItemsSafeSelfStart { align-items: safe self-start; } +.alignItemsUnsafeSelfStart { align-items: unsafe self-start; } +.alignItemsSafeRight { align-items: safe right; } +.alignItemsUnsafeRight { align-items: unsafe right; } +.alignItemsSafeLeft { align-items: safe left; } +.alignItemsUnsafeLeft { align-items: unsafe left; } +.alignItemsSafeFlexEnd { align-items: safe flex-end; } +.alignItemsUnsafeFlexEnd { align-items: unsafe flex-end; } +.alignItemsSafeFlexStart { align-items: safe flex-start; } +.alignItemsUnsafeFlexStart { align-items: unsafe flex-start; } + +.alignItemsBaseline { align-items: baseline; } +.alignItemsFirstBaseline { align-items: first baseline; } +.alignItemsLastBaseline { align-items: last baseline; } + +/* align-content */ +.alignContentBaseline { align-content: baseline; } +.alignContentLastBaseline { align-content: last-baseline; } +.alignContentStart { align-content: start; } +.alignContentEnd { align-content: end; } +.alignContentCenter { align-content: center; } +.alignContentLeft { align-content: left; } +.alignContentRight { align-content: right; } + +.alignContentFlexStart { align-content: flex-start; } +.alignContentFlexEnd { align-content: flex-end; } + +.alignContentSpaceBetween { align-content: space-between; } +.alignContentSpaceAround { align-content: space-around; } +.alignContentSpaceEvenly { align-content: space-evenly; } +.alignContentStretch { align-content: stretch; } + +.alignContentSafeCenter { align-content: safe center; } +.alignContentUnsafeCenter { align-content: unsafe center; } +.alignContentSafeEnd { align-content: safe end; } +.alignContentUnsafeEnd { align-content: unsafe end; } +.alignContentSafeRight { align-content: safe right; } +.alignContentUnsafeRight { align-content: unsafe right; } +.alignContentSafeLeft { align-content: safe left; } +.alignContentUnsafeLeft { align-content: unsafe left; } +.alignContentSafeFlexEnd { align-content: safe flex-end; } +.alignContentUnsafeFlexEnd { align-content: unsafe flex-end; } +.alignContentSafeFlexStart { align-content: safe flex-start; } +.alignContentUnsafeFlexStart { align-content: unsafe flex-start; } + +.alignContentBaseline { align-content: baseline; } +.alignContentFirstBaseline { align-content: first baseline; } +.alignContentLastBaseline { align-content: last baseline; } + +/* justify-self */ +.justifySelfAuto { justify-self: auto; } +.justifySelfNormal { justify-self: normal; } +.justifySelfStretch { justify-self: stretch; } +.justifySelfStart { justify-self: start; } +.justifySelfCenter { justify-self: center; } +.justifySelfEnd { justify-self: end; } +.justifySelfRight { justify-self: right; } +.justifySelfLeft { justify-self: left; } + +.justifySelfFlexStart { justify-self: flex-start; } +.justifySelfFlexEnd { justify-self: flex-end; } + +.justifySelfSelfStart { justify-self: self-start; } +.justifySelfSelfEnd { justify-self: self-end; } + +.justifySelfSafeCenter { justify-self: safe center; } +.justifySelfUnsafeCenter { justify-self: unsafe center; } +.justifySelfSafeEnd { justify-self: safe end; } +.justifySelfUnsafeEnd { justify-self: unsafe end; } +.justifySelfSafeSelfEnd { justify-self: safe self-end; } +.justifySelfUnsafeSelfEnd { justify-self: unsafe self-end; } +.justifySelfSafeSelfStart { justify-self: safe self-start; } +.justifySelfUnsafeSelfStart { justify-self: unsafe self-start; } +.justifySelfSafeRight { justify-self: safe right; } +.justifySelfUnsafeRight { justify-self: unsafe right; } +.justifySelfSafeLeft { justify-self: safe left; } +.justifySelfUnsafeLeft { justify-self: unsafe left; } +.justifySelfSafeFlexEnd { justify-self: safe flex-end; } +.justifySelfUnsafeFlexEnd { justify-self: unsafe flex-end; } +.justifySelfSafeFlexStart { justify-self: safe flex-start; } +.justifySelfUnsafeFlexStart { justify-self: unsafe flex-start; } + +.justifySelfBaseline { justify-self: baseline; } +.justifySelfFirstBaseline { justify-self: first baseline; } +.justifySelfLastBaseline { justify-self: last baseline; } + +/* justify-items */ +.justifyItemsAuto { justify-items: auto; } +.justifyItemsNormal { justify-items: normal; } +.justifyItemsStretch { justify-items: stretch; } +.justifyItemsStart { justify-items: start; } +.justifyItemsCenter { justify-items: center; } +.justifyItemsEnd { justify-items: end; } +.justifyItemsLeft { justify-items: left; } +.justifyItemsRight { justify-items: right; } + +.justifyItemsFlexStart { justify-items: flex-start; } +.justifyItemsFlexEnd { justify-items: flex-end; } + +.justifyItemsSelfStart { justify-items: self-start; } +.justifyItemsSelfEnd { justify-items: self-end; } + +.justifyItemsLegacy { justify-items: legacy; } +.justifyItemsLegacyLeft { justify-items: legacy left; } +.justifyItemsLegacyCenter { justify-items: legacy center; } +.justifyItemsLegacyRight { justify-items: legacy right; } +.justifyItemsLeftLegacy { justify-items: left legacy; } +.justifyItemsCenterLegacy { justify-items: center legacy; } +.justifyItemsRightLegacy { justify-items: right legacy; } + +.justifyItemsSafeCenter { justify-items: safe center; } +.justifyItemsUnsafeCenter { justify-items: unsafe center; } +.justifyItemsSafeEnd { justify-items: safe end; } +.justifyItemsUnsafeEnd { justify-items: unsafe end; } +.justifyItemsSafeSelfEnd { justify-items: safe self-end; } +.justifyItemsUnsafeSelfEnd { justify-items: unsafe self-end; } +.justifyItemsSafeSelfStart { justify-items: safe self-start; } +.justifyItemsUnsafeSelfStart { justify-items: unsafe self-start; } +.justifyItemsSafeRight { justify-items: safe right; } +.justifyItemsUnsafeRight { justify-items: unsafe right; } +.justifyItemsSafeLeft { justify-items: safe left; } +.justifyItemsUnsafeLeft { justify-items: unsafe left; } +.justifyItemsSafeFlexEnd { justify-items: safe flex-end; } +.justifyItemsUnsafeFlexEnd { justify-items: unsafe flex-end; } +.justifyItemsSafeFlexStart { justify-items: safe flex-start; } +.justifyItemsUnsafeFlexStart { justify-items: unsafe flex-start; } + +.justifyItemsTest { justify-items: safe end; } + +.justifyItemsBaseline { justify-items: baseline; } +.justifyItemsFirstBaseline { justify-items: first baseline; } +.justifyItemsLastBaseline { justify-items: last baseline; } + +/* justify-content */ +.justifyContentBaseline { justify-content: baseline; } +.justifyContentLastBaseline { justify-content: last-baseline; } +.justifyContentStart { justify-content: start; } +.justifyContentEnd { justify-content: end; } +.justifyContentCenter { justify-content: center; } +.justifyContentLeft { justify-content: left; } +.justifyContentRight { justify-content: right; } + +.justifyContentFlexStart { justify-content: flex-start; } +.justifyContentFlexEnd { justify-content: flex-end; } + +.justifyContentSpaceBetween { justify-content: space-between; } +.justifyContentSpaceAround { justify-content: space-around; } +.justifyContentSpaceEvenly { justify-content: space-evenly; } +.justifyContentStretch { justify-content: stretch; } + +.justifyContentSafeCenter { justify-content: safe center; } +.justifyContentUnsafeCenter { justify-content: unsafe center; } +.justifyContentSafeEnd { justify-content: safe end; } +.justifyContentUnsafeEnd { justify-content: unsafe end; } +.justifyContentSafeRight { justify-content: safe right; } +.justifyContentUnsafeRight { justify-content: unsafe right; } +.justifyContentSafeLeft { justify-content: safe left; } +.justifyContentUnsafeLeft { justify-content: unsafe left; } +.justifyContentSafeFlexEnd { justify-content: safe flex-end; } +.justifyContentUnsafeFlexEnd { justify-content: unsafe flex-end; } +.justifyContentSafeFlexStart { justify-content: safe flex-start; } +.justifyContentUnsafeFlexStart { justify-content: unsafe flex-start; } + +.justifyContentBaseline { justify-content: baseline; } +.justifyContentFirstBaseline { justify-content: first baseline; } +.justifyContentLastBaseline { justify-content: last baseline; } + +/* Both align-items and justify-items */ +.itemsNormal { + align-items: normal; + justify-items: normal; +} + +.itemsStretch { + align-items: stretch; + justify-items: stretch; +} + +.itemsStart { + align-items: start; + justify-items: start; +} + +.itemsCenter { + align-items: center; + justify-items: center; +} + +.itemsEnd { + align-items: end; + justify-items: end; +} + +.itemsLeft { + align-items: left; + justify-items: left; +} + +.itemsRight { + align-items: right; + justify-items: right; +} + +.itemsSelfStart { + align-items: self-start; + justify-items: self-start; +} + +.itemsSelfEnd { + align-items: self-end; + justify-items: self-end; +} +.itemsBaseline { + align-items: baseline; + justify-items: baseline; +} + +/* Both align-self and justify-self */ +.selfStretch { + align-self: stretch; + justify-self: stretch; +} +.selfStart { + align-self: start; + justify-self: start; +} +.selfEnd { + align-self: end; + justify-self: end; +} +.selfCenter { + align-self: center; + justify-self: center; +} +.selfRight { + align-self: right; + justify-self: right; +} +.selfLeft { + align-self: left; + justify-self: left; +} +.selfSelfStart { + align-self: self-start; + justify-self: self-start; +} +.selfSelfEnd { + align-self: self-end; + justify-self: self-end; +} +.selfBaseline { + align-self: baseline; + justify-self: baseline; +} + +/* Both align-content and justify-content */ +.contentStart { + align-content: start; + justify-content: start; +} +.contentCenter { + align-content: center; + justify-content: center; +} +.contentEnd { + align-content: end; + justify-content: end; +} + +.contentCenterSafe { + align-content: safe center; + justify-content: safe center; +} + +.contentCenterUnsafe { + align-content: unsafe center; + justify-content: unsafe center; +} + +.contentEndSafe { + align-content: safe end; + justify-content: safe end; +} + +.contentEndUnsafe { + align-content: unsafe end; + justify-content: unsafe end; +} + +.contentSpaceBetween { + justify-content: space-between; + align-content: space-between; +} + +.contentSpaceAround { + justify-content: space-around; + align-content: space-around; +} + +.contentSpaceEvenly { + justify-content: space-evenly; + align-content: space-evenly; +} + +.contentStretch { + justify-content: stretch; + align-content: stretch; +} diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/colors-8x16.png b/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/colors-8x16.png new file mode 100644 index 000000000..596fdb389 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/colors-8x16.png differ diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/grid.css b/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/grid.css new file mode 100644 index 000000000..4007ebba4 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/grid.css @@ -0,0 +1,289 @@ +.grid { + display: grid; + background-color: grey; +} + +.inline-grid { + display: inline-grid; + background-color: grey; +} + +.firstRowFirstColumn { + background-color: blue; + grid-column: 1; + grid-row: 1; +} + +.onlyFirstRowOnlyFirstColumn { + background-color: blue; + grid-column: 1 / 2; + grid-row: 1 / 2; +} + +.firstRowSecondColumn { + background-color: lime; + grid-column: 2; + grid-row: 1; +} + +.onlyFirstRowOnlySecondColumn { + background-color: lime; + grid-column: 2 / 3; + grid-row: 1 / 2; +} + +.firstRowThirdColumn { + background-color: magenta; + grid-column: 3; + grid-row: 1; +} + +.firstRowFourthColumn { + background-color: green; + grid-column: 4; + grid-row: 1; +} + +.secondRowFirstColumn { + background-color: purple; + grid-column: 1; + grid-row: 2; +} + +.onlySecondRowOnlyFirstColumn { + background-color: purple; + grid-column: 1 / 2; + grid-row: 2 / 3; +} + +.secondRowSecondColumn { + background-color: orange; + grid-column: 2; + grid-row: 2; +} + +.onlySecondRowOnlySecondColumn { + background-color: orange; + grid-column: 2 / 3; + grid-row: 2 / 3; +} + +.endSecondRowEndSecondColumn { + background-color: orange; + grid-column-end: 3; + grid-row-end: 3; +} + +.secondRowThirdColumn { + background-color: navy; + grid-column: 3; + grid-row: 2; +} + +.secondRowFourthColumn { + background-color: pink; + grid-column: 4; + grid-row: 2; +} + +.thirdRowFirstColumn { + background-color: green; + grid-column: 1; + grid-row: 3; +} + +.thirdRowSecondColumn { + background-color: red; + grid-column: 2; + grid-row: 3; +} + +.thirdRowThirdColumn { + background-color: salmon; + grid-column: 3; + grid-row: 3; +} + +.firstAutoRowSecondAutoColumn { + grid-row: 1 / auto; + grid-column: 2 / auto; +} + +.autoLastRowAutoLastColumn { + grid-row: auto / -1; + grid-column: auto / -1; +} + +.autoSecondRowAutoFirstColumn { + grid-row: auto / 2; + grid-column: auto / 1; +} + +.firstRowBothColumn { + grid-row: 1; + grid-column: 1 / -1; +} + +.secondRowBothColumn { + grid-row: 2; + grid-column: 1 / -1; +} + +.bothRowFirstColumn { + grid-row: 1 / -1; + grid-column: 1; +} + +.bothRowSecondColumn { + grid-row: 1 / -1; + grid-column: 2; +} + +.bothRowBothColumn { + grid-row: 1 / -1; + grid-column: 1 / -1; +} + +/* Auto column / row. */ +.autoRowAutoColumn { + background-color: pink; + grid-column: auto; + grid-row: auto; +} + +.firstRowAutoColumn { + background-color: blue; + grid-column: auto; + grid-row: 1; +} + +.secondRowAutoColumn { + background-color: purple; + grid-column: auto; + grid-row: 2; +} + +.thirdRowAutoColumn { + background-color: navy; + grid-column: auto; + grid-row: 3; +} + +.autoRowFirstColumn { + background-color: lime; + grid-column: 1; + grid-row: auto; +} + +.autoRowSecondColumn { + background-color: orange; + grid-column: 2; + grid-row: auto; +} + +.autoRowThirdColumn { + background-color: magenta; + grid-column: 3; + grid-row: auto; +} + +.autoRowAutoColumnSpanning2 { + background-color: maroon; + grid-column: span 2; + grid-row: auto; +} + +.autoRowSpanning2AutoColumn { + background-color: aqua; + grid-column: auto; + grid-row: span 2; +} + +.autoRowSpanning2AutoColumnSpanning3 { + background-color: olive; + grid-column: span 3; + grid-row: span 2; +} + +.autoRowSpanning3AutoColumnSpanning2 { + background-color: indigo; + grid-column: span 2; + grid-row: span 3; +} + +.autoRowFirstColumnSpanning2 { + background-color: maroon; + grid-column: 1 / span 2; + grid-row: auto; +} + +.autoRowSecondColumnSpanning2 { + background-color: olive; + grid-column: 2 / span 2; + grid-row: auto; +} + +.firstRowSpanning2AutoColumn { + background-color: maroon; + grid-column: auto; + grid-row: 1 / span 2; + height: 100%; +} + +.secondRowSpanning2AutoColumn { + background-color: olive; + grid-column: auto; + grid-row: 2 / span 2; + height: 100%; +} + +/* Grid element flow. */ +.gridAutoFlowColumnSparse { + grid-auto-flow: column; +} + +.gridAutoFlowColumnDense { + grid-auto-flow: column dense; +} + +.gridAutoFlowRowSparse { + grid-auto-flow: row; +} + +.gridAutoFlowRowDense { + grid-auto-flow: row dense; +} + +/* This rule makes sure the container is smaller than any grid items to avoid distributing any extra logical space to them. */ +.constrainedContainer { + width: 10px; + height: 10px; +} + +.unconstrainedContainer { + width: 1000px; + height: 1000px; +} + +.sizedToGridArea { + font: 10px/1 Ahem; + /* Make us fit our grid area. */ + width: 100%; + height: 100%; +} + +.verticalRL { + writing-mode: vertical-rl; +} +.verticalLR { + writing-mode: vertical-lr; +} +.horizontalTB { + writing-mode: horizontal-tb; +} +.directionRTL { + direction: rtl; +} +.directionLTR { + direction: ltr; +} diff --git a/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/width-keyword-classes.css b/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/width-keyword-classes.css new file mode 100644 index 000000000..e77752760 --- /dev/null +++ b/src/test/resources/com/itextpdf/html2pdf/css/w3c/support/width-keyword-classes.css @@ -0,0 +1,43 @@ +/* + Take every possible line break so the box width is the width of largest + unbreakable line box. +*/ +.min-content { + width: min-content; +} + +.max-content { + width: max-content; +} + +/* + Shrink wrap just like floating. + max(min-content, min(max-content, fill-available)) +*/ +.fit-content { + width: fit-content; +} + +.max-width-min-content { + max-width: min-content; +} + +.max-width-max-content { + max-width: max-content; +} + +.max-width-fit-content { + max-width: fit-content; +} + +.min-width-min-content { + min-width: min-content; +} + +.min-width-max-content { + min-width: max-content; +} + +.min-width-fit-content { + min-width: fit-content; +} diff --git a/src/test/resources/com/itextpdf/html2pdf/fonts/Bokor-Regular.ttf b/src/test/resources/com/itextpdf/html2pdf/fonts/Bokor-Regular.ttf new file mode 100644 index 000000000..66faecc0a Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/fonts/Bokor-Regular.ttf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/fonts/NOTICE.txt b/src/test/resources/com/itextpdf/html2pdf/fonts/NOTICE.txt index d56b443bb..6d0612c77 100644 --- a/src/test/resources/com/itextpdf/html2pdf/fonts/NOTICE.txt +++ b/src/test/resources/com/itextpdf/html2pdf/fonts/NOTICE.txt @@ -5,7 +5,13 @@ | Amaranth font | OFL-1.1 | | NotoNaskhArabic-Regular | OFL-1.1 | In development version of font based on commit 4cdde035fd5138d6653a2176ba728b5b6f8cc533 (30.10.2019) from repository: "/~https://github.com/googlefonts/noto-fonts" | NotoEmoji-Regular | SIL Open Font License v1.1 | OFL.txt | - + | SpaceMono-Regular | SIL Open Font License v1.1 | OFL.txt |(29.04.2024) + | StyleScript-Regular | SIL Open Font License v1.1 | OFL.txt |(29.04.2024) + | Orbitron-Regular | SIL Open Font License v1.1 | OFL.txt |(29.04.2024) + | Bokor-Regular | SIL Open Font License v1.1 | OFL.txt |(30.04.2024) + | NotoSansJP-Bold.ttf | OFL-1.1 | OFL.txt |(07.05.2024) + | OpenSans-Regular.ttf | OFL-1.1 | OFL.txt |(07.05.2024) + | OpenSans-Bold.ttf | OFL-1.1 | OFL.txt |(07.05.2024) ------------------------------------------------------------------------------------------------------------------------ diff --git a/src/test/resources/com/itextpdf/html2pdf/fonts/NotoSansCJKjp-Regular.otf b/src/test/resources/com/itextpdf/html2pdf/fonts/NotoSansCJKjp-Regular.otf new file mode 100644 index 000000000..296fbebd8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/fonts/NotoSansCJKjp-Regular.otf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/fonts/NotoSansJP-Bold.ttf b/src/test/resources/com/itextpdf/html2pdf/fonts/NotoSansJP-Bold.ttf new file mode 100644 index 000000000..384f8ebb8 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/fonts/NotoSansJP-Bold.ttf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/fonts/Orbitron-Regular.otf b/src/test/resources/com/itextpdf/html2pdf/fonts/Orbitron-Regular.otf new file mode 100644 index 000000000..68bc92a91 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/fonts/Orbitron-Regular.otf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/fonts/SpaceMono-Regular.ttf b/src/test/resources/com/itextpdf/html2pdf/fonts/SpaceMono-Regular.ttf new file mode 100644 index 000000000..04e56b923 Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/fonts/SpaceMono-Regular.ttf differ diff --git a/src/test/resources/com/itextpdf/html2pdf/fonts/StyleScript-Regular.otf b/src/test/resources/com/itextpdf/html2pdf/fonts/StyleScript-Regular.otf new file mode 100644 index 000000000..01da4edae Binary files /dev/null and b/src/test/resources/com/itextpdf/html2pdf/fonts/StyleScript-Regular.otf differ