| <meta http-equiv="Content-Security-Policy" content="img-src *"> |
| testRunner.waitUntilDone(); |
| function loadImage(event) |
| var image = document.createElement("img"); |
| image.onload = testFinished; |
| image.onerror = testFinished; |
| image.src = window.URL.createObjectURL(event.target.files[0]); |
| document.body.removeChild(fileInput); |
| document.body.appendChild(image); |
| var x = fileInput.offsetLeft + fileInput.offsetWidth / 2; |
| var y = fileInput.offsetTop + fileInput.offsetHeight / 2; |
| eventSender.beginDragWithFiles(["../../fast/dom/resources/abe.png"]); |
| eventSender.mouseMoveTo(x, y); |
| window.onload = function () |
| fileInput = document.getElementById("file"); |
| fileInput.onchange = loadImage; |
| <p>This tests that loading image with a blob URL is blocked when the page has Content Security Policy "image-src *". To run this test by hand, select an image file. This test PASSED if you see the word PASS below. Otherwise, it FAILED.</p> |
| <input type="file" id="file" accept="image/*"> |