Backed out changeset 713114c0331a (bug 1938707) by developer request CLOSED TREE
[gecko.git] / js / xpconnect / tests / browser / browser_realm_key_promise_frame.html
blobdfb08085cf412ea09710d8d72bc3ae1d58ba9c3a
1 <script type="text/javascript">
2 // Access to the top-level window property before getting access.
3 // This will create an entry in cross-origin realm map.
4 try {
5 window.top.P;
6 } catch (e) {}
8 document.domain = "mochi.test";
10 // Ensure that frame's Object.prototype is accessible from top-level frame
11 // when getting incumbent global object inside Promise handling.
12 window.top.P.then(v => {
13 if (v == 10) {
14 window.top.document.getElementById("result").textContent = "OK";
16 });
17 </script>