From 3decd12a80afba9ceecc965406d200825fe8ad71 Mon Sep 17 00:00:00 2001 From: Sylvain Jermini Date: Tue, 26 May 2020 14:48:44 +0200 Subject: [PATCH] add failing test that highlight the infinite loop issue in table layout #482 --- .../html/issue-482-infinite-loop-table.html | 19 +++++++++++++++++++ .../VisualRegressionTest.java | 9 +++++++++ 2 files changed, 28 insertions(+) create mode 100644 openhtmltopdf-examples/src/main/resources/visualtest/html/issue-482-infinite-loop-table.html diff --git a/openhtmltopdf-examples/src/main/resources/visualtest/html/issue-482-infinite-loop-table.html b/openhtmltopdf-examples/src/main/resources/visualtest/html/issue-482-infinite-loop-table.html new file mode 100644 index 000000000..f421bc445 --- /dev/null +++ b/openhtmltopdf-examples/src/main/resources/visualtest/html/issue-482-infinite-loop-table.html @@ -0,0 +1,19 @@ + + + + + +
­
+ + \ No newline at end of file diff --git a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java index 1bbc7745e..53b921943 100644 --- a/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java +++ b/openhtmltopdf-examples/src/test/java/com/openhtmltopdf/visualregressiontests/VisualRegressionTest.java @@ -1154,6 +1154,15 @@ public Reader getReader() { }))); } + @Test + @Ignore + public void testIssue482InfiniteLoopTable() throws IOException { + assertTrue(vt.runTest("issue-482-infinite-loop-table", builder -> { + builder.useFont(() -> VisualRegressionTest.class.getClassLoader().getResourceAsStream("org/apache/pdfbox/resources/ttf/LiberationSans-Regular.ttf"), + "Liberation Sans"); + })); + } + // TODO: // + Elements that appear just on generated overflow pages. // + content property (page counters, etc)