Skip to content

Commit

Permalink
avm1: Add a test for .childNodes edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian17 authored and Dinnerbone committed Oct 16, 2023
1 parent a8ea913 commit b02038b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/tests/swfs/avm1/xml_child_nodes_edge_cases/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<a />,<b />
<a />,<b />,<c />
<a />,<b />,<c />,<d />
<a />,<b />,<c />,<e />
9 changes: 9 additions & 0 deletions tests/tests/swfs/avm1/xml_child_nodes_edge_cases/test.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var my_xml = new XML("<lst><a></a><b></b></lst>");
var a = my_xml.firstChild.childNodes;
trace(a);
my_xml.firstChild.appendChild(my_xml.createElement("c"))
trace(a);
a.push(my_xml.createElement("d"))
trace(a);
my_xml.firstChild.appendChild(my_xml.createElement("e"))
trace(a);
Binary file not shown.
1 change: 1 addition & 0 deletions tests/tests/swfs/avm1/xml_child_nodes_edge_cases/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
num_frames = 1

0 comments on commit b02038b

Please sign in to comment.