test: update empty xml parse error case in domparser.html

This commit is contained in:
sjhddh committed 2026-03-15 07:25:47 +00:00
1 parent 3013e3a9e6
commit 56d3cf51e8
1 file changed
+2 -2
+2 -2
View File
@@ -11,9 +11,9 @@
}
{
// Empty XML is a parse error (no root element)
const parser = new DOMParser();
testing.expectError('Error', () => parser.parseFromString('', 'text/xml'));
let d = parser.parseFromString('', 'text/xml');
testing.expectEqual('<parsererror>error</parsererror>', new XMLSerializer().serializeToString(d));
}
}
</script>