chromium/third_party/blink/web_tests/external/wpt/css/css-images/image-orientation/reference/image-orientation-none-cross-origin-canvas-ref.html

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Images Module Level 3: image-orientation: none</title>
<link rel="author" title="Noam Rosenthal" href="mailto:[email protected]">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5165">
<style>
    body {
        overflow: hidden;
        image-orientation: none;
    }
    img {display: none}
    canvas {
        width: 20px;
        height: 20px;
        margin: 10px;
    }
</style>
<body>
    <p>You should see 8 green rectangles, no red.</p>
</body>
<script>
    const img = document.createElement('img')
    img.src = '../support/exif-orientation-1-ul.jpg'

    document.body.appendChild(img)

    const dimension = 5
    window.onload = () => {
        for (let i = 0; i < 8; ++i) {
            const canvas = document.createElement('canvas')
            canvas.width = canvas.height = dimension
            const ctx = canvas.getContext('2d')
            ctx.drawImage(img, 0, 0)
            document.body.appendChild(canvas)
        }

    }
</script>
</head>
</html>