Skip to content

Commit

Permalink
Fix quote style in generated WPT filter tests.
Browse files Browse the repository at this point in the history
Quote styles were used inconsistently across `filters.yaml`. The style
guide recommends using single quotes in JavaScript and double quotes in
HTML:
https://chromium.googlesource.com/chromium/src/+/main/styleguide/web/web.md

Change-Id: Iec6d47c301457ea5e9a6bf0c0219a80da53efbf5
Bug: 1428652
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4400839
Commit-Queue: Jean-Philippe Gravel <jpgravel@chromium.org>
Reviewed-by: Aaron Krajeski <aaronhk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1129864}
  • Loading branch information
graveljp authored and SkyBlack1225 committed Dec 21, 2023
1 parent febeadd commit 1338420
Show file tree
Hide file tree
Showing 36 changed files with 451 additions and 451 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ <h1>2d.filter.canvasFilterObject.blur.exceptions.tentative</h1>
var t = async_test("Test exceptions on CanvasFilter() blur.object");
_addTest(function(canvas, ctx) {

assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: "gaussianBlur"}); });
assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: undefined}); });
assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: "foo"}); });
assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: [1,2]}); });
assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: NaN}); });
assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: {}}); });
assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur'}); });
assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: undefined}); });
assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 'foo'}); });
assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: [1,2]}); });
assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: NaN}); });
assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: {}}); });


});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,44 +19,44 @@ <h1>2d.filter.canvasFilterObject.colorMatrix.tentative</h1>
var t = async_test("Test the functionality of ColorMatrix filters in CanvasFilter objects");
_addTest(function(canvas, ctx) {

assert_throws_js(TypeError, function() { new CanvasFilter({filter: "colorMatrix", values: undefined}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "colorMatrix", values: "foo"}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "colorMatrix", values: null}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "colorMatrix", values: [1, 2, 3]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "colorMatrix", values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, "a"]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "colorMatrix", values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, Infinity]}); });
ctx.fillStyle = "#f00";
ctx.filter = new CanvasFilter({filter: "colorMatrix", type: "hueRotate", values: 0});
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: undefined}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: 'foo'}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: null}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 'a']}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, Infinity]}); });
ctx.fillStyle = '#f00';
ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 0});
ctx.fillRect(0, 0, 100, 50);
_assertPixelApprox(canvas, 10,10, 255,0,0,255, 2);
ctx.filter = new CanvasFilter({filter: "colorMatrix", type: "hueRotate", values: 90});
ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 90});
ctx.fillRect(0, 0, 100, 50);
_assertPixelApprox(canvas, 10,10, 0,91,0,255, 2);
ctx.filter = new CanvasFilter({filter: "colorMatrix", type: "hueRotate", values: 180});
ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 180});
ctx.fillRect(0, 0, 100, 50);
_assertPixelApprox(canvas, 10,10, 0,109,109,255, 2);
ctx.filter = new CanvasFilter({filter: "colorMatrix", type: "hueRotate", values: 270});
ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 270});
ctx.fillRect(0, 0, 100, 50);
_assertPixelApprox(canvas, 10,10, 109,18,255,255, 2);
ctx.filter = new CanvasFilter({filter: "colorMatrix", type: "saturate", values: 0.5});
ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'saturate', values: 0.5});
ctx.fillRect(0, 0, 100, 50);
_assertPixelApprox(canvas, 10,10, 155,27,27,255, 2);
ctx.clearRect(0, 0, 100, 50);
ctx.filter = new CanvasFilter({filter: "colorMatrix", type: "luminanceToAlpha"});
ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'luminanceToAlpha'});
ctx.fillRect(0, 0, 100, 50);
_assertPixelApprox(canvas, 10,10, 0,0,0,54, 2);
ctx.filter = new CanvasFilter({filter: "colorMatrix", values: [
ctx.filter = new CanvasFilter({filter: 'colorMatrix', values: [
0, 0, 0, 0, 0,
1, 1, 1, 1, 0,
0, 0, 0, 0, 0,
0, 0, 0, 1, 0
]});
ctx.fillRect(0, 0, 50, 25);
ctx.fillStyle = "#0f0";
ctx.fillStyle = '#0f0';
ctx.fillRect(50, 0, 50, 25);
ctx.fillStyle = "#00f";
ctx.fillStyle = '#00f';
ctx.fillRect(0, 25, 50, 25);
ctx.fillStyle = "#fff";
ctx.fillStyle = '#fff';
ctx.fillRect(50, 25, 50, 25);
_assertPixelApprox(canvas, 10,10, 0,255,0,255, 2);
_assertPixelApprox(canvas, 60,10, 0,255,0,255, 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ <h1>2d.filter.canvasFilterObject.componentTransfer.discrete.tentative</h1>
tableValuesR = [0, 0, 1, 1];
tableValuesG = [2, 0, 0.5, 3];
tableValuesB = [1, -1, 5, 0];
ctx.filter = new CanvasFilter({filter: "componentTransfer",
funcR: {type: "discrete", tableValues: tableValuesR},
funcG: {type: "discrete", tableValues: tableValuesG},
funcB: {type: "discrete", tableValues: tableValuesB},
ctx.filter = new CanvasFilter({filter: 'componentTransfer',
funcR: {type: 'discrete', tableValues: tableValuesR},
funcG: {type: 'discrete', tableValues: tableValuesG},
funcB: {type: 'discrete', tableValues: tableValuesB},
});

const inputColors = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ <h1>2d.filter.canvasFilterObject.componentTransfer.gamma.tentative</h1>
const amplitudes = [2, 1.1, 0.5];
const exponents = [5, 3, 1];
const offsets = [0.25, 0, 0.5];
ctx.filter = new CanvasFilter({filter: "componentTransfer",
funcR: {type: "gamma", amplitude: amplitudes[0], exponent: exponents[0], offset: offsets[0]},
funcG: {type: "gamma", amplitude: amplitudes[1], exponent: exponents[1], offset: offsets[1]},
funcB: {type: "gamma", amplitude: amplitudes[2], exponent: exponents[2], offset: offsets[2]},
ctx.filter = new CanvasFilter({filter: 'componentTransfer',
funcR: {type: 'gamma', amplitude: amplitudes[0], exponent: exponents[0], offset: offsets[0]},
funcG: {type: 'gamma', amplitude: amplitudes[1], exponent: exponents[1], offset: offsets[1]},
funcB: {type: 'gamma', amplitude: amplitudes[2], exponent: exponents[2], offset: offsets[2]},
});

const inputColors = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ <h1>2d.filter.canvasFilterObject.componentTransfer.identity.tentative</h1>
var t = async_test("Test pixels on CanvasFilter() componentTransfer with identity type");
_addTest(function(canvas, ctx) {

ctx.filter = new CanvasFilter({filter: "componentTransfer",
funcR: {type: "identity"},
funcG: {type: "identity"},
funcB: {type: "identity"},
ctx.filter = new CanvasFilter({filter: 'componentTransfer',
funcR: {type: 'identity'},
funcG: {type: 'identity'},
funcB: {type: 'identity'},
});

const inputColors = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ <h1>2d.filter.canvasFilterObject.componentTransfer.linear.tentative</h1>

const slopes = [0.5, 1.2, -0.2];
const intercepts = [0.25, 0, 0.5];
ctx.filter = new CanvasFilter({filter: "componentTransfer",
funcR: {type: "linear", slope: slopes[0], intercept: intercepts[0]},
funcG: {type: "linear", slope: slopes[1], intercept: intercepts[1]},
funcB: {type: "linear", slope: slopes[2], intercept: intercepts[2]},
ctx.filter = new CanvasFilter({filter: 'componentTransfer',
funcR: {type: 'linear', slope: slopes[0], intercept: intercepts[0]},
funcG: {type: 'linear', slope: slopes[1], intercept: intercepts[1]},
funcB: {type: 'linear', slope: slopes[2], intercept: intercepts[2]},
});

const inputColors = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ <h1>2d.filter.canvasFilterObject.componentTransfer.table.tentative</h1>
tableValuesR = [0, 0, 1, 1];
tableValuesG = [2, 0, 0.5, 3];
tableValuesB = [1, -1, 5, 0];
ctx.filter = new CanvasFilter({filter: "componentTransfer",
funcR: {type: "table", tableValues: tableValuesR},
funcG: {type: "table", tableValues: tableValuesG},
funcB: {type: "table", tableValues: tableValuesB},
ctx.filter = new CanvasFilter({filter: 'componentTransfer',
funcR: {type: 'table', tableValues: tableValuesR},
funcG: {type: 'table', tableValues: tableValuesG},
funcB: {type: 'table', tableValues: tableValuesB},
});

const inputColors = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ <h1>2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative</h1>
var t = async_test("Test exceptions on CanvasFilter() convolveMatrix");
_addTest(function(canvas, ctx) {

assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix"}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", divisor: 2}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: null}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: 1}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: [[1, 0], [0]]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: [[1, "a"], [0]]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: [[1, 0], 0]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: [[1, 0], [0, Infinity]]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: []}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: [1]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: [1, 2, 3, 4]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: [[], []]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: [[1, 2], []]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: "convolveMatrix", kernelMatrix: [[], [1, 2]]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix'}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', divisor: 2}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: null}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: 1}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0]]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 'a'], [0]]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], 0]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0, Infinity]]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: []}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1, 2, 3, 4]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], []]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 2], []]}); });
assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], [1, 2]]}); });
// This should not throw an error
ctx.filter = new CanvasFilter({filter: "convolveMatrix", kernelMatrix: [[]]});
ctx.filter = new CanvasFilter({filter: "convolveMatrix", kernelMatrix: [[1]]});
ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[]]});
ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1]]});


});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,52 +22,52 @@ <h1>2d.filter.canvasFilterObject.dropShadow.tentative</h1>
</style>

