Skip to content

Commit

Permalink
Improve text-shadow tests
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh committed Jan 13, 2015
1 parent 7a58ad0 commit 2699670
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
30 changes: 26 additions & 4 deletions tests/cases/text/shadow.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,39 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../../test.js"></script>
<style>
span{
.shadow1 span{
text-shadow: 1px 1px 3px #888;
}
strong {
.shadow1 strong {
text-shadow: 1px 1px 2px black, 0 0 1em blue, 0 0 0.2em blue;
}

.shadow2 {
font-size: 48px;
}

.shadow2 span{
color: transparent;
text-shadow: 0 0 5px #00f, 2px 2px 0 #f00;
}

.shadow2 strong {
color: rgba(0, 255, 0, 0.5);
text-shadow: 0 0 5px #00f, 2px 2px 0 #f00;
text-decoration: underline;
}

</style>

</head>
<body>
Some text <span> followed by text with shadow </span> followed by more text without shadow.
<strong>Multi text shadow</strong> and some more text without shadow
<div class="shadow1">
Some text <span> followed by text with shadow </span> followed by more text without shadow.
<strong>Multi text shadow</strong> and some more text without shadow
</div>
<div class="shadow2">
<span>testing with transparent</span>
<strong>testing with low opacity</strong>
</div>
</body>
</html>
1 change: 0 additions & 1 deletion tests/mocha/background.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
var data = ctx.getImageData(0, 0, canvas.width, canvas.height).data;
for (var i = 0, len = data.length; i < len; i+=4) {
if (data[i] !== 0 || data[i+1] !== 128 || data[i+2] !== 0 || data[i+3] !== 255) {
console.log(i,data[i], data[i+1], data[i+2], data[i+3]);
expect().fail("Invalid canvas data");
}
}
Expand Down

0 comments on commit 2699670

Please sign in to comment.