This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29090 - Tests check that DOMRect cto throws for 1...3 parameters
Summary: Tests check that DOMRect cto throws for 1...3 parameters
Status: RESOLVED FIXED
Alias: None
Product: FXTF
Classification: Unclassified
Component: Geometry (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: sideshowbarker+geometry
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-27 14:14 UTC by Simon Sapin
Modified: 2015-08-29 17:42 UTC (History)
1 user (show)

See Also:


Attachments

Description Simon Sapin 2015-08-27 14:14:29 UTC
test(function() {
            assert_throws(new TypeError(), function() { new DOMRect(1); });
        },'testConstructor1');
        test(function() {
            assert_throws(new TypeError(), function() { new DOMRect(1, 2); });
        },'testConstructor2');
        test(function() {
            assert_throws(new TypeError(), function() { new DOMRect(1, 2, 3); });
        },'testConstructor3');

… but the spec’s IDL marks parameters optional and gives them a default value. The tests should probably be updated.
Comment 1 Simon Pieters 2015-08-29 17:42:13 UTC
https://github.com/w3c/csswg-test/pull/834