mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add testcase #2025 for document.getElementById().
This commit is contained in:
parent
c6bdc7b7f2
commit
2b0e77945d
1 changed files with 14 additions and 0 deletions
|
@ -92,6 +92,20 @@
|
|||
is(document.getElementById("x"), null, "test 7-0");
|
||||
}
|
||||
|
||||
// test 8
|
||||
{
|
||||
let TEST_ID = "test-8"
|
||||
let element = document.createElement("div");
|
||||
element.setAttribute("id", TEST_ID);
|
||||
document.body.appendChild(element);
|
||||
let target = document.getElementById(TEST_ID);
|
||||
is_not(target, null, "test 8-0, getElementById is correct before changing the value");
|
||||
|
||||
element.attributes[0].value = TEST_ID + "-updated";
|
||||
let target2 = document.getElementById(TEST_ID);
|
||||
is(target2, null, "test 8-1, should return null after updated id via Attr.value");
|
||||
}
|
||||
|
||||
finish();
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue