diff options
author | Moonchild <moonchild@palemoon.org> | 2021-02-25 01:03:57 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-02-25 01:03:57 +0000 |
commit | ceadffab6b357723981a429e11222daf6cd6dcfb (patch) | |
tree | 5603053048d6a460f79b22bdf165fb74d32d39b0 /testing/web-platform/tests/2dcontext/hit-regions | |
parent | 14fb2f966e9b54598c451e3cb35b4aa0480dafed (diff) | |
parent | ad5a13bd501e379517da1a944c104a11d951a3f5 (diff) | |
download | UXP-RC_20210225.tar UXP-RC_20210225.tar.gz UXP-RC_20210225.tar.lz UXP-RC_20210225.tar.xz UXP-RC_20210225.zip |
Merge branch 'master' into releaseRC_20210225
Diffstat (limited to 'testing/web-platform/tests/2dcontext/hit-regions')
3 files changed, 0 insertions, 118 deletions
diff --git a/testing/web-platform/tests/2dcontext/hit-regions/.gitkeep b/testing/web-platform/tests/2dcontext/hit-regions/.gitkeep deleted file mode 100644 index e69de29bb..000000000 --- a/testing/web-platform/tests/2dcontext/hit-regions/.gitkeep +++ /dev/null diff --git a/testing/web-platform/tests/2dcontext/hit-regions/addHitRegions-NotSupportedError-01.html b/testing/web-platform/tests/2dcontext/hit-regions/addHitRegions-NotSupportedError-01.html deleted file mode 100644 index 05818aeb8..000000000 --- a/testing/web-platform/tests/2dcontext/hit-regions/addHitRegions-NotSupportedError-01.html +++ /dev/null @@ -1,89 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<meta charset="UTF-8"> -<title>Hit regions: addHitRegion throws NotSupportedError</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<div id="log"></div> -<div style="display: none"><canvas id="canvas"><button id="button">button</button></canvas></div> - -<script> -test(function () { - assert_throws({ name: "NotSupportedError" }, - function () { - var canvas = document.getElementById("canvas"); - // Reset context - canvas.width = canvas.width; - var button = document.getElementById("button"); - var context = canvas.getContext("2d"); - - // Shapes are painted without affecting the current default path, - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#drawing-rectangles-to-the-canvas - context.fillRect(25, 25, 25, 25); - - // If the specified path has no pixels, throw a NotSupportedError exception and abort these steps. - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#hit-regions - context.addHitRegion({ id: "notsupportederror_fillRect", control: button }) - }, "fillRect should not affect current default path and NotSupportedError should be thrown."); -}, "fillRect should not affect current default path and NotSupportedError should be thrown."); - -test(function () { - assert_throws({ name: "NotSupportedError" }, - function () { - var canvas = document.getElementById("canvas"); - // Reset context - canvas.width = canvas.width; - var button = document.getElementById("button"); - var context = canvas.getContext("2d"); - - // "Shapes are painted without affecting the current default path," - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#drawing-rectangles-to-the-canvas - context.strokeRect(75, 25, 25, 25); - - // "If the specified path has no pixels, throw a NotSupportedError exception and abort these steps." - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#hit-regions - context.addHitRegion({ id: "notsupportederror_strokeRect", control: button }) - }, "strokeRect should not affect current default path and NotSupportedError should be thrown."); -}, "strokeRect should not affect current default path and NotSupportedError should be thrown."); - -test(function() { - assert_throws({ name: "NotSupportedError" }, - function () { - var canvas = document.getElementById("canvas"); - // Reset context - canvas.width = canvas.width; - var button = document.getElementById("button"); - var context = canvas.getContext("2d"); - - // "These shapes are painted without affecting the current path" - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#drawing-rectangles-to-the-canvas - context.fillText("fillText", 25, 100); - - // "If the specified path has no pixels, throw a NotSupportedError exception and abort these steps." - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#drawing-text-to-the-canvas - context.addHitRegion({ id: "notsupportederror_fillText", control: button }); - }, "fillText should not affect current default path and NotSupportedError should be thrown."); -}, "fillText should not affect current default path and NotSupportedError should be thrown."); - -test(function() { - assert_throws({ name: "NotSupportedError" }, - function () { - var canvas = document.getElementById("canvas"); - canvas.width = canvas.width; - var button = document.getElementById("button"); - var context = canvas.getContext("2d"); - // "These shapes are painted without affecting the current path" - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#drawing-rectangles-to-the-canvas - context.strokeText("strokeText", 75, 100); - - // "If the specified path has no pixels, throw a NotSupportedError exception and abort these steps." - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#drawing-text-to-the-canvas - context.addHitRegion({ id: "notsupportederror_strokeText", control: button }); - }, "strokeText should not affect current default path and NotSupportedError shuld be thrown."); -}, "strokeText should not affect current default path and NotSupportedError shuld be thrown."); -</script> -</body> -</html> diff --git a/testing/web-platform/tests/2dcontext/hit-regions/hitregions-members-exist.html b/testing/web-platform/tests/2dcontext/hit-regions/hitregions-members-exist.html deleted file mode 100644 index b9203f560..000000000 --- a/testing/web-platform/tests/2dcontext/hit-regions/hitregions-members-exist.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<title>Canvas test: 2d.hitregions.members.exist</title> -<meta name="author" content="Constantine Kim"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<body> - -<h1>2d.hitregions.members.exist</h1> -<canvas></canvas> -<div id="log"></div> -<script> -test(function () { - var ctx = document.createElement('canvas').getContext('2d'); - assert_equals(typeof ctx.addHitRegion, 'function'); -}, 'context.addHitRegion Exists'); - -test(function () { - var ctx = document.createElement('canvas').getContext('2d'); - assert_equals(typeof ctx.removeHitRegion, 'function'); -}, 'context.removeHitRegion Exists'); - -test(function () { - var ctx = document.createElement('canvas').getContext('2d'); - assert_equals(typeof ctx.clearHitRegions, 'function'); -}, 'context.clearHitRegions Exists'); - -</script> -</body> -</html>
\ No newline at end of file |