aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2/qquickcanvasitem/data/tst_gradient.qml
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-02-16 14:43:03 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-24 04:51:31 +0100
commitb855240b782395f94315f43ea3e7e182299fac48 (patch)
treebc594c04449be8cd14cd0ab0bb72dafc2be0ffb2 /tests/auto/qtquick2/qquickcanvasitem/data/tst_gradient.qml
parent6a42a6e0a9a1abdda0d07a5a20b4ac7e45348684 (diff)
Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tests/auto/qtquick2/qquickcanvasitem/data/tst_gradient.qml')
-rw-r--r--tests/auto/qtquick2/qquickcanvasitem/data/tst_gradient.qml981
1 files changed, 0 insertions, 981 deletions
diff --git a/tests/auto/qtquick2/qquickcanvasitem/data/tst_gradient.qml b/tests/auto/qtquick2/qquickcanvasitem/data/tst_gradient.qml
deleted file mode 100644
index d454c2efe1..0000000000
--- a/tests/auto/qtquick2/qquickcanvasitem/data/tst_gradient.qml
+++ /dev/null
@@ -1,981 +0,0 @@
-import QtQuick 2.0
-import QtTest 1.0
-import "testhelper.js" as Helper
-Canvas {
- id:canvas; width:100;height:50; renderTarget: Canvas.Image
- TestCase {
- name: "gradient"; when: windowShown
- function test_basic() {
- var ctx = canvas.getContext('2d');
- ctx.reset();
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- var g = ctx.createLinearGradient(0, 0, 0, 50);
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255,2));
-
- }
-
- function test_interpolate() {
- var ctx = canvas.getContext('2d');
- ctx.reset();
-
- ctx.fillStyle = '#ff0';
- ctx.fillRect(0, 0, 100, 50);
- var g = ctx.createLinearGradient(0, 0, 100, 0);
- g.addColorStop(0, 'rgba(0,0,255, 0)');
- g.addColorStop(1, 'rgba(0,0,255, 1)');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
- //verify(Helper.comparePixel(ctx, 25,25, 191,191,63,255,3));
- //verify(Helper.comparePixel(ctx, 50,25, 127,127,127,255,3));
- //verify(Helper.comparePixel(ctx, 75,25, 63,63,191,255,3));
-
- ctx.reset();
- var g = ctx.createLinearGradient(0, 0, 100, 0);
- g.addColorStop(0, '#ff0');
- g.addColorStop(1, '#00f');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
- //verify(Helper.comparePixel(ctx, 25,25, 191,191,63,255,3));
- //verify(Helper.comparePixel(ctx, 50,25, 127,127,127,255,3));
- //verify(Helper.comparePixel(ctx, 75,25, 63,63,191,255,3));
-
-
- ctx.reset();
- var g = ctx.createLinearGradient(0, 0, 100, 0);
- g.addColorStop(0, 'rgba(255,255,0, 0)');
- g.addColorStop(1, 'rgba(0,0,255, 1)');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
- //verify(Helper.comparePixel(ctx, 25,25, 191,191,63,63,3));
- //verify(Helper.comparePixel(ctx, 50,25, 127,127,127,127,3));
- //verify(Helper.comparePixel(ctx, 75,25, 63,63,191,191,3));
-
- ctx.reset();
- canvas.width = 200;
- var g = ctx.createLinearGradient(0, 0, 200, 0);
- g.addColorStop(0, '#ff0');
- g.addColorStop(0.5, '#0ff');
- g.addColorStop(1, '#f0f');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 200, 50);
- //verify(Helper.comparePixel(ctx, 50,25, 127,255,127,255,3));
- //verify(Helper.comparePixel(ctx, 100,25, 0,255,255,255,3));
- //verify(Helper.comparePixel(ctx, 150,25, 127,127,255,255,3));
-
- ctx.reset();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
-
- var g = ctx.createLinearGradient(25, 0, 75, 0);
- g.addColorStop(0.4, '#0f0');
- g.addColorStop(0.6, '#0f0');
-
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
- //verify(Helper.comparePixel(ctx, 20,25, 0,255,0,255,2));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255,2));
- //verify(Helper.comparePixel(ctx, 80,25, 0,255,0,255,2));
-
-
- ctx.reset();
- ctx.canvas.width = 200;
- var g = ctx.createLinearGradient(0, 0, 200, 0);
- g.addColorStop(0, '#f00');
- g.addColorStop(0, '#ff0');
- g.addColorStop(0.25, '#00f');
- g.addColorStop(0.25, '#0f0');
- g.addColorStop(0.25, '#0f0');
- g.addColorStop(0.25, '#0f0');
- g.addColorStop(0.25, '#ff0');
- g.addColorStop(0.5, '#00f');
- g.addColorStop(0.5, '#0f0');
- g.addColorStop(0.75, '#00f');
- g.addColorStop(0.75, '#f00');
- g.addColorStop(0.75, '#ff0');
- g.addColorStop(0.5, '#0f0');
- g.addColorStop(0.5, '#0f0');
- g.addColorStop(0.5, '#ff0');
- g.addColorStop(1, '#00f');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 200, 50);
- //verify(Helper.comparePixel(ctx, 49,25, 0,0,255,255,16));
- //verify(Helper.comparePixel(ctx, 51,25, 255,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 99,25, 0,0,255,255,16));
- //verify(Helper.comparePixel(ctx, 101,25, 255,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 149,25, 0,0,255,255,16));
- //verify(Helper.comparePixel(ctx, 151,25, 255,255,0,255,16));
- ctx.canvas.width = 100;
-
- ctx.reset();
- var g = ctx.createLinearGradient(0, 0, 100, 0);
- var ps = [ 0, 1/10, 1/4, 1/3, 1/2, 3/4, 1 ];
- for (var p = 0; p < ps.length; ++p)
- {
- g.addColorStop(ps[p], '#0f0');
- for (var i = 0; i < 15; ++i)
- g.addColorStop(ps[p], '#f00');
- g.addColorStop(ps[p], '#0f0');
- }
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 30,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 40,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 60,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 80,25, 0,255,0,255));
-
-
- ctx.reset();
- var g = ctx.createLinearGradient(0, 0, 100, 0);
- g.addColorStop(0, '#0f0');
- g.addColorStop(1, '#0f0');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
-
-
-
- ctx.reset();
- var g = ctx.createLinearGradient(0, 0, 0, 50);
- g.addColorStop(0, '#ff0');
- g.addColorStop(1, '#00f');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
- //verify(Helper.comparePixel(ctx, 50,12, 191,191,63,255,10));
- //verify(Helper.comparePixel(ctx, 50,25, 127,127,127,255,5));
- //verify(Helper.comparePixel(ctx, 50,37, 63,63,191,255,10));
-
-
- ctx.reset();
-
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
-
- var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction)
- g.addColorStop(0, '#f00');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
- //verify(Helper.comparePixel(ctx, 40,20, 0,255,0,255,2));
-
-
-
- }
- function test_radial() {
- var ctx = canvas.getContext('2d');
- ctx.reset();
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
-
- var g = ctx.createRadialGradient(0, 100, 40, 100, 100, 50);
- g.addColorStop(0, '#f00');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
-
- g = ctx.createRadialGradient(210, 25, 100, 230, 25, 101);
- g.addColorStop(0, '#0f0');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
-
- ctx.reset();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
-
- g = ctx.createRadialGradient(210, 25, 100, 230, 25, 100);
- g.addColorStop(0, '#0f0');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
-
- g = ctx.createRadialGradient(311, 25, 10, 210, 25, 100);
- g.addColorStop(0, '#f00');
- g.addColorStop(1, '#0f0');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- var tol = 1; // tolerance to avoid antialiasing artifacts
-
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
-
- ctx.fillStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(30+tol, 40);
- ctx.lineTo(110, -20+tol);
- ctx.lineTo(110, 100-tol);
- ctx.fill();
-
- g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4);
- g.addColorStop(0, '#0f0');
- g.addColorStop(1, '#0f0');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- var tol = 1; // tolerance to avoid antialiasing artifacts
-
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
-
- g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4);
- g.addColorStop(0, '#f00');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- ctx.fillStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(30-tol, 40);
- ctx.lineTo(110, -20-tol);
- ctx.lineTo(110, 100+tol);
- ctx.fill();
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
-
- g = ctx.createRadialGradient(230, 25, 100, 100, 25, 101);
- g.addColorStop(0, '#f00');
- g.addColorStop(1, '#0f0');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
-
- g = ctx.createRadialGradient(50, 25, 20, 50, 25, 20);
- g.addColorStop(0, '#f00');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
-
- g = ctx.createRadialGradient(50, 25, 100, 50, 25, 200);
- g.addColorStop(0, '#0f0');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
-
- g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100);
- g.addColorStop(0, '#f00');
- g.addColorStop(1, '#0f0');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
-
- g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100);
- g.addColorStop(0, '#f00');
- g.addColorStop(0.993, '#f00');
- g.addColorStop(1, '#0f0');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- try { var err = false;
- ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type INDEX_SIZE_ERR: ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1);
- } catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type INDEX_SIZE_ERR: ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1);
- } catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type INDEX_SIZE_ERR: ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1)"); }
-
-
- ctx.reset();
-
-
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, 1, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(-Infinity, 0, 1, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(-Infinity, 0, 1, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(NaN, 0, 1, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(NaN, 0, 1, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, 1, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, -Infinity, 1, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, -Infinity, 1, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, NaN, 1, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, NaN, 1, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, Infinity, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, -Infinity, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, -Infinity, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, NaN, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, NaN, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, Infinity, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, Infinity, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, -Infinity, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, -Infinity, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, NaN, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, NaN, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, 0, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, 0, -Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, -Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, 0, NaN, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, NaN, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, 0, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, 0, 0, -Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, 0, -Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, 0, 0, NaN);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, 0, NaN)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(Infinity, 0, 1, 0, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(Infinity, 0, 1, 0, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, Infinity, 1, 0, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, Infinity, 1, 0, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, Infinity, 0, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, Infinity, 0, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, 1);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, 1)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, Infinity, 0, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, Infinity, 0, Infinity)"); }
- try { var err = false;
- ctx.createRadialGradient(0, 0, 1, 0, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createRadialGradient(0, 0, 1, 0, Infinity, Infinity)"); }
-
-
- ctx.reset();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- g = ctx.createRadialGradient(200, 25, 10, 200, 25, 20);
- g.addColorStop(0, '#f00');
- g.addColorStop(1, '#0f0');
- ctx.fillStyle = g;ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));//verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));//verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10);
- g.addColorStop(0, '#0f0');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));//verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));//verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10);
- g.addColorStop(0, '#0f0');
- g.addColorStop(0.001, '#f00');
- g.addColorStop(1, '#f00');ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));//verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));//verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- g = ctx.createRadialGradient(150, 25, 50, 200, 25, 100);
- g.addColorStop(0, '#f00');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));//verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));//verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
-
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- g = ctx.createRadialGradient(-80, 25, 70, 0, 25, 150);
- g.addColorStop(0, '#f00');
- g.addColorStop(0.01, '#0f0');
- g.addColorStop(0.99, '#0f0');g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));//verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));//verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- g = ctx.createRadialGradient(120, -15, 25, 140, -30, 50);
- g.addColorStop(0, '#f00');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));//verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));//verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
- ctx.reset();
- g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2);
- g.addColorStop(0, '#0f0');
- g.addColorStop(0.5, '#0f0');g.addColorStop(0.51, '#f00');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.translate(50, 25);ctx.scale(10, 10);
- ctx.fillRect(-5, -2.5, 10, 5);
- //verify(Helper.comparePixel(ctx, 25,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));//verify(Helper.comparePixel(ctx, 75,25, 0,255,0,255));
-
- ctx.reset();
- ctx.translate(100, 0);
- g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2);
- g.addColorStop(0, '#0f0');g.addColorStop(0.5, '#0f0');
- g.addColorStop(0.51, '#f00');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;ctx.translate(-50, 25);
- ctx.scale(10, 10);
- ctx.fillRect(-5, -2.5, 10, 5);
- //verify(Helper.comparePixel(ctx, 25,25, 0,255,0,255));//verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 75,25, 0,255,0,255));
-
-
- ctx.reset();
- g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2);
- g.addColorStop(0, '#0f0');
- g.addColorStop(0.5, '#0f0');g.addColorStop(0.51, '#f00');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);ctx.translate(50, 25);
- ctx.scale(10, 10);
- ctx.fillRect(-5, -2.5, 10, 5);
- //verify(Helper.comparePixel(ctx, 25,25, 0,255,0,255));//verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 75,25, 0,255,0,255));
-
-
- }
- function test_linear() {
- var ctx = canvas.getContext('2d');
- ctx.reset();
- try { var err = false;
- ctx.createLinearGradient(Infinity, 0, 1, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, 0, 1, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(-Infinity, 0, 1, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(-Infinity, 0, 1, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(NaN, 0, 1, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(NaN, 0, 1, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(0, Infinity, 1, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, Infinity, 1, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(0, -Infinity, 1, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, -Infinity, 1, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(0, NaN, 1, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, NaN, 1, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(0, 0, Infinity, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, Infinity, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(0, 0, -Infinity, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, -Infinity, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(0, 0, NaN, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, NaN, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(0, 0, 1, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, 1, Infinity)"); }
- try { var err = false;
- ctx.createLinearGradient(0, 0, 1, -Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, 1, -Infinity)"); }
- try { var err = false;
- ctx.createLinearGradient(0, 0, 1, NaN);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, 1, NaN)"); }
- try { var err = false;
- ctx.createLinearGradient(Infinity, Infinity, 1, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, Infinity, 1, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(Infinity, Infinity, Infinity, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, Infinity, Infinity, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(Infinity, Infinity, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, Infinity, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createLinearGradient(Infinity, Infinity, 1, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, Infinity, 1, Infinity)"); }
- try { var err = false;
- ctx.createLinearGradient(Infinity, 0, Infinity, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, 0, Infinity, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(Infinity, 0, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, 0, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createLinearGradient(Infinity, 0, 1, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(Infinity, 0, 1, Infinity)"); }
- try { var err = false;
- ctx.createLinearGradient(0, Infinity, Infinity, 0);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, Infinity, Infinity, 0)"); }
- try { var err = false;
- ctx.createLinearGradient(0, Infinity, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, Infinity, Infinity, Infinity)"); }
- try { var err = false;
- ctx.createLinearGradient(0, Infinity, 1, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, Infinity, 1, Infinity)"); }
- try { var err = false;
- ctx.createLinearGradient(0, 0, Infinity, Infinity);
- } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) fail("Failed assertion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type NOT_SUPPORTED_ERR: ctx.createLinearGradient(0, 0, Infinity, Infinity)"); }
-
- ctx.reset();
- var g = ctx.createLinearGradient(0, 0, 200, 0);
- g.addColorStop(0, '#f00');
- g.addColorStop(0.25, '#0f0');
- g.addColorStop(0.75, '#0f0');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.translate(-50, 0);
- ctx.fillRect(50, 0, 100, 50);
- verify(Helper.comparePixel(ctx, 25,25, 0,255,0,255));
- verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- verify(Helper.comparePixel(ctx, 75,25, 0,255,0,255));
-
- ctx.reset();
- ctx.translate(100, 0);
- g = ctx.createLinearGradient(0, 0, 200, 0);
- g.addColorStop(0, '#f00');
- g.addColorStop(0.25, '#0f0');
- g.addColorStop(0.75, '#0f0');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.translate(-150, 0);
- ctx.fillRect(50, 0, 100, 50);
- verify(Helper.comparePixel(ctx, 25,25, 0,255,0,255));
- verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- verify(Helper.comparePixel(ctx, 75,25, 0,255,0,255));
-
-
- ctx.reset();
- g = ctx.createLinearGradient(0, 0, 200, 0);
- g.addColorStop(0, '#f00');
- g.addColorStop(0.25, '#0f0');
- g.addColorStop(0.75, '#0f0');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
- ctx.translate(-50, 0);
- ctx.fillRect(50, 0, 100, 50);
- verify(Helper.comparePixel(ctx, 25,25, 0,255,0,255));
- verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- verify(Helper.comparePixel(ctx, 75,25, 0,255,0,255));
-
- }
- function test_object() {
- var ctx = canvas.getContext('2d');
- ctx.reset();
- var g1 = ctx.createLinearGradient(0, 0, 100, 0);
- var g2 = ctx.createLinearGradient(0, 0, 100, 0);
- ctx.fillStyle = g1;
-
-
- ctx.reset();
- var g = ctx.createLinearGradient(0, 0, 100, 0);
- try { var err = false;
- g.addColorStop(0, "");
- } catch (e) { if (e.code != DOMException.SYNTAX_ERR) fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type SYNTAX_ERR: g.addColorStop(0, \"\")"); }
- try { var err = false;
- g.addColorStop(0, 'undefined');
- } catch (e) { if (e.code != DOMException.SYNTAX_ERR) fail("Failed assertion: expected exception of type SYNTAX_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type SYNTAX_ERR: g.addColorStop(0, 'undefined')"); }
-
-
- ctx.reset();
- g = ctx.createLinearGradient(0, 0, 100, 0);
- try { var err = false;
- g.addColorStop(-1, '#000');
- } catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type INDEX_SIZE_ERR: g.addColorStop(-1, '#000')"); }
- try { var err = false;
- g.addColorStop(2, '#000');
- } catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type INDEX_SIZE_ERR: g.addColorStop(2, '#000')"); }
- try { var err = false;
- g.addColorStop(Infinity, '#000');
- } catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type INDEX_SIZE_ERR: g.addColorStop(Infinity, '#000')"); }
- try { var err = false;
- g.addColorStop(-Infinity, '#000');
- } catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type INDEX_SIZE_ERR: g.addColorStop(-Infinity, '#000')"); }
- try { var err = false;
- g.addColorStop(NaN, '#000');
- } catch (e) { if (e.code != DOMException.INDEX_SIZE_ERR) fail("Failed assertion: expected exception of type INDEX_SIZE_ERR, got: "+e.message); err = true; } finally { verify(err, "should throw exception of type INDEX_SIZE_ERR: g.addColorStop(NaN, '#000')"); }
-
-
- ctx.reset();
- g = ctx.createLinearGradient(-100, 0, 200, 0);
- g.addColorStop(0, '#f00');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- g.addColorStop(0.1, '#0f0');
- g.addColorStop(0.9, '#0f0');
- ctx.fillRect(0, 0, 100, 50);
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255,2));
-
- ctx.reset();
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
-
- g = ctx.createRadialGradient(120, 25, 10, 211, 25, 100);
- g.addColorStop(0, '#f00');
- g.addColorStop(1, '#f00');
- ctx.fillStyle = g;
- ctx.fillRect(0, 0, 100, 50);
-
- //verify(Helper.comparePixel(ctx, 1,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,1, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,25, 0,255,0,255,16));
- //verify(Helper.comparePixel(ctx, 50,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,25, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 1,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 50,48, 0,255,0,255));
- //verify(Helper.comparePixel(ctx, 98,48, 0,255,0,255));
-
-
- }
-
- function test_conical() {
- var ctx = canvas.getContext('2d');
- ctx.reset();
- var g = ctx.createConicalGradient(10, 10, 50);
- //TODO
- }
- }
-}