<div style="position: relative">
<div class='background' style="top: 0px;"></div>
<div class='background' style="top: 100px;"></div>
<div class='background' style="top: 200px;"></div>
<div class="background" style="top: 0px;"></div>
<div class="background" style="top: 100px;"></div>
<div class="background" style="top: 200px;"></div>

<div class='testcase'
<div class="testcase"
style="left: 10px; top: 10px;
filter: drop-shadow(2px 2px 2px black);">
</div>
<div class='testcase'
<div class="testcase"
style="left: 110px; top: 10px;
filter: drop-shadow(15px 10px 5px rgba(128, 0, 128, 0.7));">
</div>
<div class='testcase'
<div class="testcase"
style="left: 10px; top: 110px;
filter: drop-shadow(10px 10px 3px purple)">
</div>
<div class='testcase'
<div class="testcase"
style="left: 110px; top: 110px;
filter: drop-shadow(15px 10px 3px LinkText)">
</div>
<div class='testcase'
<div class="testcase"
style="left: 210px; top: 110px;
filter: drop-shadow(10px 15px 0px purple)">
</div>
<div class='testcase'
<div class="testcase"
style="left: 310px; top: 110px;
filter: drop-shadow(9px 12px 3px rgba(20, 50, 130, 1))">
</div>
<div class='testcase'
<div class="testcase"
style="left: 410px; top: 110px;
filter: drop-shadow(15px 10px 3px rgba(20, 50, 130, 0.7))">
</div>
<div class='testcase'
<div class="testcase"
style="left: 510px; top: 110px;
filter: drop-shadow(15px 10px 3px rgba(20, 50, 130, 0.49))">
</div>

