| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
var gTestfile = 'regress-346801.js'; |
| 7 |
|
| 8 |
var BUGNUMBER = 346801; |
| 9 |
var summary = 'Hang regression from bug 346021'; |
| 10 |
var actual = ''; |
| 11 |
var expect = 'No Hang'; |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
test(); |
| 16 |
|
| 17 |
|
| 18 |
function test() |
| 19 |
{ |
| 20 |
enterFunc ('test'); |
| 21 |
printBugNumber(BUGNUMBER); |
| 22 |
printStatus (summary); |
| 23 |
|
| 24 |
try |
| 25 |
{ |
| 26 |
var Class = { |
| 27 |
create: function() { |
| 28 |
return function() { |
| 29 |
this.initialize.apply(this, arguments); |
| 30 |
} |
| 31 |
} |
| 32 |
} |
| 33 |
|
| 34 |
Object.extend = function(destination, source) { |
| 35 |
print("Start"); |
| 36 |
|
| 37 |
|
| 38 |
if(destination==source) |
| 39 |
print("Same desination and source!"); |
| 40 |
var i = 0; |
| 41 |
for (property in source) { |
| 42 |
|
| 43 |
destination[property] = source[property]; |
| 44 |
++i; |
| 45 |
if (i > 1000) { |
| 46 |
throw "Hang"; |
| 47 |
} |
| 48 |
} |
| 49 |
print("Finish"); |
| 50 |
return destination; |
| 51 |
} |
| 52 |
|
| 53 |
var Ajax = { |
| 54 |
}; |
| 55 |
|
| 56 |
Ajax.Base = function() {}; |
| 57 |
Ajax.Base.prototype = { |
| 58 |
responseIsFailure: function() { } |
| 59 |
} |
| 60 |
|
| 61 |
Ajax.Request = Class.create(); |
| 62 |
|
| 63 |
Ajax.Request.prototype = Object.extend(new Ajax.Base(), {}); |
| 64 |
|
| 65 |
Ajax.Updater = Class.create(); |
| 66 |
|
| 67 |
Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype); |
| 68 |
actual = 'No Hang'; |
| 69 |
} |
| 70 |
catch(ex) |
| 71 |
{ |
| 72 |
actual = ex + ''; |
| 73 |
} |
| 74 |
reportCompare(expect, actual, summary); |
| 75 |
|
| 76 |
exitFunc ('test'); |
| 77 |
} |