Skip to content

Commit 2699670

Browse files
committed
Improve text-shadow tests
1 parent 7a58ad0 commit 2699670

2 files changed

Lines changed: 26 additions & 5 deletions

File tree

tests/cases/text/shadow.html

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,39 @@
55
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
66
<script type="text/javascript" src="../../test.js"></script>
77
<style>
8-
span{
8+
.shadow1 span{
99
text-shadow: 1px 1px 3px #888;
1010
}
11-
strong {
11+
.shadow1 strong {
1212
text-shadow: 1px 1px 2px black, 0 0 1em blue, 0 0 0.2em blue;
1313
}
14+
15+
.shadow2 {
16+
font-size: 48px;
17+
}
18+
19+
.shadow2 span{
20+
color: transparent;
21+
text-shadow: 0 0 5px #00f, 2px 2px 0 #f00;
22+
}
23+
24+
.shadow2 strong {
25+
color: rgba(0, 255, 0, 0.5);
26+
text-shadow: 0 0 5px #00f, 2px 2px 0 #f00;
27+
text-decoration: underline;
28+
}
29+
1430
</style>
1531

1632
</head>
1733
<body>
18-
Some text <span> followed by text with shadow </span> followed by more text without shadow.
19-
<strong>Multi text shadow</strong> and some more text without shadow
34+
<div class="shadow1">
35+
Some text <span> followed by text with shadow </span> followed by more text without shadow.
36+
<strong>Multi text shadow</strong> and some more text without shadow
37+
</div>
38+
<div class="shadow2">
39+
<span>testing with transparent</span>
40+
<strong>testing with low opacity</strong>
41+
</div>
2042
</body>
2143
</html>

tests/mocha/background.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@
113113
var data = ctx.getImageData(0, 0, canvas.width, canvas.height).data;
114114
for (var i = 0, len = data.length; i < len; i+=4) {
115115
if (data[i] !== 0 || data[i+1] !== 128 || data[i+2] !== 0 || data[i+3] !== 255) {
116-
console.log(i,data[i], data[i+1], data[i+2], data[i+3]);
117116
expect().fail("Invalid canvas data");
118117
}
119118
}

0 commit comments

Comments
 (0)