forked from mirrors/gecko-dev
24 lines
520 B
JavaScript
24 lines
520 B
JavaScript
/*
|
|
* Any copyright is dedicated to the Public Domain.
|
|
* http://creativecommons.org/licenses/publicdomain/
|
|
*/
|
|
|
|
var gTestfile = 'trapflatclosure.js';
|
|
var BUGNUMBER = 549617;
|
|
var summary = 'flat closure debugged via trap while still active';
|
|
|
|
var expect = "abc";
|
|
var actual = expect;
|
|
|
|
function a(x, y) {
|
|
return function () { return x; };
|
|
}
|
|
|
|
var f = a("abc", 123);
|
|
if (this.trap)
|
|
trap(f, "try {actual = x} catch (e) {actual = e}");
|
|
f();
|
|
|
|
reportCompare(expect, actual, summary);
|
|
|
|
printStatus("All tests passed!");
|