blob: 8229ce88d82ad05e8f7e1d1e9886f49c282bc805 [file] [log] [blame]
<!doctype html>
<body>
<script src=/resources/testharness.js></script>
<script>
function loadImage(url, hasSharedStorageWritableAttribute) {
return new Promise(function(resolve, reject) {
var img = document.createElement('img');
document.body.appendChild(img);
img.onload = function() {
resolve(img);
};
img.onerror = function() {
reject(new Error('Image load failed'));
};
if (hasSharedStorageWritableAttribute) {
img.sharedStorageWritable = true;
}
img.src = url;
});
}
</script>
</body>