Bug 1776680 [wpt PR 34603] - [@container] Test invalidation of font-relative units...
[gecko.git] / dom / events / test / test_bug1037990.html
blobc148debcf75aacf2f2bca3a16b8fbed8ef81a3ff
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=1037990
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 1037990</title>
9 <script src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1037990">Mozilla Bug 1037990</a>
14 <p id="display"></p>
15 <div id="content" style="display: none">
17 </div>
18 <pre id="test">
19 </pre>
20 <script type="application/javascript">
22 /** Test for Bug 1037990 **/
24 var pre, node, detachedAccess, attachedAcess;
26 node = document.createElement('a');
27 node.href = 'http://example.org';
28 node.accessKey = 'e';
29 detachedAccess = node.accessKeyLabel;
30 info('[window.document] detached: ' + detachedAccess);
31 document.body.appendChild(node);
32 attachedAcess = node.accessKeyLabel;
33 info('[window.document] attached: ' + attachedAcess);
34 is(detachedAccess, attachedAcess, "Both values are same for the window.document");
36 var parser=new DOMParser();
37 var xmlDoc=parser.parseFromString("<root></root>","text/xml");
38 var nn = xmlDoc.createElementNS('http://www.w3.org/1999/xhtml','a');
39 nn.setAttribute('accesskey','t')
40 detachedAccess = nn.accessKeyLabel;
41 info('[xmlDoc] detached: ' + detachedAccess);
42 var root = xmlDoc.getElementsByTagName('root')[0];
43 root.appendChild(nn);
44 attachedAcess = nn.accessKeyLabel;
45 info('[xmlDoc] attached: ' + attachedAcess);
46 is(detachedAccess, attachedAcess, "Both values are same for the xmlDoc");
48 var myDoc = new Document();
49 var newnode = myDoc.createElementNS('http://www.w3.org/1999/xhtml','a');
50 newnode.href = 'http://example.org';
51 newnode.accessKey = 'f';
52 detachedAccess = newnode.accessKeyLabel;
53 info('[new document] detached: ' + detachedAccess);
54 myDoc.appendChild(newnode);
55 attachedAcess = newnode.accessKeyLabel;
56 info('[new document] attached: ' + attachedAcess);
57 is(detachedAccess, attachedAcess, "Both values are same for the new Document()");
59 </script>
60 </body>
61 </html>