Added tests to spec out behavior of html with self-closing tags.
authorSubramanya Sastry <ssastry@wikimedia.org>
Wed, 26 Sep 2012 23:27:40 +0000 (18:27 -0500)
committerSubramanya Sastry <ssastry@wikimedia.org>
Wed, 26 Sep 2012 23:28:28 +0000 (18:28 -0500)
Change-Id: I370bc0ddd2c838bb64239e3c075fc941e55f30b7

tests/parser/parserTests.txt

index dacc726..0ba21d9 100644 (file)
@@ -2852,6 +2852,47 @@ Failing to transform badly formed HTML into correct XHTML
 </p>
 !!end
 
+!! test
+Handling html with a div self-closing tag
+!! input
+<div title />
+<div title/>
+<div title/ >
+<div title=bar />
+<div title=bar/>
+<div title=bar/ >
+!! result
+<p>&lt;div title /&gt;
+&lt;div title/&gt;
+</p>
+<div>
+<p>&lt;div title=bar /&gt;
+&lt;div title=bar/&gt;
+</p>
+<div title="bar/"></div>
+</div>
+
+!! end
+
+!! test
+Handling html with a br self-closing tag
+!! input
+<br title />
+<br title/>
+<br title/ >
+<br title=bar />
+<br title=bar/>
+<br title=bar/ >
+!! result
+<p><br title="title" />
+<br title="title" />
+<br />
+<br title="bar" />
+<br title="bar" />
+<br title="bar/" />
+</p>
+!! end
+
 !! test
 Horizontal ruler (should it add that extra space?)
 !! input