Bug 1107096 - Reftest for zero-width invisible glyphs in canvas.

This commit is contained in:
Jonathan Kew 2015-05-30 14:07:18 +01:00
parent 0d1bf86afa
commit 1e9c1097ad
3 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script>
function draw() {
var c = document.getElementById('cc');
var g = c.getContext('2d');
g.fillStyle = 'red';
g.fillRect(0, 0, 200, 200);
g.font = '24px arial, sans-serif';
g.fillStyle = '#fff';
g.fillText('__', 10, 30);
g.fillText('__', 10, 60);
g.fillText('__', 10, 90);
g.fillText('__', 10, 120);
}
</script>
</head>
<body onload='draw()'>
<canvas id='cc' width='200' height='200'></canvas>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script>
function draw() {
var c = document.getElementById('cc');
var g = c.getContext('2d');
g.fillStyle = 'red';
g.fillRect(0, 0, 200, 200);
g.font = '24px arial, sans-serif';
g.fillStyle = '#fff';
g.fillText('_\u00AD_', 10, 30); // soft hyphen
g.fillText('_\u200B_', 10, 60); // ZWSP
g.fillText('_\u200C_', 10, 90); // ZWNJ
g.fillText('_\u200D_', 10, 120);// ZWJ
}
</script>
</head>
<body onload='draw()'>
<canvas id='cc' width='200' height='200'></canvas>
</body>
</html>

View File

@ -103,5 +103,5 @@ fails-if(azureQuartz&&OSX==1006) == 672646-alpha-radial-gradient.html 672646-alp
fuzzy-if(azureQuartz,2,128) fuzzy-if(d2d,12,21) == 784573-1.html 784573-1-ref.html
== 802658-1.html 802658-1-ref.html
== 1107096-invisibles.html 1107096-invisibles-ref.html
== 1151821-1.html 1151821-1-ref.html