Chromium Code Reviews| 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 previousely non-matching source based ima ge resources are downloaded after the viewport changes.'); | |
|
cbiesinger
2016/09/02 19:09:21
previousely -> previously
| |
| 6 </script> | |
| 7 <iframe id=frame src="resources/image-picture-download-after-shrink-frame.html" 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_2"); | |
| 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 |