<div class='testcase'
<div class="testcase"
style="left: 10px; top: 210px;
filter: drop-shadow(-5px 0px 0px purple);">
</div>
<div class='testcase'
<div class="testcase"
style="left: 110px; top: 210px;
filter: drop-shadow(0px 5px 0px rgba(128, 0, 128, 0.8));">
</div>
<div class='testcase'
<div class="testcase"
style="left: 210px; top: 210px;
filter: drop-shadow(1px 10px 0px rgba(128, 0, 128, 0.4));">
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,64 +19,64 @@ <h1>2d.filter.canvasFilterObject.dropShadow.tentative</h1>
ctx.fillStyle = 'crimson';

// Parameter defaults.
ctx.filter = new CanvasFilter({filter: "dropShadow"});
ctx.filter = new CanvasFilter({filter: 'dropShadow'});
ctx.fillRect(10, 10, 80, 80);

// All parameters specified.
ctx.filter = new CanvasFilter(
{filter: "dropShadow", dx: 15, dy: 10, stdDeviation: 5,
floodColor: "purple", floodOpacity: 0.7});
{filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 5,
floodColor: 'purple', floodOpacity: 0.7});
ctx.fillRect(110, 10, 80, 80);

// Named color.
ctx.filter = new CanvasFilter(
{filter: "dropShadow", dx: 10, dy: 10, stdDeviation: 3,
floodColor: "purple"});
{filter: 'dropShadow', dx: 10, dy: 10, stdDeviation: 3,
floodColor: 'purple'});
ctx.fillRect(10, 110, 80, 80);

