testing/web-platform/tests/html/canvas/element/shadows/2d.shadow.offset.positiveY.html
author Makoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 14 Jul 2025 05:41:12 +0000 (15 hours ago)
changeset 796406 1e02bb4c2af2efa34f8335befa373d2b39383b02
parent 752939 1996e4a4973941fa87e76e5646d5bb0088c0de84
permissions -rw-r--r--
Bug 1973726 - Set DOM file path for webkitRelativePath. r=sefeng,geckoview-reviewers,webidl,smaug,ohall Actually, there is no way to set webkitRelativePath from JavaScript. Since GeckoView's folder picker handles virtual file data, we need to set relative path from JavaScript directly. A content URI of System storage document provider only allow file data access from file/folder picker, so there is no way to test it on geckoivew-junit. Also, after landing bug 1591640, GVE always crash when using folder picker. So this includes a fix for it. Differential Revision: https://phabricator.services.mozilla.com/D255615
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<meta charset="UTF-8">
<title>Canvas test: 2d.shadow.offset.positiveY</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
<body class="show_output">

<h1>2d.shadow.offset.positiveY</h1>
<p class="desc">Shadows can be offset with positive y</p>


<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("Shadows can be offset with positive y");
_addTest(function(canvas, ctx) {

  ctx.fillStyle = '#f00';
  ctx.fillRect(0, 0, 100, 50);
  ctx.fillStyle = '#0f0';
  ctx.shadowColor = '#0f0';
  ctx.shadowOffsetY = 25;
  ctx.fillRect(0, 0, 100, 25);
  _assertPixel(canvas, 50,12, 0,255,0,255);
  _assertPixel(canvas, 50,37, 0,255,0,255);

});
</script>