OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
4 window.onload = function() | 4 window.onload = function() |
5 { | 5 { |
6 if (window.testRunner) { | 6 if (window.testRunner) { |
7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
8 } | 8 } |
9 | 9 |
10 function alertMsg(msg) { | 10 function alertMsg(msg) { |
(...skipping 12 matching lines...) Expand all Loading... |
23 function(iFrame) { iFrame.attributes['src'].firstChild.data = alertMsg("
nodeValue");}, | 23 function(iFrame) { iFrame.attributes['src'].firstChild.data = alertMsg("
nodeValue");}, |
24 | 24 |
25 // Node attribute manipulation functions | 25 // Node attribute manipulation functions |
26 function(iFrame) { iFrame.setAttribute("src", alertMsg("setAttribute"));
}, | 26 function(iFrame) { iFrame.setAttribute("src", alertMsg("setAttribute"));
}, |
27 function(iFrame) { iFrame.setAttributeNS(null, "src", alertMsg("setAttri
buteNS"));}, | 27 function(iFrame) { iFrame.setAttributeNS(null, "src", alertMsg("setAttri
buteNS"));}, |
28 function(iFrame) { | 28 function(iFrame) { |
29 var a = document.createAttribute('src'); | 29 var a = document.createAttribute('src'); |
30 a.nodeValue = alertMsg("setAttributeNode"); | 30 a.nodeValue = alertMsg("setAttributeNode"); |
31 iFrame.setAttributeNode(a); | 31 iFrame.setAttributeNode(a); |
32 }, | 32 }, |
33 function(iFrame) { | |
34 var a = document.createAttribute('src'); | |
35 a.nodeValue = alertMsg("setAttributeNodeNS"); | |
36 iFrame.setAttributeNodeNS(a); | |
37 }, | |
38 // Child manipulation methods | 33 // Child manipulation methods |
39 function(iFrame) { | 34 function(iFrame) { |
40 var src = iFrame.attributes['src']; | 35 var src = iFrame.attributes['src']; |
41 src.appendChild(document.createTextNode(alertMsg("appendChild() + re
moveChild()"))); | 36 src.appendChild(document.createTextNode(alertMsg("appendChild() + re
moveChild()"))); |
42 src.removeChild(src.firstChild); | 37 src.removeChild(src.firstChild); |
43 }, | 38 }, |
44 function(iFrame) { | 39 function(iFrame) { |
45 var src = iFrame.attributes['src']; | 40 var src = iFrame.attributes['src']; |
46 src.replaceChild(document.createTextNode(alertMsg("replaceChild()"))
, src.firstChild); | 41 src.replaceChild(document.createTextNode(alertMsg("replaceChild()"))
, src.firstChild); |
47 }, | 42 }, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 92 } |
98 | 93 |
99 </script> | 94 </script> |
100 </head> | 95 </head> |
101 <body> | 96 <body> |
102 <p>This script tests if iframe.src can be set to a JavaScript URL via alternate | 97 <p>This script tests if iframe.src can be set to a JavaScript URL via alternate |
103 DOM interfaces (such as Node.textContent or NamedNode.setNamedItem). | 98 DOM interfaces (such as Node.textContent or NamedNode.setNamedItem). |
104 The test is successful if no alerts appear and the page finishes loading.</p> | 99 The test is successful if no alerts appear and the page finishes loading.</p> |
105 </body> | 100 </body> |
106 </html> | 101 </html> |
OLD | NEW |