| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <script> |
| 5 var t = async_test('Make sure that source based image resources are not down
loaded after the img is removed from the DOM.'); |
| 6 </script> |
| 7 <iframe id=frame src="resources/image-picture-no-download-after-removal-frame.ht
ml" width="700px"></iframe> |
| 8 <script> |
| 9 window.addEventListener("message", t.step_func(function(msg) { |
| 10 if (msg.data == "shrink") { |
| 11 document.getElementsByTagName("iframe")[0].width = "150px"; |
| 12 } else if (msg.data.indexOf("test_") != -1) { |
| 13 assert_equals(msg.data, "test_1"); |
| 14 t.done(); |
| 15 } |
| 16 })); |
| 17 |
| 18 // Since we want to see that a new resource wasn't downloaded, the only way
is a timeout. |
| 19 setTimeout(t.step_func(function() { |
| 20 document.getElementById("frame").contentWindow.postMessage("test", "*"); |
| 21 }), 500); |
| 22 </script> |
| OLD | NEW |