Skip to content

Commit 03b67c4

Browse files
committed
test extended filter chains
1 parent bd26d2b commit 03b67c4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

test/context2d.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ describe("Context2D", ()=>{
377377
// make sure chains of filters compose correctly <https://codepen.io/sosuke/pen/Pjoqqp>
378378
ctx.filter = 'blur(5px) invert(56%) sepia(63%) saturate(4837%) hue-rotate(163deg) brightness(96%) contrast(101%)'
379379
ctx.fillRect(0,0,20,20)
380-
expect(pixel(10, 10)).toEqual([0, 162, 213, 245])
380+
expect(pixel(10, 10)).toEqual([0, 161, 212, 245])
381381
})
382382

383383
test("clip()", () => {

test/visual/tests.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,6 +2093,10 @@ tests['shadow in filter'] = function (ctx) {
20932093
ctx.fillRect(20, 0, 33, 33)
20942094
}
20952095

2096+
tests['filter chains'] = function (ctx) {
2097+
ctx.filter = 'blur(5px) invert(56%) sepia(63%) saturate(4837%) hue-rotate(163deg) brightness(96%) contrast(101%)'
2098+
ctx.fillRect(40,40,120,120)
2099+
}
20962100

20972101
tests['font state'] = function (ctx) {
20982102
ctx.save()

0 commit comments

Comments
 (0)