Update web-platform-tests to revision e2364b32eb46c41c242f6f728b3cb937f5d92328

This commit is contained in:
WPT Sync Bot 2020-07-26 08:20:34 +00:00
parent fa9b077e84
commit 7aa6c54799
80 changed files with 583 additions and 143 deletions

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>Canvas test: 2d.canvas.context</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.canvas.context</h1>
<p class="desc">checks CanvasRenderingContext2D prototype</p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<ul id="d"></ul>
<script>
var t = async_test("checks CanvasRenderingContext2D prototype");
_addTest(function(canvas, ctx) {
_assertSame(CanvasRenderingContext2D.prototype.__proto__, Object.prototype, "CanvasRenderingContext2D.prototype.__proto__", "Object.prototype");
_assertSame(ctx.__proto__, CanvasRenderingContext2D.prototype, "ctx.__proto__", "CanvasRenderingContext2D.prototype");
t.done();
});
</script>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>Canvas test: 2d.getcontext.invalid.args</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.getcontext.invalid.args</h1>
<p class="desc">Calling getContext with invalid arguments.</p>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<ul id="d"></ul>
<script>
var t = async_test("Calling getContext with invalid arguments.");
_addTest(function(canvas, ctx) {
_assertSame(canvas.getContext(''), null, "canvas.getContext('')", "null");
_assertSame(canvas.getContext('2d#'), null, "canvas.getContext('2d#')", "null");
_assertSame(canvas.getContext('This is clearly not a valid context name.'), null, "canvas.getContext('This is clearly not a valid context name.')", "null");
_assertSame(canvas.getContext('2d\0'), null, "canvas.getContext('2d\\0')", "null");
_assertSame(canvas.getContext('2\uFF44'), null, "canvas.getContext('2\\uFF44')", "null");
_assertSame(canvas.getContext('2D'), null, "canvas.getContext('2D')", "null");
assert_throws_js(TypeError, function() { canvas.getContext(); });
_assertSame(canvas.getContext('null'), null, "canvas.getContext('null')", "null");
_assertSame(canvas.getContext('undefined'), null, "canvas.getContext('undefined')", "null");
});
</script>