Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sky/tests/dom/insertBefore-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
unittest-suite-wait-for-done
PASS: should throw with invalid arguments

All 1 tests passed.
unittest-suite-success
DONE
25 changes: 25 additions & 0 deletions sky/tests/dom/insertBefore.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import "../resources/dom_utils.dart";
import "../resources/third_party/unittest/unittest.dart";
import "../resources/unit.dart";

import "dart:sky";

void main() {
initUnit();

Document document = new Document();

test("should throw with invalid arguments", () {
var parent = document.createElement("div");
var child = document.createElement("div");
parent.appendChild(child);
// TODO(eseidel): This should throw!
// expect(() {
// parent.insertBefore([parent]);
// }, throws);
expect(() {
child.insertBefore([parent]);
}, throws);
});

}