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/html/test/test_bug870787.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/html/test/test_bug870787.html')
-rw-r--r-- | dom/html/test/test_bug870787.html | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/dom/html/test/test_bug870787.html b/dom/html/test/test_bug870787.html new file mode 100644 index 000000000..92a871284 --- /dev/null +++ b/dom/html/test/test_bug870787.html @@ -0,0 +1,84 @@ +<!DOCTYPE HTML> +<html> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=870787 +--> +<head> + <title>Test for Bug 870787</title> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> + <script type="application/javascript" src="reflect.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=870787">Mozilla Bug 870787</a> + +<p id="msg"></p> + +<form id="form0"></form> +<img name="img0" id="img0id"> + +<img name="img1" id="img1id" /> +<form id="form1"> + <img name="img2" id="img2id" /> +</form> +<img name="img3" id="img3id" /> + +<table> + <form id="form2"> + <tr><td> + <button name="input1" id="input1id" /> + <input name="input2" id="input2id" /> + </form> +</table> + +<table> + <form id="form3"> + <tr><td> + <img name="img4" id="img4id" /> + <img name="img5" id="img5id" /> + </form> +</table> + +<form id="form4"><img id="img6"></form> + +<pre id="test"> +<script type="application/javascript"> + +/** Test for Bug 870787 **/ + +var form0 = document.getElementById("form0"); +ok(form0, "Form0 exists"); +ok(!form0.img0, "Form0.img0 doesn't exist"); +ok(!form0.img0id, "Form0.img0id doesn't exist"); + +var form1 = document.getElementById("form1"); +ok(form1, "Form1 exists"); +ok(!form1.img1, "Form1.img1 doesn't exist"); +ok(!form1.img1id, "Form1.img1id doesn't exist"); +is(form1.img2, document.getElementById("img2id"), "Form1.img2 exists"); +is(form1.img2id, document.getElementById("img2id"), "Form1.img2id exists"); +ok(!form1.img3, "Form1.img3 doesn't exist"); +ok(!form1.img3id, "Form1.img3id doesn't exist"); + +var form2 = document.getElementById("form2"); +ok(form2, "Form2 exists"); +is(form2.input1, document.getElementById("input1id"), "Form2.input1 exists"); +is(form2.input1id, document.getElementById("input1id"), "Form2.input1id exists"); +is(form2.input2, document.getElementById("input2id"), "Form2.input2 exists"); +is(form2.input2id, document.getElementById("input2id"), "Form2.input2id exists"); + +var form3 = document.getElementById("form3"); +ok(form3, "Form3 exists"); +is(form3.img4, document.getElementById("img4id"), "Form3.img4 doesn't exists"); +is(form3.img4id, document.getElementById("img4id"), "Form3.img4id doesn't exists"); +is(form3.img5, document.getElementById("img5id"), "Form3.img5 doesn't exists"); +is(form3.img5id, document.getElementById("img5id"), "Form3.img5id doesn't exists"); + +var form4 = document.getElementById("form4"); +ok(form4, "Form4 exists"); +is(Object.getOwnPropertyNames(form4.elements).indexOf("img6"), -1, "Form4.elements should not contain img6"); + +</script> +</pre> +</body> +</html> |