Skip to content

Commit 72f73ef

Browse files
ar3emars18wrw
authored andcommitted
Remove HTML mode setting in tests
DEVSIX-3662 Autoported commit. Original commit hash: [9dc9e01]
1 parent a5031f3 commit 72f73ef

31 files changed

+1
-286
lines changed

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/LineHeightTest.cs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,12 @@ You should have received a copy of the GNU Affero General Public License
2424
using System.Collections.Generic;
2525
using System.IO;
2626
using iText.Html2pdf;
27-
using iText.Html2pdf.Attach;
28-
using iText.Html2pdf.Attach.Impl;
29-
using iText.Html2pdf.Attach.Impl.Tags;
30-
using iText.Html2pdf.Html;
3127
using iText.IO.Util;
3228
using iText.Kernel.Pdf;
3329
using iText.Kernel.Utils;
34-
using iText.Layout;
3530
using iText.Layout.Element;
3631
using iText.Layout.Font;
3732
using iText.Layout.Properties;
38-
using iText.StyledXmlParser.Node;
3933
using iText.Test.Attributes;
4034

4135
namespace iText.Html2pdf.Css {
@@ -200,30 +194,7 @@ internal static ConverterProperties InitConverterProperties() {
200194
fontProvider.AddDirectory(RESOURCES);
201195
fontProvider.AddStandardPdfFonts();
202196
converterProperties.SetFontProvider(fontProvider);
203-
DefaultTagWorkerFactory tagWorkerFactory = new LineHeightTest.HtmlModeTagWorkerFactory();
204-
converterProperties.SetTagWorkerFactory(tagWorkerFactory);
205197
return converterProperties;
206198
}
207-
208-
internal class HtmlModeTagWorkerFactory : DefaultTagWorkerFactory {
209-
public override ITagWorker GetCustomTagWorker(IElementNode tag, ProcessorContext context) {
210-
if (TagConstants.BODY.Equals(tag.Name())) {
211-
return new LineHeightTest.HtmlModeBodyTagWorker(tag, context);
212-
}
213-
return null;
214-
}
215-
}
216-
217-
internal class HtmlModeBodyTagWorker : BodyTagWorker {
218-
internal HtmlModeBodyTagWorker(IElementNode element, ProcessorContext context)
219-
: base(element, context) {
220-
}
221-
222-
public override IPropertyContainer GetElementResult() {
223-
IPropertyContainer result = base.GetElementResult();
224-
result.SetProperty(Property.RENDERING_MODE, RenderingMode.HTML_MODE);
225-
return result;
226-
}
227-
}
228199
}
229200
}

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/TextPropertiesTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ public virtual void LineHeightTest02() {
9696
[NUnit.Framework.Test]
9797
[LogMessage(iText.IO.LogMessageConstant.RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES)]
9898
public virtual void LineHeightTest03() {
99-
// TODO DEVSIX-3662
10099
ConvertToPdfAndCompare("lineHeightTest03", sourceFolder, destinationFolder);
101100
}
102101

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/w3c/css21/linebox/HtmlModeBodyTagWorker.cs

Lines changed: 0 additions & 41 deletions
This file was deleted.

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/w3c/css21/linebox/HtmlModeTagWorkerFactory.cs

Lines changed: 0 additions & 37 deletions
This file was deleted.

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/w3c/css21/linebox/Leading001Test.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ You should have received a copy of the GNU Affero General Public License
2121
along with this program. If not, see <https://www.gnu.org/licenses/>.
2222
*/
2323
using System;
24-
using iText.Html2pdf;
2524
using iText.Html2pdf.Css.W3c;
2625
using iText.Test.Attributes;
2726

@@ -31,12 +30,6 @@ protected internal override String GetHtmlFileName() {
3130
return "leading-001.xht";
3231
}
3332

34-
protected internal override ConverterProperties GetConverterProperties() {
35-
ConverterProperties converterProperties = base.GetConverterProperties();
36-
converterProperties.SetTagWorkerFactory(new HtmlModeTagWorkerFactory());
37-
return converterProperties;
38-
}
39-
4033
[NUnit.Framework.Test]
4134
[LogMessage("Unable to process external css file")]
4235
public override void Test() {

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/w3c/css21/linebox/LineBoxHeight001Test.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ You should have received a copy of the GNU Affero General Public License
2121
along with this program. If not, see <https://www.gnu.org/licenses/>.
2222
*/
2323
using System;
24-
using iText.Html2pdf;
2524
using iText.Html2pdf.Css.W3c;
2625
using iText.Test.Attributes;
2726

@@ -31,12 +30,6 @@ protected internal override String GetHtmlFileName() {
3130
return "line-box-height-001.xht";
3231
}
3332

34-
protected internal override ConverterProperties GetConverterProperties() {
35-
ConverterProperties converterProperties = base.GetConverterProperties();
36-
converterProperties.SetTagWorkerFactory(new HtmlModeTagWorkerFactory());
37-
return converterProperties;
38-
}
39-
4033
[NUnit.Framework.Test]
4134
[LogMessage("Unable to process external css file")]
4235
public override void Test() {

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/w3c/css21/linebox/LineBoxHeight002Test.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,12 @@ You should have received a copy of the GNU Affero General Public License
2121
along with this program. If not, see <https://www.gnu.org/licenses/>.
2222
*/
2323
using System;
24-
using iText.Html2pdf;
2524
using iText.Html2pdf.Css.W3c;
2625

2726
namespace iText.Html2pdf.Css.W3c.Css21.Linebox {
2827
public class LineBoxHeight002Test : W3CCssAhemFontTest {
2928
protected internal override String GetHtmlFileName() {
3029
return "line-box-height-002.xht";
3130
}
32-
33-
protected internal override ConverterProperties GetConverterProperties() {
34-
ConverterProperties converterProperties = base.GetConverterProperties();
35-
converterProperties.SetTagWorkerFactory(new HtmlModeTagWorkerFactory());
36-
return converterProperties;
37-
}
3831
}
3932
}

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/w3c/css21/linebox/LineHeight001Test.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ You should have received a copy of the GNU Affero General Public License
2121
along with this program. If not, see <https://www.gnu.org/licenses/>.
2222
*/
2323
using System;
24-
using iText.Html2pdf;
2524
using iText.Html2pdf.Css.W3c;
2625
using iText.Test.Attributes;
2726

@@ -31,12 +30,6 @@ protected internal override String GetHtmlFileName() {
3130
return "line-height-001.xht";
3231
}
3332

34-
protected internal override ConverterProperties GetConverterProperties() {
35-
ConverterProperties converterProperties = base.GetConverterProperties();
36-
converterProperties.SetTagWorkerFactory(new HtmlModeTagWorkerFactory());
37-
return converterProperties;
38-
}
39-
4033
[NUnit.Framework.Test]
4134
[LogMessage("Unable to process external css file")]
4235
public override void Test() {

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/w3c/css21/linebox/LineHeight002Test.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ You should have received a copy of the GNU Affero General Public License
2121
along with this program. If not, see <https://www.gnu.org/licenses/>.
2222
*/
2323
using System;
24-
using iText.Html2pdf;
2524
using iText.Html2pdf.Css.W3c;
2625
using iText.Test.Attributes;
2726

@@ -31,12 +30,6 @@ protected internal override String GetHtmlFileName() {
3130
return "line-height-002.xht";
3231
}
3332

34-
protected internal override ConverterProperties GetConverterProperties() {
35-
ConverterProperties converterProperties = base.GetConverterProperties();
36-
converterProperties.SetTagWorkerFactory(new HtmlModeTagWorkerFactory());
37-
return converterProperties;
38-
}
39-
4033
[NUnit.Framework.Test]
4134
[LogMessage("Unable to process external css file")]
4235
[LogMessage("The background rectangle has negative or zero sizes. It will not be displayed.")]

itext.tests/itext.html2pdf.tests/itext/html2pdf/css/w3c/css21/linebox/LineHeight003Test.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ You should have received a copy of the GNU Affero General Public License
2121
along with this program. If not, see <https://www.gnu.org/licenses/>.
2222
*/
2323
using System;
24-
using iText.Html2pdf;
2524
using iText.Html2pdf.Css.W3c;
2625
using iText.Test.Attributes;
2726

@@ -31,12 +30,6 @@ protected internal override String GetHtmlFileName() {
3130
return "line-height-003.xht";
3231
}
3332

34-
protected internal override ConverterProperties GetConverterProperties() {
35-
ConverterProperties converterProperties = base.GetConverterProperties();
36-
converterProperties.SetTagWorkerFactory(new HtmlModeTagWorkerFactory());
37-
return converterProperties;
38-
}
39-
4033
[NUnit.Framework.Test]
4134
[LogMessage("Unable to process external css file")]
4235
public override void Test() {

0 commit comments

Comments
 (0)