ParentNode#appendChild(null) shouldn't crash

We just needed to throw the proper exception when handed null for a
non-nullable argument.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/934863002
This commit is contained in:
Adam Barth
2015-02-17 10:15:27 -08:00
parent 261d740312
commit 64409f370b

View File

@@ -17,10 +17,9 @@ void main() {
expect(() {
parent.appendChild();
}, throws);
// TODO(dart): This is a real bug.
// expect(() {
// parent.appendChild(null);
// }, throws);
expect(() {
parent.appendChild(null);
}, throws);
expect(() {
parent.appendChild({tagName: "div"});
}, throws);