4 <title>Test Cross-Compartment DOM WeakMaps
</title>
5 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
10 <script type=
"application/javascript">
12 var my_map = new WeakMap();
15 var item = window.frames[
0].document.querySelector(
"body");
17 my_map.set(item,
"success_string");
22 SpecialPowers.forceGC();
23 SpecialPowers.forceCC();
24 SpecialPowers.forceGC();
25 SpecialPowers.forceCC();
26 var item = window.frames[
0].document.querySelector(
"body");
27 is(my_map.get(item),
"success_string",
"Preserve reflectors used cross-compartment as weak map keys.");
31 <iframe src=
"file_crosscompartment_weakmap.html" onload=
"runTest()"></iframe>