mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:47:45 +00:00
LibWeb/Tests: Port two DOM cloneNode() test cases to text tests
This commit is contained in:
parent
a5fb0b4243
commit
ed03dd0f99
6 changed files with 83 additions and 69 deletions
23
Tests/LibWeb/Text/input/ProcessingInstruction-cloneNode.html
Normal file
23
Tests/LibWeb/Text/input/ProcessingInstruction-cloneNode.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<script src="include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let pi = document.createProcessingInstruction("someTarget", "someData")
|
||||
let clone = pi.cloneNode()
|
||||
|
||||
function dumpProcessingInstruction(name, pi) {
|
||||
println(name + ": " + pi)
|
||||
println(name + ".target: " + pi.target)
|
||||
println(name + ".data: " + pi.data)
|
||||
println("")
|
||||
}
|
||||
|
||||
dumpProcessingInstruction("pi", pi)
|
||||
dumpProcessingInstruction("clone", clone)
|
||||
|
||||
println("pi === clone -> " + (pi === clone))
|
||||
println("pi.isEqualNode(clone) -> " + pi.isEqualNode(clone))
|
||||
|
||||
let other = document.createProcessingInstruction("baz", "bux")
|
||||
println("pi.isEqualNode(other) -> " + pi.isEqualNode(other))
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue