| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script> | |
| 4 if (window.testRunner) { | |
| 5 testRunner.dumpAsText(); | |
| 6 testRunner.waitUntilDone(); | |
| 7 } | |
| 8 | |
| 9 var object1Result = ""; | |
| 10 var object2Result = ""; | |
| 11 var embed3Result = ""; | |
| 12 var embed4Result = ""; | |
| 13 var object5Result = ""; | |
| 14 var notified = false; | |
| 15 | |
| 16 document.addEventListener("beforeload", function(event) { | |
| 17 if (event.url == "") | |
| 18 return; | |
| 19 | |
| 20 if (event.target.id == "object1") { | |
| 21 object1Result = (event.url == "object-attr" ? "does" : "does
not"); | |
| 22 } else if (event.target.id == "object2") { | |
| 23 object2Result = (event.url == "object-param" ? "does" : "doe
s not"); | |
| 24 } else if (event.target.id == "embed3") { | |
| 25 embed3Result = (event.url == "embed-attr" ? "does" : "does n
ot"); | |
| 26 } else if (event.target.id == "embed4") { | |
| 27 embed4Result = (event.url == "embed-attr" ? "does" : "does n
ot"); | |
| 28 } else if (event.target.id == "object5") { | |
| 29 object5Result = (event.url == "object-param" ? "does" : "doe
s not"); | |
| 30 } | |
| 31 | |
| 32 if (!notified && object1Result != "" && object2Result != "" && e
mbed3Result != "" && embed4Result != "" && object5Result != "") { | |
| 33 debug("An <object> with a 'data' @attr and a 'src' <
;param> should load the URL from the 'data' @attr and " + object1Result + "."
); | |
| 34 debug("An <object> with a 'src' <param> should l
oad the URL from the 'src' <param> and " + object2Result + "."); | |
| 35 debug("An <object> with no URL specified and a nested
<embed> should load the URL from the 'src' @attr of the <embed> and
" + embed3Result + "."); | |
| 36 debug("An <object> with a URL specified in a 'src' <
;param> and a nested <embed> should load the URL from the 'src' @attr o
f the <embed> and " + embed3Result + "."); | |
| 37 debug("An <object> with a URL specified in a 'src' <
;param> and a MIME type specified in a 'type' <param> should load the U
RL from the 'src' <param> and " + object5Result + "."); | |
| 38 notified = true; | |
| 39 if (window.testRunner) | |
| 40 testRunner.notifyDone(); | |
| 41 } | |
| 42 }, true); | |
| 43 | |
| 44 function debug(str) { | |
| 45 document.getElementById('console').innerHTML += str + "<br>"; | |
| 46 } | |
| 47 </script> | |
| 48 </head> | |
| 49 <body> | |
| 50 <p>This test verifies that the right URL is loaded when there is an <
object> with a 'src' <param> and a fallback <embed>.</p> | |
| 51 <div id="console"></div> | |
| 52 <object id="object1" type="application/x-webkit-test-netscape" data="obj
ect-attr"> | |
| 53 <param name="src" value="object-param"></param> | |
| 54 <embed id="embed1" type="application/x-webkit-test-netscape" src="em
bed-attr"> | |
| 55 </object> | |
| 56 <object id="object2" type="application/x-webkit-test-netscape"> | |
| 57 <param name="movie" value="object-param"></param> | |
| 58 <embed id="embed2" type="application/x-webkit-test-netscape" src="em
bed-attr"> | |
| 59 </object> | |
| 60 <object id="object3"> | |
| 61 <embed id="embed3" type="application/x-webkit-test-netscape" src="em
bed-attr"> | |
| 62 </object> | |
| 63 <object id="object4"> | |
| 64 <param name="code" value="object-param"></param> | |
| 65 <embed id="embed4" type="application/x-webkit-test-netscape" src="em
bed-attr"> | |
| 66 </object> | |
| 67 <object id="object5"> | |
| 68 <param name="url" value="object-param"></param> | |
| 69 <param name="type" value="application/x-webkit-test-netscape"></para
m> | |
| 70 </object> | |
| 71 </body> | |
| 72 </html> | |
| OLD | NEW |