Update web-platform-tests to revision 4a5223502fa660ce03e470af6a61c8bc26c5a8ee

This commit is contained in:
WPT Sync Bot 2018-04-23 21:13:37 -04:00
parent c5f7c9ccf3
commit e891345f26
1328 changed files with 36632 additions and 20588 deletions

View file

@ -1,41 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>canvas drawCustomFocusRing() step1 test</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="author" title="Takeshi Kurosawa" href="mailto:kurosawa-takeshi@mitsue.co.jp">
<link rel="help" href="http://www.w3.org/TR/2dcontext/#dom-context-2d-drawcustomfocusring">
</head>
<body>
<h1>Description</h1>
<p>This test checks whether drawCustomFocusRing returns false if the element passed as an argument is not focused or is not a descendant of the element with whose context the method is associated.</p>
<div id="log"></div>
<div>
<input type="text" id="text0">
<canvas id="canvas"><input type="text" id="text1"></canvas>
</div>
<script>
(function() {
test(function() {
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
var text0 = document.getElementById('text0');
text0.focus(); // document.activeElement === text0;
var text1 = document.getElementById('text1');
assert_false(context.drawCustomFocusRing(text1));
}, 'drawCustomFocusRing must return false for an element that is not focused.');
test(function() {
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
var text0 = document.getElementById('text0');
text0.focus(); // document.activeElement === text0;
assert_false(context.drawCustomFocusRing(text0));
}, 'drawCustomFocusRing must return false for an element that is not a descendant of the canvas element.');
})();
</script>
</body>
</html>