Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Commit

Permalink
Merge pull request #834 from tschneidereit/fix-domrect-ctor-tests
Browse files Browse the repository at this point in the history
Bug 29090 - Fix DOMRect constructor tests
  • Loading branch information
zcorpan committed Aug 27, 2015
2 parents 70d47df + 5b8b47e commit 1284adb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions geometry-1/DOMRect-001.html
Expand Up @@ -27,13 +27,16 @@
{ x: 0, y: 0, width: 0, height: 0, top: 0, right: 0, bottom: 0, left: 0 });
},'testConstructor0');
test(function() {
assert_throws(new TypeError(), function() { new DOMRect(1); });
checkDOMRect(new DOMRect(1),
{ x: 1, y: 0, width: 0, height: 0, top: 0, right: 1, bottom: 0, left: 1 });
},'testConstructor1');
test(function() {
assert_throws(new TypeError(), function() { new DOMRect(1, 2); });
checkDOMRect(new DOMRect(1, 2),
{ x: 1, y: 2, width: 0, height: 0, top: 2, right: 1, bottom: 2, left: 1 });
},'testConstructor2');
test(function() {
assert_throws(new TypeError(), function() { new DOMRect(1, 2, 3); });
checkDOMRect(new DOMRect(1, 2, 3),
{ x: 1, y: 2, width: 3, height: 0, top: 2, right: 4, bottom: 2, left: 1 });
},'testConstructor3');
test(function() {
checkDOMRect(new DOMRect(1, 2, 3, 4),
Expand Down

0 comments on commit 1284adb

Please sign in to comment.