4 https://bugzilla.mozilla.org/show_bug.cgi?id=462428
7 <title>Test for Bug
462428</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=462428">Mozilla Bug
462428</a>
14 <div id=
"content" style=
"display: none">
18 <script type=
"application/javascript">
20 /** Test for Bug
462428 **/
21 var x = new XMLHttpRequest;
23 var getter = x.__lookupGetter__(
"readyState");
24 ok(getter !== undefined,
"But able to look it up the normal way");
25 ok(!x.hasOwnProperty(
"readyState"),
"property should still be on the prototype");
29 if (i ===
"readyState") {
34 ok(sawProp,
"property should be enumerable");
36 is(getter.call(x),
1,
"the getter actually works");
38 Object.getPrototypeOf(x).__defineSetter__(
"readyState", function() {});
39 is(getter.call(x),
1,
"the getter works after defineSetter");
41 is(x.responseType,
"",
"Should have correct responseType up front");
42 var setter = x.__lookupSetter__(
"responseType");
43 setter.call(x,
"document");
44 is(x.responseType,
"document",
"the setter is bound correctly");