| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
gTestfile = 'regress-369740.js'; |
| 8 |
|
| 9 |
var BUGNUMBER = 369740; |
| 10 |
var summary = 'generic code for function::'; |
| 11 |
var actual = 'No Exception'; |
| 12 |
var expect = 'No Exception'; |
| 13 |
|
| 14 |
printBugNumber(BUGNUMBER); |
| 15 |
START(summary); |
| 16 |
|
| 17 |
actual = expect = Math.function::sin + ''; |
| 18 |
TEST(1, expect, actual); |
| 19 |
|
| 20 |
var x = <xml/>; |
| 21 |
x.function::toString = function(){return "moo"}; |
| 22 |
actual = x + ''; |
| 23 |
expect = 'moo'; |
| 24 |
TEST(2, expect, actual); |
| 25 |
|
| 26 |
x = <><a/><b/></>; |
| 27 |
|
| 28 |
expect = 'test'; |
| 29 |
try |
| 30 |
{ |
| 31 |
with (x) { |
| 32 |
function::toString = function() { return "test"; } |
| 33 |
} |
| 34 |
|
| 35 |
actual = x + ''; |
| 36 |
} |
| 37 |
catch(ex) |
| 38 |
{ |
| 39 |
actual = ex + ''; |
| 40 |
} |
| 41 |
TEST(3, expect, actual); |
| 42 |
|
| 43 |
|
| 44 |
expect = actual = 'No Crash'; |
| 45 |
const xhtmlNS = null; |
| 46 |
this[xhtmlNS] = {}; |
| 47 |
TEST(4, expect, actual); |
| 48 |
|
| 49 |
|
| 50 |
END(); |