// System color.
ctx.filter = new CanvasFilter(
{filter: "dropShadow", dx: 15, dy: 10, stdDeviation: 3,
floodColor: "LinkText"});
{filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3,
floodColor: 'LinkText'});
ctx.fillRect(110, 110, 80, 80);

// No blur.
ctx.filter = new CanvasFilter(
{filter: "dropShadow", dx: 10, dy: 15, stdDeviation: 0,
floodColor: "purple"});
{filter: 'dropShadow', dx: 10, dy: 15, stdDeviation: 0,
floodColor: 'purple'});
ctx.fillRect(210, 110, 80, 80);

// Numerical color.
ctx.filter = new CanvasFilter(
{filter: "dropShadow", dx: 9, dy: 12, stdDeviation: 3,
floodColor: "rgba(20, 50, 130, 1)"});
{filter: 'dropShadow', dx: 9, dy: 12, stdDeviation: 3,
floodColor: 'rgba(20, 50, 130, 1)'});
ctx.fillRect(310, 110, 80, 80);

// Transparent floodColor.
ctx.filter = new CanvasFilter(
{filter: "dropShadow", dx: 15, dy: 10, stdDeviation: 3,
floodColor: "rgba(20, 50, 130, 0.7)"});
{filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3,
floodColor: 'rgba(20, 50, 130, 0.7)'});
ctx.fillRect(410, 110, 80, 80);

// Transparent floodColor and floodOpacity.
ctx.filter = new CanvasFilter(
{filter: "dropShadow", dx: 15, dy: 10, stdDeviation: 3,
floodColor: "rgba(20, 50, 130, 0.7)", floodOpacity: 0.7});
{filter: 'dropShadow', dx: 15, dy: 10, stdDeviation: 3,
floodColor: 'rgba(20, 50, 130, 0.7)', floodOpacity: 0.7});
ctx.fillRect(510, 110, 80, 80);

// Degenerate parameter values.
ctx.filter = new CanvasFilter(
{filter: "dropShadow", dx: [-5], dy: [], stdDeviation: null,
floodColor: "purple", floodOpacity: [2]});
{filter: 'dropShadow', dx: [-5], dy: [], stdDeviation: null,
floodColor: 'purple', floodOpacity: [2]});
ctx.fillRect(10, 210, 80, 80);

ctx.filter = new CanvasFilter(
{filter: "dropShadow", dx: null, dy: '5', stdDeviation: -5,
floodColor: "purple", floodOpacity: '0.8'});
{filter: 'dropShadow', dx: null, dy: '5', stdDeviation: -5,
floodColor: 'purple', floodOpacity: '0.8'});
ctx.fillRect(110, 210, 80, 80);

ctx.filter = new CanvasFilter(
{filter: "dropShadow", dx: true, dy: ['10'], stdDeviation: false,
floodColor: "purple", floodOpacity: ['0.4']});
{filter: 'dropShadow', dx: true, dy: ['10'], stdDeviation: false,
floodColor: 'purple', floodOpacity: ['0.4']});
ctx.fillRect(210, 210, 80, 80);
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ <h1>2d.filter.canvasFilterObject.tentative</h1>
_assert(ctx.filter == 'none', "ctx.filter == 'none'");
ctx.filter = 'blur(5px)';
_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: 5});
ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
ctx.filter = new CanvasFilter([
{filter: "gaussianBlur", stdDeviation: 5},
{filter: "gaussianBlur", stdDeviation: 10}
{filter: 'gaussianBlur', stdDeviation: 5},
{filter: 'gaussianBlur', stdDeviation: 10}
]);
_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
var canvas2 = document.createElement('canvas');
Expand All @@ -37,8 +37,8 @@ <h1>2d.filter.canvasFilterObject.tentative</h1>
_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
ctx.filter = 'none';
_assert(ctx.filter == 'none', "ctx.filter == 'none'");
ctx.filter = new CanvasFilter({filter: "gaussianBlur", stdDeviation: 5});
ctx.filter = "this string is not a filter and should do nothing";
ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
ctx.filter = 'this string is not a filter and should do nothing';
_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");


Expand Down
Loading

0 comments on commit 1338420

Please sign in to comment.