| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../../../fast/js/resources/js-test-pre.js"></script> | |
| 5 <script> | |
| 6 window.jsTestIsAsync = true; | |
| 7 if (window.testRunner) { | |
| 8 testRunner.dumpAsText(); | |
| 9 testRunner.dumpResourceRequestCallbacks(); | |
| 10 } else { | |
| 11 document.write("This test cannot run without a testRunner"); | |
| 12 } | |
| 13 | |
| 14 function requestMoreResources() { | |
| 15 document.getElementById("img-changing").src = "../../../../fast/images/resou
rces/mu.png"; | |
| 16 | |
| 17 var createdImage = document.createElement("img"); | |
| 18 createdImage.id = "img-created"; | |
| 19 createdImage.src = "../../../../fast/images/resources/oval.png"; | |
| 20 document.getElementById("images").appendChild(createdImage); | |
| 21 | |
| 22 document.getElementById("with-background").style.backgroundImage = "url(../.
./../../fast/images/resources/palatted-color-png-gamma-one-color-profile.png)"; | |
| 23 | |
| 24 document.getElementById("more-images").innerHTML = "<img id='img-created-2'
src='../../../../fast/images/resources/png_per_row_alpha.png'>"; | |
| 25 | |
| 26 var createdScript = document.createElement("script"); | |
| 27 createdScript.id = "script-created"; | |
| 28 createdScript.src = "../../../../fast/loader/resources/empty-script.js"; | |
| 29 document.head.appendChild(createdScript); | |
| 30 | |
| 31 setTimeout(finishTest, 0); | |
| 32 } | |
| 33 | |
| 34 function finishTest() { | |
| 35 testPassed(""); | |
| 36 finishJSTest(); | |
| 37 } | |
| 38 </script> | |
| 39 <style> | |
| 40 #with-background | |
| 41 { | |
| 42 background-image:url("../../../../fast/images/resources/lenna.png"); | |
| 43 } | |
| 44 body | |
| 45 { | |
| 46 cursor:url("../../../../fast/events/resources/greenbox-hotspot35-4.cur"), po
inter; | |
| 47 } | |
| 48 @font-face | |
| 49 { | |
| 50 font-family: custom_font; | |
| 51 src: url("../../../../fast/text/resources/gw432047.ttf"); | |
| 52 } | |
| 53 p | |
| 54 { | |
| 55 font-family: custom_font; | |
| 56 } | |
| 57 </style> | |
| 58 </head> | |
| 59 <body onload="setTimeout(requestMoreResources, 100);"> | |
| 60 <div id="with-background"> | |
| 61 <p> | |
| 62 This test checks that the correct callbacks for resource requests are | |
| 63 invoked. It passes if you see the callbacks for eight resources. | |
| 64 </p> | |
| 65 </div> | |
| 66 <div id="images"> | |
| 67 <img id="img-normal" src="../../../../fast/images/resources/dice.png" /> | |
| 68 <img id="img-changing" src="../../../../fast/images/resources/dice.png" /> | |
| 69 <img id="img-fail" /> | |
| 70 <img id="img-not-there" src="not-existing.png" /> | |
| 71 </div> | |
| 72 <div id="more-images"> | |
| 73 </div> | |
| 74 <div id="console"></div> | |
| 75 <script src="../../../../fast/js/resources/js-test-post.js"></script> | |
| 76 </body> | |
| 77 </html> | |
| OLD | NEW |