2011-08-31 19:39:39 +04:00
|
|
|
function run_test()
|
|
|
|
{
|
2018-01-30 02:20:18 +03:00
|
|
|
ChromeUtils.import("resource://gre/modules/jsdebugger.jsm");
|
2012-05-01 19:17:32 +04:00
|
|
|
addDebuggerToGlobal(this);
|
2011-08-31 19:39:39 +04:00
|
|
|
var g = testGlobal("test1");
|
|
|
|
|
|
|
|
var dbg = new Debugger();
|
|
|
|
dbg.addDebuggee(g);
|
|
|
|
dbg.onDebuggerStatement = function(aFrame) {
|
|
|
|
let args = aFrame["arguments"];
|
|
|
|
try {
|
|
|
|
args[0];
|
2017-12-21 13:08:17 +03:00
|
|
|
Assert.ok(true);
|
2011-08-31 19:39:39 +04:00
|
|
|
} catch(ex) {
|
2017-12-21 13:08:17 +03:00
|
|
|
Assert.ok(false);
|
2011-08-31 19:39:39 +04:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
g.eval("function stopMe(arg) {debugger;}");
|
|
|
|
|
|
|
|
g2 = testGlobal("test2");
|
|
|
|
g2.g = g;
|
|
|
|
g2.eval("(" + function createBadEvent() {
|
2018-04-21 06:04:45 +03:00
|
|
|
Cu.importGlobalProperties(["DOMParser"]);
|
|
|
|
let parser = new DOMParser();
|
2011-08-31 19:39:39 +04:00
|
|
|
let doc = parser.parseFromString("<foo></foo>", "text/xml");
|
|
|
|
g.stopMe(doc.createEvent("MouseEvent"));
|
|
|
|
} + ")()");
|
|
|
|
|
|
|
|
dbg.enabled = false;
|
|
|
|
}
|