diff --git a/flow-server/src/test/java/com/vaadin/flow/component/SvgTest.java b/flow-server/src/test/java/com/vaadin/flow/component/SvgTest.java
index a8390f0d9db..5360a4fd9fe 100644
--- a/flow-server/src/test/java/com/vaadin/flow/component/SvgTest.java
+++ b/flow-server/src/test/java/com/vaadin/flow/component/SvgTest.java
@@ -30,21 +30,12 @@ public void attachedToElement() {
new Svg("").getParent();
}
- @Test(expected = IllegalArgumentException.class)
- public void nullSvg() {
- new Svg((String) null);
- }
@Test(expected = IllegalArgumentException.class)
public void nullStream() {
new Svg((InputStream) null);
}
- @Test(expected = IllegalArgumentException.class)
- public void emptySvg() {
- new Svg("");
- }
-
@Test(expected = IllegalArgumentException.class)
public void text() {
new Svg("hello");
@@ -53,15 +44,13 @@ public void text() {
static String TRIVIAL_SVG = """
- """;
+ """;
static String TRIVIAL_SVG2 = """
- """;
+ """;
static String SVG_WITH_DOCTYPE_ET_AL = """
@@ -74,38 +63,40 @@ public void text() {
-
- """;
+ """;
@Test
public void simpleSvg() {
- Svg html = new Svg(TRIVIAL_SVG);
+ Svg svg = new Svg(TRIVIAL_SVG);
Assert.assertEquals(TRIVIAL_SVG,
- html.getElement().getProperty("innerHTML"));
+ getSvgDocumentBody(svg));
}
@Test
public void withDocType() {
- Svg html = new Svg(SVG_WITH_DOCTYPE_ET_AL);
- Assert.assertTrue(
- html.getElement().getProperty("innerHTML").startsWith("