4 https://bugzilla.mozilla.org/show_bug.cgi?id=1037990
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"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1037990">Mozilla Bug
1037990</a>
15 <div id=
"content" style=
"display: none">
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';
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];
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()");