Complain if wrapper div has attributes in tests
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Thu, 02 Jun 2011 12:08:27 -0600
changeset 222 0177938db4f6
parent 221 58269f1b58b5
child 223 d949a407fd75
Complain if wrapper div has attributes in tests
autoimplementation.html
--- a/autoimplementation.html	Tue May 31 15:44:43 2011 -0600
+++ b/autoimplementation.html	Thu Jun 02 12:08:27 2011 -0600
@@ -2132,6 +2132,11 @@
 			throw "DOM does not round-trip through serialization!";
 		}
 
+		if (specCell.firstChild.attributes.length) {
+			throw "Wrapper div has attributes!  " +
+				specCell.innerHTML.replace(/<div><\/div>$/, "");
+		}
+
 		specCell.lastChild.textContent = specCell.firstChild.innerHTML;
 	} catch (e) {
 		specCell.firstChild.contentEditable = "inherit";
@@ -2276,6 +2281,11 @@
 			throw "DOM does not round-trip through serialization!";
 		}
 
+		if (browserCell.firstChild.attributes.length) {
+			throw "Wrapper div has attributes!  " +
+				browserCell.innerHTML.replace(/<div><\/div>$/, "");
+		}
+
 		browserCell.lastChild.textContent = browserCell.firstChild.innerHTML;
 	} catch (e) {
 		if (testDiv) {