3 <title>Test for Bug
1808352</title>
4 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 <div id=
"testnode"></div>
8 function loadedFrame() {
9 var node
= document
.getElementById("testnode");
10 var frame
= document
.getElementById("frame");
11 frame
.contentWindow
.document
.adoptNode(node
);
12 document
.adoptNode(node
);
14 // Use a loop to ensure the JITs optimize the `id` getter access.
15 for (var i
= 0; i
< 10_000
; i
++) {
18 is(res
, "testnode", "expected node id");
21 SimpleTest
.waitForExplicitFinish();
22 document
.domain
= "mochi.test"; // We want a cross-compartment adoptNode.
24 <iframe id=
"frame" src=
"http://test1.mochi.test:8888/tests/dom/bindings/test/file_bug1808352_frame.html"></iframe>