|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=1043690 |
|
5 --> |
|
6 <head> |
|
7 <meta charset="utf-8"> |
|
8 <title>Test for Bug 1043690</title> |
|
9 <script type="application/javascript" 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=1043690">Mozilla Bug 1043690</a> |
|
14 <p id="display"></p> |
|
15 <div id="content" style="display: none"> |
|
16 <form> |
|
17 <input name="action"> |
|
18 </form> |
|
19 </div> |
|
20 <script type="application/javascript"> |
|
21 |
|
22 /** Test for Bug 1043690 **/ |
|
23 var f = document.querySelector("form"); |
|
24 var i = document.querySelector("input"); |
|
25 ise(f.getAttribute("action"), null, "Should have no action attribute"); |
|
26 ise(f.action, i, "form.action should be the input"); |
|
27 f.action = "http://example.org"; |
|
28 ise(f.getAttribute("action"), "http://example.org", |
|
29 "Should have an action attribute now"); |
|
30 ise(f.action, i, "form.action should still be the input"); |
|
31 i.remove(); |
|
32 ise(f.action, "http://example.org/", |
|
33 "form.action should no longer be shadowed"); |
|
34 |
|
35 |
|
36 </script> |
|
37 <pre id="test"> |
|
38 </pre> |
|
39 </body> |
|
40 </html> |