testing/web-platform/tests/cors/resources/image-tainting-checker.sub.html
author Alexandru Marc <amarc@mozila.com>
Tue, 15 Jul 2025 02:33:52 +0300 (7 hours ago)
changeset 796591 ca1cc5350282d2e1047872fb126704505db5e97a
parent 411011 d9e926e5f731819768d45bef3bcb828a4cdc77f4
permissions -rw-r--r--
Revert "Bug 1938967 - Part 2: Use relative paths within Taskbar Tabs to create shortcuts. r=nrishel,fluent-reviewers,bolsson" for causing bc failures @ browser_createWindowsShortcut.js This reverts commit 76c91e29a4310104f82d32ce50de9faf027c34f5. Revert "Bug 1938967 - Part 1: Allow shortcuts to be located in subdirectories of the Start menu or desktop. r=nrishel" This reverts commit 17f3a92d47e36c8a879be8d0bf1777cbcb72dc91.
<!DOCTYPE html>
<body>
<canvas id="canvas"></canvas>
<script>
// Used by image-tainting-in-cross-origin-iframe.sub.html to check that an
// image resource loaded by the top level frame that is same-origin to the
// frame isn't treated as a same-origin resource in a cross-origin iframe.
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
const img = new Image();
img.src = 'http://{{host}}:{{ports[http][0]}}/images/blue-png-cachable.py';
img.onload = () => {
  ctx.drawImage(img, 0, 0);
  try {
    ctx.getImageData(0, 0, 1, 1);
    parent.postMessage('FAIL: getImageData() didn\'t throw', '*');
  } catch (e) {
    parent.postMessage('DONE', '*');
  }
};
</script>
</body>