| Index: LayoutTests/http/tests/resources/testharness-helpers.js
|
| diff --git a/LayoutTests/http/tests/resources/testharness-helpers.js b/LayoutTests/http/tests/resources/testharness-helpers.js
|
| index 7f66fed8091bcc3367b7bbd582679b49fadfcd0a..d241ac0e4882222a01807c49510d786614eab4c4 100644
|
| --- a/LayoutTests/http/tests/resources/testharness-helpers.js
|
| +++ b/LayoutTests/http/tests/resources/testharness-helpers.js
|
| @@ -122,3 +122,25 @@ function assert_array_objects_equals(actual, expected, description) {
|
| description + ' : object[' + index + ']');
|
| });
|
| }
|
| +
|
| +// Asserts that |object| that is an instance of some interface has the attribute
|
| +// |attribute_name| following the conditions specified by WebIDL, but it's
|
| +// acceptable that the attribute |attribute_name| is an own property of the
|
| +// object because we're in the middle of moving the attribute to a prototype
|
| +// chain. Once we complete the transition to prototype chains,
|
| +// assert_will_be_idl_attribute must be replaced with assert_idl_attribute
|
| +// defined in testharness.js.
|
| +//
|
| +// FIXME: Remove assert_will_be_idl_attribute once we complete the transition
|
| +// of moving the DOM attributes to prototype chains. (http://crbug.com/43394)
|
| +function assert_will_be_idl_attribute(object, attribute_name, description) {
|
| + assert_true(typeof object === "object", description);
|
| +
|
| + assert_true("hasOwnProperty" in object, description);
|
| +
|
| + // Do not test if |attribute_name| is not an own property because
|
| + // |attribute_name| is in the middle of the transition to a prototype
|
| + // chain. (http://crbug.com/43394)
|
| +
|
| + assert_true(attribute_name in object, description);
|
| +}
|
|
|