mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Add a test file for insertBefore
This commit is contained in:
parent
2254a9e923
commit
2b541a9a13
1 changed files with 22 additions and 0 deletions
22
src/test/html/content/test_node_insertBefore.html
Normal file
22
src/test/html/content/test_node_insertBefore.html
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="harness.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript">
|
||||||
|
// test1: insertBefore
|
||||||
|
{
|
||||||
|
var root = document.createElement("div");
|
||||||
|
var after = document.createElement("div");
|
||||||
|
var before = document.createElement("div");
|
||||||
|
|
||||||
|
root.appendChild(after);
|
||||||
|
|
||||||
|
is(root.insertBefore(before, after), before, "test1-0, insertBefore");
|
||||||
|
is(root.childNodes[0], before, "test1-1, insertBefore");
|
||||||
|
is(root.childNodes[1], after, "test1-2, insertBefore");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Add table
Add a link
Reference in a new issue