Update CSS tests to revision 0698c2aa9ead844b6d7d10eafb096cb1118e13ef

This commit is contained in:
Ms2ger 2015-12-09 01:48:05 -05:00
parent 9aa1b1e408
commit 35c74aecc2
11290 changed files with 92400 additions and 49214 deletions

View file

@ -13,20 +13,20 @@
<div id="log"></div>
<script>
initial = {
m11: 1, m21: 0, m31: 0, m41: 0,
m12: 0, m22: 1, m32: 0, m42: 0,
m13: 0, m23: 0, m33: 1, m43: 0,
m11: 1, m21: 0, m31: 0, m41: 0,
m12: 0, m22: 1, m32: 0, m42: 0,
m13: 0, m23: 0, m33: 1, m43: 0,
m14: 0, m24: 0, m34: 0, m44: 1,
is2D: true,
isIdentity: true
isIdentity: true
};
scaleTranslate2D = {
m11: 2, m21: 0, m31: 0, m41: 10,
m12: 0, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m11: 2, m21: 0, m31: 0, m41: 10,
m12: 0, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m14: 0, m24: 0, m34: 0, m44: 1,
is2D: true,
isIdentity: true
isIdentity: true
};
test(function() {
@ -103,12 +103,12 @@
0.0, 0.0, 1.0, 0.0,
10.0, 10.0, 0.0, 1.0];
checkDOMMatrix(new DOMMatrix(sequence), {
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m14: 0, m24: 0, m34: 0, m44: 1,
is2D: false,
isIdentity: false
isIdentity: false
});
},'testConstructor12');
test(function() {
@ -118,12 +118,12 @@
0.0, 0.0, 1.0, 0.0,
10.0, 10.0, 0.0, 1.0]);
checkDOMMatrix(new DOMMatrix(matrix), {
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m14: 0, m24: 0, m34: 0, m44: 1,
is2D: false,
isIdentity: false
isIdentity: false
});
},'testConstructor13');
test(function() {

View file

@ -16,7 +16,7 @@
<p>Test DOMQuad interface</p>
<div id="log"></div>
<script>
initial = {
var initial = {
p1: { x: 0, y: 0, z: 0, w: 1 },
p2: { x: 0, y: 0, z: 0, w: 1 },
p3: { x: 0, y: 0, z: 0, w: 1 },
@ -24,135 +24,147 @@
bounds: { x: 0, y: 0, width: 0, height: 0 }
};
test(function() {
checkDOMQuad(new DOMQuad(), initial);
},'testConstructor0');
checkDOMQuad(function() { return new DOMQuad(); }, initial, 'testConstructor0');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad(1); });
},'testConstructor1');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad(1, 2); });
},'testConstructor2');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad(1, 2, 3); });
},'testConstructor3');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad(1, 2, 3, 4); });
},'testConstructor4');
test(function() {
checkDOMQuad(new DOMQuad(new DOMRect(10, 20, 100, 200)),
checkDOMQuad(
function() { return new DOMQuad(new DOMRect(10, 20, 100, 200)); },
{ p1: { x: 10, y: 20, z: 0, w: 1 },
p2: { x: 110, y: 20, z: 0, w: 1 },
p3: { x: 110, y: 220, z: 0, w: 1 },
p4: { x: 10, y: 220, z: 0, w: 1 },
bounds: { x: 10, y: 20, width: 100, height: 200 } });
},'testConstructor5');
test(function() {
checkDOMQuad(new DOMQuad(new DOMRect(10, 20, -100, -200)),
bounds: { x: 10, y: 20, width: 100, height: 200 } },
'testConstructor5');
checkDOMQuad(
function() { return new DOMQuad(new DOMRect(10, 20, -100, -200)) },
{ p1: { x: 10, y: 20, z: 0, w: 1 },
p2: { x: -90, y: 20, z: 0, w: 1 },
p3: { x: -90, y: -180, z: 0, w: 1 },
p4: { x: 10, y: -180, z: 0, w: 1 },
bounds: { x: -90, y: -180, width: 100, height: 200 } });
},'testConstructor6');
test(function() {
checkDOMQuad(new DOMQuad(new DOMRect(-Infinity, -Infinity, Infinity, Infinity)),
bounds: { x: -90, y: -180, width: 100, height: 200 } },
'testConstructor6');
checkDOMQuad(
function() { return new DOMQuad(new DOMRect(-Infinity, -Infinity, Infinity, Infinity)) },
{ p1: { x: -Infinity, y: -Infinity, z: 0, w: 1 },
p2: { x: NaN, y: -Infinity, z: 0, w: 1 },
p3: { x: NaN, y: NaN, z: 0, w: 1 },
p4: { x: -Infinity, y: NaN, z: 0, w: 1 },
bounds: { x: -Infinity, y: -Infinity, width: NaN, height: NaN } });
},'testConstructor7');
test(function() {
checkDOMQuad(new DOMQuad(new DOMRect()), initial);
},'testConstructor8');
test(function() {
checkDOMQuad(new DOMQuad({}), initial);
},'testConstructor9');
test(function() {
checkDOMQuad(new DOMQuad({}, {}), initial);
},'testConstructor10');
test(function() {
checkDOMQuad(new DOMQuad({}, {}, {}), initial);
},'testConstructor11');
test(function() {
checkDOMQuad(new DOMQuad({}, {}, {}, {}), initial);
},'testConstructor12');
test(function() {
checkDOMQuad(new DOMQuad(null, undefined, {}, {}), initial);
},'testConstructor13');
test(function() {
checkDOMQuad(new DOMQuad({}, {}, {}, {}, NaN), initial);
},'testConstructor14');
bounds: { x: -Infinity, y: -Infinity, width: NaN, height: NaN } },
'testConstructor7');
checkDOMQuad(function() { return new DOMQuad(new DOMRect()); }, initial, 'testConstructor8');
checkDOMQuad(function() { return new DOMQuad({}); }, initial, 'testConstructor9');
checkDOMQuad(function() { return new DOMQuad({}, {}); }, initial, 'testConstructor10');
checkDOMQuad(function() { return new DOMQuad({}, {}, {}); }, initial, 'testConstructor11');
checkDOMQuad(function() { return new DOMQuad({}, {}, {}, {}); }, initial, 'testConstructor12');
checkDOMQuad(function() { return new DOMQuad(null, undefined, {}, {}); }, initial, 'testConstructor13');
checkDOMQuad(function() { return new DOMQuad({}, {}, {}, {}, NaN); }, initial, 'testConstructor14');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad({}, {}, {}, NaN); });
},'testConstructor15');
test(function() {
checkDOMQuad(new DOMQuad({ y: 10 }, { x: 20 }, { z: 30 }, { x: 20, y: 10, z: 20, w: 10 }),
{ p1: { x: 0, y: 10, z: 0, w: 1 },
p2: { x: 20, y: 0, z: 0, w: 1 },
p3: { x: 0, y: 0, z: 30, w: 1 },
p4: { x: 20, y: 10, z: 20, w: 10 },
bounds: { x: 0, y: 0, width: 20, height: 10 } });
},'testConstructor16');
test(function() {
checkDOMQuad(function() {
return new DOMQuad({ y: 10 }, { x: 20 }, { z: 30 }, { x: 20, y: 10, z: 20, w: 10 });
},
{ p1: { x: 0, y: 10, z: 0, w: 1 },
p2: { x: 20, y: 0, z: 0, w: 1 },
p3: { x: 0, y: 0, z: 30, w: 1 },
p4: { x: 20, y: 10, z: 20, w: 10 },
bounds: { x: 0, y: 0, width: 20, height: 10 } },
'testConstructor16');
checkDOMQuad(function() {
// p1 to p4 are readonly attributes.
var q = new DOMQuad({}, {}, {}, {});
q.p1 = new DOMPoint(2, 2);
q.p2 = new DOMPoint(2, 2);
q.p3 = new DOMPoint(2, 2);
q.p4 = new DOMPoint(2, 2);
checkDOMQuad(q, initial);
}, 'p1Top4Attributes0');
test(function() {
// p1 to p4 return the same DOMPoint object which can be modified.
return q;
}, initial, 'p1Top4Attributes0');
checkDOMQuad(function() {
var q = new DOMQuad({}, {}, {}, {});
q.p1.x = 2;
q.p2.x = 2;
q.p3.x = 2;
q.p4.x = 2;
checkDOMQuad(q,
{ p1: { x: 2, y: 0, z: 0, w: 1 },
p2: { x: 2, y: 0, z: 0, w: 1 },
p3: { x: 2, y: 0, z: 0, w: 1 },
p4: { x: 2, y: 0, z: 0, w: 1 },
bounds: { x: 2, y: 0, width: 0, height: 0 } });
}, 'p1Top4Attributes1');
test(function() {
return q;
},
{ p1: { x: 2, y: 0, z: 0, w: 1 },
p2: { x: 2, y: 0, z: 0, w: 1 },
p3: { x: 2, y: 0, z: 0, w: 1 },
p4: { x: 2, y: 0, z: 0, w: 1 },
bounds: { x: 2, y: 0, width: 0, height: 0 } },
'p1Top4Attributes1');
checkDOMQuad(function() {
var q = new DOMQuad({}, {}, {}, {});
q.bounds = new DOMRect(10, 10, 100, 100);
checkDOMQuad(q, initial);
}, 'boundsAttribute0');
test(function() {
return q;
}, initial, 'boundsAttribute0');
checkDOMQuad(function() {
var q = new DOMQuad({}, {}, {}, {});
q.bounds.x = 10;
q.bounds.y = 10;
q.bounds.width = 100;
q.bounds.height = 100;
checkDOMQuad(q, initial);
}, 'boundsAttribute1');
return q;
}, initial, 'boundsAttribute1');
function checkDOMQuad(q, exp) {
assert_equals(q.p1.x, exp.p1.x, "Expected value for p1.x is " + exp.p1.x);
assert_equals(q.p1.y, exp.p1.y, "Expected value for p1.y is " + exp.p1.y);
assert_equals(q.p1.z, exp.p1.z, "Expected value for p1.z is " + exp.p1.z);
assert_equals(q.p1.w, exp.p1.w, "Expected value for p1.w is " + exp.p1.w);
assert_equals(q.p2.x, exp.p2.x, "Expected value for p2.x is " + exp.p2.x);
assert_equals(q.p2.y, exp.p2.y, "Expected value for p2.y is " + exp.p2.y);
assert_equals(q.p2.z, exp.p2.z, "Expected value for p2.z is " + exp.p2.z);
assert_equals(q.p2.w, exp.p2.w, "Expected value for p2.w is " + exp.p2.w);
assert_equals(q.p3.x, exp.p3.x, "Expected value for p3.x is " + exp.p3.x);
assert_equals(q.p3.y, exp.p3.y, "Expected value for p3.y is " + exp.p3.y);
assert_equals(q.p3.z, exp.p3.z, "Expected value for p3.z is " + exp.p3.z);
assert_equals(q.p3.w, exp.p3.w, "Expected value for p3.w is " + exp.p3.w);
assert_equals(q.p4.x, exp.p4.x, "Expected value for p4.x is " + exp.p4.x);
assert_equals(q.p4.y, exp.p4.y, "Expected value for p4.y is " + exp.p4.y);
assert_equals(q.p4.z, exp.p4.z, "Expected value for p4.z is " + exp.p4.z);
assert_equals(q.p4.w, exp.p4.w, "Expected value for p4.w is " + exp.p4.w);
assert_equals(q.bounds.x, exp.bounds.x, "Expected value for bounds.x is " + exp.bounds.x);
assert_equals(q.bounds.y, exp.bounds.y, "Expected value for bounds.y is " + exp.bounds.y);
assert_equals(q.bounds.width, exp.bounds.width, "Expected value for bounds.width is " + exp.bounds.width);
assert_equals(q.bounds.height, exp.bounds.height, "Expected value for bounds.height is " + exp.bounds.height);
function checkDOMQuad(createQuad, exp, name) {
test(function() {
var q = createQuad();
assert_equals(q.p1.x, exp.p1.x, "Expected value for p1.x is " + exp.p1.x);
assert_equals(q.p1.y, exp.p1.y, "Expected value for p1.y is " + exp.p1.y);
assert_equals(q.p1.z, exp.p1.z, "Expected value for p1.z is " + exp.p1.z);
assert_equals(q.p1.w, exp.p1.w, "Expected value for p1.w is " + exp.p1.w);
assert_equals(q.p2.x, exp.p2.x, "Expected value for p2.x is " + exp.p2.x);
assert_equals(q.p2.y, exp.p2.y, "Expected value for p2.y is " + exp.p2.y);
assert_equals(q.p2.z, exp.p2.z, "Expected value for p2.z is " + exp.p2.z);
assert_equals(q.p2.w, exp.p2.w, "Expected value for p2.w is " + exp.p2.w);
assert_equals(q.p3.x, exp.p3.x, "Expected value for p3.x is " + exp.p3.x);
assert_equals(q.p3.y, exp.p3.y, "Expected value for p3.y is " + exp.p3.y);
assert_equals(q.p3.z, exp.p3.z, "Expected value for p3.z is " + exp.p3.z);
assert_equals(q.p3.w, exp.p3.w, "Expected value for p3.w is " + exp.p3.w);
assert_equals(q.p4.x, exp.p4.x, "Expected value for p4.x is " + exp.p4.x);
assert_equals(q.p4.y, exp.p4.y, "Expected value for p4.y is " + exp.p4.y);
assert_equals(q.p4.z, exp.p4.z, "Expected value for p4.z is " + exp.p4.z);
assert_equals(q.p4.w, exp.p4.w, "Expected value for p4.w is " + exp.p4.w);
}, name + ": points");
test(function() {
var q = createQuad();
assert_equals(q.bounds.x, exp.bounds.x, "Expected value for bounds.x is " + exp.bounds.x);
assert_equals(q.bounds.y, exp.bounds.y, "Expected value for bounds.y is " + exp.bounds.y);
assert_equals(q.bounds.width, exp.bounds.width, "Expected value for bounds.width is " + exp.bounds.width);
assert_equals(q.bounds.height, exp.bounds.height, "Expected value for bounds.height is " + exp.bounds.height);
}, name + ": bounds");
}
</script>

View file

@ -3,11 +3,11 @@
# http://test.csswg.org/suites/geometry-1_dev/DATESTAMP/
# See http://wiki.csswg.org/test/implementation-report for instructions
testname revision result comment
html/dommatrix-001.htm 9ef5062544554f66a8c941d084bf9fd707277436 ?
xhtml1/dommatrix-001.xht 9ef5062544554f66a8c941d084bf9fd707277436 ?
html/dommatrix-001.htm 073bb957a964c40741226edda571b0051fde11d7 ?
xhtml1/dommatrix-001.xht 073bb957a964c40741226edda571b0051fde11d7 ?
html/dompoint-001.htm 4eab429b2c693c8262acc9c9e4b8fe388ccefe7d ?
xhtml1/dompoint-001.xht 4eab429b2c693c8262acc9c9e4b8fe388ccefe7d ?
html/domquad-001.htm 55abae26ff2b8b770ae585a4373ca850270f920b ?
xhtml1/domquad-001.xht 55abae26ff2b8b770ae585a4373ca850270f920b ?
html/domquad-001.htm 608cb7264f7f7f64838baf911bf9e470cf89444c ?
xhtml1/domquad-001.xht 608cb7264f7f7f64838baf911bf9e470cf89444c ?
html/domrect-001.htm 2683301224ae44225ab87152ac19e1cd866f59ae ?
xhtml1/domrect-001.xht 2683301224ae44225ab87152ac19e1cd866f59ae ?

View file

@ -1,5 +1,5 @@
id references title flags links revision credits assertion
DOMMatrix-001 Geometry Interfaces: DOMMatrix and DOMMatrixReadOnly constructors script http://www.w3.org/TR/geometry-1/#DOMMatrix,http://www.w3.org/TR/geometry-1/#dommatrix-constructors,http://www.w3.org/TR/geometry-1/#dom-dommatrix-dommatrix 9ef5062544554f66a8c941d084bf9fd707277436 `Dirk Schulze`<mailto:dschulze@adobe.com>
DOMMatrix-001 Geometry Interfaces: DOMMatrix and DOMMatrixReadOnly constructors script http://www.w3.org/TR/geometry-1/#DOMMatrix,http://www.w3.org/TR/geometry-1/#dommatrix-constructors,http://www.w3.org/TR/geometry-1/#dom-dommatrix-dommatrix 073bb957a964c40741226edda571b0051fde11d7 `Dirk Schulze`<mailto:dschulze@adobe.com>
DOMPoint-001 Geometry Interfaces: DOMPoint and DOMPointReadOnly interface tests script http://www.w3.org/TR/geometry-1/#DOMPoint,http://www.w3.org/TR/geometry-1/#dictdef-dompointinit,http://www.w3.org/TR/geometry-1/#dom-dompoint-dompoint,http://www.w3.org/TR/geometry-1/#dom-dompointreadonly-dompoint-x,http://www.w3.org/TR/geometry-1/#dom-dompointreadonly-dompoint-y,http://www.w3.org/TR/geometry-1/#dom-dompointreadonly-dompoint-z,http://www.w3.org/TR/geometry-1/#dom-dompointreadonly-dompoint-w 4eab429b2c693c8262acc9c9e4b8fe388ccefe7d `Dirk Schulze`<mailto:dschulze@adobe.com>
DOMQuad-001 Geometry Interfaces: DOMQuad interface tests script http://www.w3.org/TR/geometry-1/#DOMQuad,http://www.w3.org/TR/geometry-1/#dom-domquad-domquad,http://www.w3.org/TR/geometry-1/#dom-domquad-p1,http://www.w3.org/TR/geometry-1/#dom-domquad-p2,http://www.w3.org/TR/geometry-1/#dom-domquad-p3,http://www.w3.org/TR/geometry-1/#dom-domquad-p4,http://www.w3.org/TR/geometry-1/#dom-domquad-bounds 55abae26ff2b8b770ae585a4373ca850270f920b `Dirk Schulze`<mailto:dschulze@adobe.com>
DOMQuad-001 Geometry Interfaces: DOMQuad interface tests script http://www.w3.org/TR/geometry-1/#DOMQuad,http://www.w3.org/TR/geometry-1/#dom-domquad-domquad,http://www.w3.org/TR/geometry-1/#dom-domquad-p1,http://www.w3.org/TR/geometry-1/#dom-domquad-p2,http://www.w3.org/TR/geometry-1/#dom-domquad-p3,http://www.w3.org/TR/geometry-1/#dom-domquad-p4,http://www.w3.org/TR/geometry-1/#dom-domquad-bounds 608cb7264f7f7f64838baf911bf9e470cf89444c `Dirk Schulze`<mailto:dschulze@adobe.com>
DOMRect-001 Geometry Interfaces: DOMRect and DOMRectReadOnly interface tests script http://www.w3.org/TR/geometry-1/#DOMRect,http://www.w3.org/TR/geometry-1/#dom-domrect,http://www.w3.org/TR/geometry-1/#dom-domrectreadonly,http://www.w3.org/TR/geometry-1/#dom-domrect-domrect,http://www.w3.org/TR/geometry-1/#dom-domrectreadonly-domrect-x,http://www.w3.org/TR/geometry-1/#dom-domrectreadonly-domrect-y,http://www.w3.org/TR/geometry-1/#dom-domrectreadonly-domrect-width,http://www.w3.org/TR/geometry-1/#dom-domrectreadonly-domrect-height,http://www.w3.org/TR/geometry-1/#dom-domrectreadonly-domrect-top,http://www.w3.org/TR/geometry-1/#dom-domrectreadonly-domrect-left,http://www.w3.org/TR/geometry-1/#dom-domrectreadonly-domrect-right,http://www.w3.org/TR/geometry-1/#dom-domrectreadonly-domrect-bottom 2683301224ae44225ab87152ac19e1cd866f59ae `Dirk Schulze`<mailto:dschulze@adobe.com>

View file

@ -13,20 +13,20 @@
<div id="log"></div>
<script>
initial = {
m11: 1, m21: 0, m31: 0, m41: 0,
m12: 0, m22: 1, m32: 0, m42: 0,
m13: 0, m23: 0, m33: 1, m43: 0,
m11: 1, m21: 0, m31: 0, m41: 0,
m12: 0, m22: 1, m32: 0, m42: 0,
m13: 0, m23: 0, m33: 1, m43: 0,
m14: 0, m24: 0, m34: 0, m44: 1,
is2D: true,
isIdentity: true
isIdentity: true
};
scaleTranslate2D = {
m11: 2, m21: 0, m31: 0, m41: 10,
m12: 0, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m11: 2, m21: 0, m31: 0, m41: 10,
m12: 0, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m14: 0, m24: 0, m34: 0, m44: 1,
is2D: true,
isIdentity: true
isIdentity: true
};
test(function() {
@ -103,12 +103,12 @@
0.0, 0.0, 1.0, 0.0,
10.0, 10.0, 0.0, 1.0];
checkDOMMatrix(new DOMMatrix(sequence), {
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m14: 0, m24: 0, m34: 0, m44: 1,
is2D: false,
isIdentity: false
isIdentity: false
});
},'testConstructor12');
test(function() {
@ -118,12 +118,12 @@
0.0, 0.0, 1.0, 0.0,
10.0, 10.0, 0.0, 1.0]);
checkDOMMatrix(new DOMMatrix(matrix), {
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m14: 0, m24: 0, m34: 0, m44: 1,
is2D: false,
isIdentity: false
isIdentity: false
});
},'testConstructor13');
test(function() {

View file

@ -16,7 +16,7 @@
<p>Test DOMQuad interface</p>
<div id="log"></div>
<script>
initial = {
var initial = {
p1: { x: 0, y: 0, z: 0, w: 1 },
p2: { x: 0, y: 0, z: 0, w: 1 },
p3: { x: 0, y: 0, z: 0, w: 1 },
@ -24,135 +24,147 @@
bounds: { x: 0, y: 0, width: 0, height: 0 }
};
test(function() {
checkDOMQuad(new DOMQuad(), initial);
},'testConstructor0');
checkDOMQuad(function() { return new DOMQuad(); }, initial, 'testConstructor0');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad(1); });
},'testConstructor1');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad(1, 2); });
},'testConstructor2');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad(1, 2, 3); });
},'testConstructor3');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad(1, 2, 3, 4); });
},'testConstructor4');
test(function() {
checkDOMQuad(new DOMQuad(new DOMRect(10, 20, 100, 200)),
checkDOMQuad(
function() { return new DOMQuad(new DOMRect(10, 20, 100, 200)); },
{ p1: { x: 10, y: 20, z: 0, w: 1 },
p2: { x: 110, y: 20, z: 0, w: 1 },
p3: { x: 110, y: 220, z: 0, w: 1 },
p4: { x: 10, y: 220, z: 0, w: 1 },
bounds: { x: 10, y: 20, width: 100, height: 200 } });
},'testConstructor5');
test(function() {
checkDOMQuad(new DOMQuad(new DOMRect(10, 20, -100, -200)),
bounds: { x: 10, y: 20, width: 100, height: 200 } },
'testConstructor5');
checkDOMQuad(
function() { return new DOMQuad(new DOMRect(10, 20, -100, -200)) },
{ p1: { x: 10, y: 20, z: 0, w: 1 },
p2: { x: -90, y: 20, z: 0, w: 1 },
p3: { x: -90, y: -180, z: 0, w: 1 },
p4: { x: 10, y: -180, z: 0, w: 1 },
bounds: { x: -90, y: -180, width: 100, height: 200 } });
},'testConstructor6');
test(function() {
checkDOMQuad(new DOMQuad(new DOMRect(-Infinity, -Infinity, Infinity, Infinity)),
bounds: { x: -90, y: -180, width: 100, height: 200 } },
'testConstructor6');
checkDOMQuad(
function() { return new DOMQuad(new DOMRect(-Infinity, -Infinity, Infinity, Infinity)) },
{ p1: { x: -Infinity, y: -Infinity, z: 0, w: 1 },
p2: { x: NaN, y: -Infinity, z: 0, w: 1 },
p3: { x: NaN, y: NaN, z: 0, w: 1 },
p4: { x: -Infinity, y: NaN, z: 0, w: 1 },
bounds: { x: -Infinity, y: -Infinity, width: NaN, height: NaN } });
},'testConstructor7');
test(function() {
checkDOMQuad(new DOMQuad(new DOMRect()), initial);
},'testConstructor8');
test(function() {
checkDOMQuad(new DOMQuad({}), initial);
},'testConstructor9');
test(function() {
checkDOMQuad(new DOMQuad({}, {}), initial);
},'testConstructor10');
test(function() {
checkDOMQuad(new DOMQuad({}, {}, {}), initial);
},'testConstructor11');
test(function() {
checkDOMQuad(new DOMQuad({}, {}, {}, {}), initial);
},'testConstructor12');
test(function() {
checkDOMQuad(new DOMQuad(null, undefined, {}, {}), initial);
},'testConstructor13');
test(function() {
checkDOMQuad(new DOMQuad({}, {}, {}, {}, NaN), initial);
},'testConstructor14');
bounds: { x: -Infinity, y: -Infinity, width: NaN, height: NaN } },
'testConstructor7');
checkDOMQuad(function() { return new DOMQuad(new DOMRect()); }, initial, 'testConstructor8');
checkDOMQuad(function() { return new DOMQuad({}); }, initial, 'testConstructor9');
checkDOMQuad(function() { return new DOMQuad({}, {}); }, initial, 'testConstructor10');
checkDOMQuad(function() { return new DOMQuad({}, {}, {}); }, initial, 'testConstructor11');
checkDOMQuad(function() { return new DOMQuad({}, {}, {}, {}); }, initial, 'testConstructor12');
checkDOMQuad(function() { return new DOMQuad(null, undefined, {}, {}); }, initial, 'testConstructor13');
checkDOMQuad(function() { return new DOMQuad({}, {}, {}, {}, NaN); }, initial, 'testConstructor14');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad({}, {}, {}, NaN); });
},'testConstructor15');
test(function() {
checkDOMQuad(new DOMQuad({ y: 10 }, { x: 20 }, { z: 30 }, { x: 20, y: 10, z: 20, w: 10 }),
{ p1: { x: 0, y: 10, z: 0, w: 1 },
p2: { x: 20, y: 0, z: 0, w: 1 },
p3: { x: 0, y: 0, z: 30, w: 1 },
p4: { x: 20, y: 10, z: 20, w: 10 },
bounds: { x: 0, y: 0, width: 20, height: 10 } });
},'testConstructor16');
test(function() {
checkDOMQuad(function() {
return new DOMQuad({ y: 10 }, { x: 20 }, { z: 30 }, { x: 20, y: 10, z: 20, w: 10 });
},
{ p1: { x: 0, y: 10, z: 0, w: 1 },
p2: { x: 20, y: 0, z: 0, w: 1 },
p3: { x: 0, y: 0, z: 30, w: 1 },
p4: { x: 20, y: 10, z: 20, w: 10 },
bounds: { x: 0, y: 0, width: 20, height: 10 } },
'testConstructor16');
checkDOMQuad(function() {
// p1 to p4 are readonly attributes.
var q = new DOMQuad({}, {}, {}, {});
q.p1 = new DOMPoint(2, 2);
q.p2 = new DOMPoint(2, 2);
q.p3 = new DOMPoint(2, 2);
q.p4 = new DOMPoint(2, 2);
checkDOMQuad(q, initial);
}, 'p1Top4Attributes0');
test(function() {
// p1 to p4 return the same DOMPoint object which can be modified.
return q;
}, initial, 'p1Top4Attributes0');
checkDOMQuad(function() {
var q = new DOMQuad({}, {}, {}, {});
q.p1.x = 2;
q.p2.x = 2;
q.p3.x = 2;
q.p4.x = 2;
checkDOMQuad(q,
{ p1: { x: 2, y: 0, z: 0, w: 1 },
p2: { x: 2, y: 0, z: 0, w: 1 },
p3: { x: 2, y: 0, z: 0, w: 1 },
p4: { x: 2, y: 0, z: 0, w: 1 },
bounds: { x: 2, y: 0, width: 0, height: 0 } });
}, 'p1Top4Attributes1');
test(function() {
return q;
},
{ p1: { x: 2, y: 0, z: 0, w: 1 },
p2: { x: 2, y: 0, z: 0, w: 1 },
p3: { x: 2, y: 0, z: 0, w: 1 },
p4: { x: 2, y: 0, z: 0, w: 1 },
bounds: { x: 2, y: 0, width: 0, height: 0 } },
'p1Top4Attributes1');
checkDOMQuad(function() {
var q = new DOMQuad({}, {}, {}, {});
q.bounds = new DOMRect(10, 10, 100, 100);
checkDOMQuad(q, initial);
}, 'boundsAttribute0');
test(function() {
return q;
}, initial, 'boundsAttribute0');
checkDOMQuad(function() {
var q = new DOMQuad({}, {}, {}, {});
q.bounds.x = 10;
q.bounds.y = 10;
q.bounds.width = 100;
q.bounds.height = 100;
checkDOMQuad(q, initial);
}, 'boundsAttribute1');
return q;
}, initial, 'boundsAttribute1');
function checkDOMQuad(q, exp) {
assert_equals(q.p1.x, exp.p1.x, "Expected value for p1.x is " + exp.p1.x);
assert_equals(q.p1.y, exp.p1.y, "Expected value for p1.y is " + exp.p1.y);
assert_equals(q.p1.z, exp.p1.z, "Expected value for p1.z is " + exp.p1.z);
assert_equals(q.p1.w, exp.p1.w, "Expected value for p1.w is " + exp.p1.w);
assert_equals(q.p2.x, exp.p2.x, "Expected value for p2.x is " + exp.p2.x);
assert_equals(q.p2.y, exp.p2.y, "Expected value for p2.y is " + exp.p2.y);
assert_equals(q.p2.z, exp.p2.z, "Expected value for p2.z is " + exp.p2.z);
assert_equals(q.p2.w, exp.p2.w, "Expected value for p2.w is " + exp.p2.w);
assert_equals(q.p3.x, exp.p3.x, "Expected value for p3.x is " + exp.p3.x);
assert_equals(q.p3.y, exp.p3.y, "Expected value for p3.y is " + exp.p3.y);
assert_equals(q.p3.z, exp.p3.z, "Expected value for p3.z is " + exp.p3.z);
assert_equals(q.p3.w, exp.p3.w, "Expected value for p3.w is " + exp.p3.w);
assert_equals(q.p4.x, exp.p4.x, "Expected value for p4.x is " + exp.p4.x);
assert_equals(q.p4.y, exp.p4.y, "Expected value for p4.y is " + exp.p4.y);
assert_equals(q.p4.z, exp.p4.z, "Expected value for p4.z is " + exp.p4.z);
assert_equals(q.p4.w, exp.p4.w, "Expected value for p4.w is " + exp.p4.w);
assert_equals(q.bounds.x, exp.bounds.x, "Expected value for bounds.x is " + exp.bounds.x);
assert_equals(q.bounds.y, exp.bounds.y, "Expected value for bounds.y is " + exp.bounds.y);
assert_equals(q.bounds.width, exp.bounds.width, "Expected value for bounds.width is " + exp.bounds.width);
assert_equals(q.bounds.height, exp.bounds.height, "Expected value for bounds.height is " + exp.bounds.height);
function checkDOMQuad(createQuad, exp, name) {
test(function() {
var q = createQuad();
assert_equals(q.p1.x, exp.p1.x, "Expected value for p1.x is " + exp.p1.x);
assert_equals(q.p1.y, exp.p1.y, "Expected value for p1.y is " + exp.p1.y);
assert_equals(q.p1.z, exp.p1.z, "Expected value for p1.z is " + exp.p1.z);
assert_equals(q.p1.w, exp.p1.w, "Expected value for p1.w is " + exp.p1.w);
assert_equals(q.p2.x, exp.p2.x, "Expected value for p2.x is " + exp.p2.x);
assert_equals(q.p2.y, exp.p2.y, "Expected value for p2.y is " + exp.p2.y);
assert_equals(q.p2.z, exp.p2.z, "Expected value for p2.z is " + exp.p2.z);
assert_equals(q.p2.w, exp.p2.w, "Expected value for p2.w is " + exp.p2.w);
assert_equals(q.p3.x, exp.p3.x, "Expected value for p3.x is " + exp.p3.x);
assert_equals(q.p3.y, exp.p3.y, "Expected value for p3.y is " + exp.p3.y);
assert_equals(q.p3.z, exp.p3.z, "Expected value for p3.z is " + exp.p3.z);
assert_equals(q.p3.w, exp.p3.w, "Expected value for p3.w is " + exp.p3.w);
assert_equals(q.p4.x, exp.p4.x, "Expected value for p4.x is " + exp.p4.x);
assert_equals(q.p4.y, exp.p4.y, "Expected value for p4.y is " + exp.p4.y);
assert_equals(q.p4.z, exp.p4.z, "Expected value for p4.z is " + exp.p4.z);
assert_equals(q.p4.w, exp.p4.w, "Expected value for p4.w is " + exp.p4.w);
}, name + ": points");
test(function() {
var q = createQuad();
assert_equals(q.bounds.x, exp.bounds.x, "Expected value for bounds.x is " + exp.bounds.x);
assert_equals(q.bounds.y, exp.bounds.y, "Expected value for bounds.y is " + exp.bounds.y);
assert_equals(q.bounds.width, exp.bounds.width, "Expected value for bounds.width is " + exp.bounds.width);
assert_equals(q.bounds.height, exp.bounds.height, "Expected value for bounds.height is " + exp.bounds.height);
}, name + ": bounds");
}
</script>

View file

@ -13,20 +13,20 @@
<div id="log"></div>
<script>
initial = {
m11: 1, m21: 0, m31: 0, m41: 0,
m12: 0, m22: 1, m32: 0, m42: 0,
m13: 0, m23: 0, m33: 1, m43: 0,
m11: 1, m21: 0, m31: 0, m41: 0,
m12: 0, m22: 1, m32: 0, m42: 0,
m13: 0, m23: 0, m33: 1, m43: 0,
m14: 0, m24: 0, m34: 0, m44: 1,
is2D: true,
isIdentity: true
isIdentity: true
};
scaleTranslate2D = {
m11: 2, m21: 0, m31: 0, m41: 10,
m12: 0, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m11: 2, m21: 0, m31: 0, m41: 10,
m12: 0, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m14: 0, m24: 0, m34: 0, m44: 1,
is2D: true,
isIdentity: true
isIdentity: true
};
test(function() {
@ -103,12 +103,12 @@
0.0, 0.0, 1.0, 0.0,
10.0, 10.0, 0.0, 1.0];
checkDOMMatrix(new DOMMatrix(sequence), {
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m14: 0, m24: 0, m34: 0, m44: 1,
is2D: false,
isIdentity: false
isIdentity: false
});
},'testConstructor12');
test(function() {
@ -118,12 +118,12 @@
0.0, 0.0, 1.0, 0.0,
10.0, 10.0, 0.0, 1.0]);
checkDOMMatrix(new DOMMatrix(matrix), {
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
m14: 0, m24: 0, m34: 0, m44: 1,
is2D: false,
isIdentity: false
isIdentity: false
});
},'testConstructor13');
test(function() {

View file

@ -16,7 +16,7 @@
<p>Test DOMQuad interface</p>
<div id="log"></div>
<script>
initial = {
var initial = {
p1: { x: 0, y: 0, z: 0, w: 1 },
p2: { x: 0, y: 0, z: 0, w: 1 },
p3: { x: 0, y: 0, z: 0, w: 1 },
@ -24,135 +24,147 @@
bounds: { x: 0, y: 0, width: 0, height: 0 }
};
test(function() {
checkDOMQuad(new DOMQuad(), initial);
},'testConstructor0');
checkDOMQuad(function() { return new DOMQuad(); }, initial, 'testConstructor0');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad(1); });
},'testConstructor1');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad(1, 2); });
},'testConstructor2');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad(1, 2, 3); });
},'testConstructor3');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad(1, 2, 3, 4); });
},'testConstructor4');
test(function() {
checkDOMQuad(new DOMQuad(new DOMRect(10, 20, 100, 200)),
checkDOMQuad(
function() { return new DOMQuad(new DOMRect(10, 20, 100, 200)); },
{ p1: { x: 10, y: 20, z: 0, w: 1 },
p2: { x: 110, y: 20, z: 0, w: 1 },
p3: { x: 110, y: 220, z: 0, w: 1 },
p4: { x: 10, y: 220, z: 0, w: 1 },
bounds: { x: 10, y: 20, width: 100, height: 200 } });
},'testConstructor5');
test(function() {
checkDOMQuad(new DOMQuad(new DOMRect(10, 20, -100, -200)),
bounds: { x: 10, y: 20, width: 100, height: 200 } },
'testConstructor5');
checkDOMQuad(
function() { return new DOMQuad(new DOMRect(10, 20, -100, -200)) },
{ p1: { x: 10, y: 20, z: 0, w: 1 },
p2: { x: -90, y: 20, z: 0, w: 1 },
p3: { x: -90, y: -180, z: 0, w: 1 },
p4: { x: 10, y: -180, z: 0, w: 1 },
bounds: { x: -90, y: -180, width: 100, height: 200 } });
},'testConstructor6');
test(function() {
checkDOMQuad(new DOMQuad(new DOMRect(-Infinity, -Infinity, Infinity, Infinity)),
bounds: { x: -90, y: -180, width: 100, height: 200 } },
'testConstructor6');
checkDOMQuad(
function() { return new DOMQuad(new DOMRect(-Infinity, -Infinity, Infinity, Infinity)) },
{ p1: { x: -Infinity, y: -Infinity, z: 0, w: 1 },
p2: { x: NaN, y: -Infinity, z: 0, w: 1 },
p3: { x: NaN, y: NaN, z: 0, w: 1 },
p4: { x: -Infinity, y: NaN, z: 0, w: 1 },
bounds: { x: -Infinity, y: -Infinity, width: NaN, height: NaN } });
},'testConstructor7');
test(function() {
checkDOMQuad(new DOMQuad(new DOMRect()), initial);
},'testConstructor8');
test(function() {
checkDOMQuad(new DOMQuad({}), initial);
},'testConstructor9');
test(function() {
checkDOMQuad(new DOMQuad({}, {}), initial);
},'testConstructor10');
test(function() {
checkDOMQuad(new DOMQuad({}, {}, {}), initial);
},'testConstructor11');
test(function() {
checkDOMQuad(new DOMQuad({}, {}, {}, {}), initial);
},'testConstructor12');
test(function() {
checkDOMQuad(new DOMQuad(null, undefined, {}, {}), initial);
},'testConstructor13');
test(function() {
checkDOMQuad(new DOMQuad({}, {}, {}, {}, NaN), initial);
},'testConstructor14');
bounds: { x: -Infinity, y: -Infinity, width: NaN, height: NaN } },
'testConstructor7');
checkDOMQuad(function() { return new DOMQuad(new DOMRect()); }, initial, 'testConstructor8');
checkDOMQuad(function() { return new DOMQuad({}); }, initial, 'testConstructor9');
checkDOMQuad(function() { return new DOMQuad({}, {}); }, initial, 'testConstructor10');
checkDOMQuad(function() { return new DOMQuad({}, {}, {}); }, initial, 'testConstructor11');
checkDOMQuad(function() { return new DOMQuad({}, {}, {}, {}); }, initial, 'testConstructor12');
checkDOMQuad(function() { return new DOMQuad(null, undefined, {}, {}); }, initial, 'testConstructor13');
checkDOMQuad(function() { return new DOMQuad({}, {}, {}, {}, NaN); }, initial, 'testConstructor14');
test(function() {
assert_throws(new TypeError(), function() { new DOMQuad({}, {}, {}, NaN); });
},'testConstructor15');
test(function() {
checkDOMQuad(new DOMQuad({ y: 10 }, { x: 20 }, { z: 30 }, { x: 20, y: 10, z: 20, w: 10 }),
{ p1: { x: 0, y: 10, z: 0, w: 1 },
p2: { x: 20, y: 0, z: 0, w: 1 },
p3: { x: 0, y: 0, z: 30, w: 1 },
p4: { x: 20, y: 10, z: 20, w: 10 },
bounds: { x: 0, y: 0, width: 20, height: 10 } });
},'testConstructor16');
test(function() {
checkDOMQuad(function() {
return new DOMQuad({ y: 10 }, { x: 20 }, { z: 30 }, { x: 20, y: 10, z: 20, w: 10 });
},
{ p1: { x: 0, y: 10, z: 0, w: 1 },
p2: { x: 20, y: 0, z: 0, w: 1 },
p3: { x: 0, y: 0, z: 30, w: 1 },
p4: { x: 20, y: 10, z: 20, w: 10 },
bounds: { x: 0, y: 0, width: 20, height: 10 } },
'testConstructor16');
checkDOMQuad(function() {
// p1 to p4 are readonly attributes.
var q = new DOMQuad({}, {}, {}, {});
q.p1 = new DOMPoint(2, 2);
q.p2 = new DOMPoint(2, 2);
q.p3 = new DOMPoint(2, 2);
q.p4 = new DOMPoint(2, 2);
checkDOMQuad(q, initial);
}, 'p1Top4Attributes0');
test(function() {
// p1 to p4 return the same DOMPoint object which can be modified.
return q;
}, initial, 'p1Top4Attributes0');
checkDOMQuad(function() {
var q = new DOMQuad({}, {}, {}, {});
q.p1.x = 2;
q.p2.x = 2;
q.p3.x = 2;
q.p4.x = 2;
checkDOMQuad(q,
{ p1: { x: 2, y: 0, z: 0, w: 1 },
p2: { x: 2, y: 0, z: 0, w: 1 },
p3: { x: 2, y: 0, z: 0, w: 1 },
p4: { x: 2, y: 0, z: 0, w: 1 },
bounds: { x: 2, y: 0, width: 0, height: 0 } });
}, 'p1Top4Attributes1');
test(function() {
return q;
},
{ p1: { x: 2, y: 0, z: 0, w: 1 },
p2: { x: 2, y: 0, z: 0, w: 1 },
p3: { x: 2, y: 0, z: 0, w: 1 },
p4: { x: 2, y: 0, z: 0, w: 1 },
bounds: { x: 2, y: 0, width: 0, height: 0 } },
'p1Top4Attributes1');
checkDOMQuad(function() {
var q = new DOMQuad({}, {}, {}, {});
q.bounds = new DOMRect(10, 10, 100, 100);
checkDOMQuad(q, initial);
}, 'boundsAttribute0');
test(function() {
return q;
}, initial, 'boundsAttribute0');
checkDOMQuad(function() {
var q = new DOMQuad({}, {}, {}, {});
q.bounds.x = 10;
q.bounds.y = 10;
q.bounds.width = 100;
q.bounds.height = 100;
checkDOMQuad(q, initial);
}, 'boundsAttribute1');
return q;
}, initial, 'boundsAttribute1');
function checkDOMQuad(q, exp) {
assert_equals(q.p1.x, exp.p1.x, "Expected value for p1.x is " + exp.p1.x);
assert_equals(q.p1.y, exp.p1.y, "Expected value for p1.y is " + exp.p1.y);
assert_equals(q.p1.z, exp.p1.z, "Expected value for p1.z is " + exp.p1.z);
assert_equals(q.p1.w, exp.p1.w, "Expected value for p1.w is " + exp.p1.w);
assert_equals(q.p2.x, exp.p2.x, "Expected value for p2.x is " + exp.p2.x);
assert_equals(q.p2.y, exp.p2.y, "Expected value for p2.y is " + exp.p2.y);
assert_equals(q.p2.z, exp.p2.z, "Expected value for p2.z is " + exp.p2.z);
assert_equals(q.p2.w, exp.p2.w, "Expected value for p2.w is " + exp.p2.w);
assert_equals(q.p3.x, exp.p3.x, "Expected value for p3.x is " + exp.p3.x);
assert_equals(q.p3.y, exp.p3.y, "Expected value for p3.y is " + exp.p3.y);
assert_equals(q.p3.z, exp.p3.z, "Expected value for p3.z is " + exp.p3.z);
assert_equals(q.p3.w, exp.p3.w, "Expected value for p3.w is " + exp.p3.w);
assert_equals(q.p4.x, exp.p4.x, "Expected value for p4.x is " + exp.p4.x);
assert_equals(q.p4.y, exp.p4.y, "Expected value for p4.y is " + exp.p4.y);
assert_equals(q.p4.z, exp.p4.z, "Expected value for p4.z is " + exp.p4.z);
assert_equals(q.p4.w, exp.p4.w, "Expected value for p4.w is " + exp.p4.w);
assert_equals(q.bounds.x, exp.bounds.x, "Expected value for bounds.x is " + exp.bounds.x);
assert_equals(q.bounds.y, exp.bounds.y, "Expected value for bounds.y is " + exp.bounds.y);
assert_equals(q.bounds.width, exp.bounds.width, "Expected value for bounds.width is " + exp.bounds.width);
assert_equals(q.bounds.height, exp.bounds.height, "Expected value for bounds.height is " + exp.bounds.height);
function checkDOMQuad(createQuad, exp, name) {
test(function() {
var q = createQuad();
assert_equals(q.p1.x, exp.p1.x, "Expected value for p1.x is " + exp.p1.x);
assert_equals(q.p1.y, exp.p1.y, "Expected value for p1.y is " + exp.p1.y);
assert_equals(q.p1.z, exp.p1.z, "Expected value for p1.z is " + exp.p1.z);
assert_equals(q.p1.w, exp.p1.w, "Expected value for p1.w is " + exp.p1.w);
assert_equals(q.p2.x, exp.p2.x, "Expected value for p2.x is " + exp.p2.x);
assert_equals(q.p2.y, exp.p2.y, "Expected value for p2.y is " + exp.p2.y);
assert_equals(q.p2.z, exp.p2.z, "Expected value for p2.z is " + exp.p2.z);
assert_equals(q.p2.w, exp.p2.w, "Expected value for p2.w is " + exp.p2.w);
assert_equals(q.p3.x, exp.p3.x, "Expected value for p3.x is " + exp.p3.x);
assert_equals(q.p3.y, exp.p3.y, "Expected value for p3.y is " + exp.p3.y);
assert_equals(q.p3.z, exp.p3.z, "Expected value for p3.z is " + exp.p3.z);
assert_equals(q.p3.w, exp.p3.w, "Expected value for p3.w is " + exp.p3.w);
assert_equals(q.p4.x, exp.p4.x, "Expected value for p4.x is " + exp.p4.x);
assert_equals(q.p4.y, exp.p4.y, "Expected value for p4.y is " + exp.p4.y);
assert_equals(q.p4.z, exp.p4.z, "Expected value for p4.z is " + exp.p4.z);
assert_equals(q.p4.w, exp.p4.w, "Expected value for p4.w is " + exp.p4.w);
}, name + ": points");
test(function() {
var q = createQuad();
assert_equals(q.bounds.x, exp.bounds.x, "Expected value for bounds.x is " + exp.bounds.x);
assert_equals(q.bounds.y, exp.bounds.y, "Expected value for bounds.y is " + exp.bounds.y);
assert_equals(q.bounds.width, exp.bounds.width, "Expected value for bounds.width is " + exp.bounds.width);
assert_equals(q.bounds.height, exp.bounds.height, "Expected value for bounds.height is " + exp.bounds.height);
}, name + ": bounds");
}
</script>