| <!DOCTYPE html> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script> |
| test(() => { |
| let title_descriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'title'); |
| |
| // http://heycam.github.io/webidl/#dfn-attribute-getter |
| // "The attribute getter is a Function object..." |
| // "The value of the Function object’s"length" property is the Number value 0." |
| assert_equals(title_descriptor.get.length, 0, |
| "The attribute getter Function object's length property must be 0"); |
| |
| // http://heycam.github.io/webidl/#dfn-attribute-setter |
| // "The attribute setter ... is a Function object..." |
| // "The value of the Function object’s "length" property is the Number value 1." |
| assert_equals(title_descriptor.set.length, 1, |
| "The attribute setter Function object's length property must be 1"); |
| }, "Verify WebIDL interface attribute getter/setter function lengths"); |
| </script> |