| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
var gTestfile = 'regress-327608.js'; |
| 7 |
|
| 8 |
var BUGNUMBER = 327608; |
| 9 |
var summary = 'Do not assume we will find the prototype property'; |
| 10 |
var actual = 'No Crash'; |
| 11 |
var expect = 'No Crash'; |
| 12 |
|
| 13 |
printBugNumber(BUGNUMBER); |
| 14 |
printStatus (summary); |
| 15 |
print('This test runs only in the browser'); |
| 16 |
|
| 17 |
function countProps(obj) |
| 18 |
{ |
| 19 |
var c; |
| 20 |
for (var prop in obj) |
| 21 |
++c; |
| 22 |
return c; |
| 23 |
} |
| 24 |
|
| 25 |
function init() |
| 26 |
{ |
| 27 |
var inp = document.getElementsByTagName("input")[0]; |
| 28 |
countProps(inp); |
| 29 |
gc(); |
| 30 |
var blurfun = inp.blur; |
| 31 |
blurfun.__proto__ = null; |
| 32 |
countProps(blurfun); |
| 33 |
reportCompare(expect, actual, summary); |
| 34 |
gDelayTestDriverEnd = false; |
| 35 |
jsTestDriverEnd(); |
| 36 |
} |
| 37 |
|
| 38 |
if (typeof window != 'undefined') |
| 39 |
{ |
| 40 |
|
| 41 |
gDelayTestDriverEnd = true; |
| 42 |
|
| 43 |
document.write('<input>'); |
| 44 |
window.addEventListener("load", init, false); |
| 45 |
} |
| 46 |
else |
| 47 |
{ |
| 48 |
reportCompare(expect, actual, summary); |
| 49 |
} |