diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/events/test/test_bug1037990.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/events/test/test_bug1037990.html')
-rw-r--r-- | dom/events/test/test_bug1037990.html | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/dom/events/test/test_bug1037990.html b/dom/events/test/test_bug1037990.html new file mode 100644 index 000000000..025c8744b --- /dev/null +++ b/dom/events/test/test_bug1037990.html @@ -0,0 +1,61 @@ +<!DOCTYPE HTML> +<html> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=1037990 +--> +<head> + <meta charset="utf-8"> + <title>Test for Bug 1037990</title> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> +</head> +<body> +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1037990">Mozilla Bug 1037990</a> +<p id="display"></p> +<div id="content" style="display: none"> + +</div> +<pre id="test"> +</pre> +<script type="application/javascript"> + + /** Test for Bug 1037990 **/ + + var pre, node, detachedAccess, attachedAcess; + + node = document.createElement('a'); + node.href = 'http://example.org'; + node.accessKey = 'e'; + detachedAccess = node.accessKeyLabel; + info('[window.document] detached: ' + detachedAccess); + document.body.appendChild(node); + attachedAcess = node.accessKeyLabel; + info('[window.document] attached: ' + attachedAcess); + is(detachedAccess, attachedAcess, "Both values are same for the window.document"); + + var parser=new DOMParser(); + var xmlDoc=parser.parseFromString("<root></root>","text/xml"); + var nn = xmlDoc.createElementNS('http://www.w3.org/1999/xhtml','a'); + nn.setAttribute('accesskey','t') + detachedAccess = nn.accessKeyLabel; + info('[xmlDoc] detached: ' + detachedAccess); + var root = xmlDoc.getElementsByTagName('root')[0]; + root.appendChild(nn); + attachedAcess = nn.accessKeyLabel; + info('[xmlDoc] attached: ' + attachedAcess); + is(detachedAccess, attachedAcess, "Both values are same for the xmlDoc"); + + var myDoc = new Document(); + var newnode = myDoc.createElementNS('http://www.w3.org/1999/xhtml','a'); + newnode.href = 'http://example.org'; + newnode.accessKey = 'f'; + detachedAccess = newnode.accessKeyLabel; + info('[new document] detached: ' + detachedAccess); + myDoc.appendChild(newnode); + attachedAcess = newnode.accessKeyLabel; + info('[new document] attached: ' + attachedAcess); + is(detachedAccess, attachedAcess, "Both values are same for the new Document()"); + +</script> +</body> +</html> |