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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user