2012-02-07 09:22:30 -08:00
|
|
|
function run_test()
|
|
|
|
{
|
|
|
|
Components.utils.import("resource://gre/modules/jsdebugger.jsm");
|
2012-05-01 08:17:32 -07:00
|
|
|
addDebuggerToGlobal(this);
|
2012-02-07 09:22:30 -08:00
|
|
|
var g = testGlobal("test1");
|
|
|
|
|
|
|
|
var dbg = new Debugger();
|
|
|
|
dbg.addDebuggee(g);
|
|
|
|
dbg.onDebuggerStatement = function(aFrame) {
|
2012-03-13 00:13:02 -07:00
|
|
|
let args = aFrame.arguments;
|
2012-02-07 09:22:30 -08:00
|
|
|
try {
|
|
|
|
args[0];
|
|
|
|
do_check_true(true);
|
|
|
|
} catch(ex) {
|
|
|
|
do_check_true(false);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
g.eval("function stopMe(arg) {debugger;}");
|
|
|
|
|
|
|
|
g2 = testGlobal("test2");
|
|
|
|
g2.g = g;
|
|
|
|
g2.eval("(" + function createBadEvent() {
|
|
|
|
let parser = Components.classes["@mozilla.org/xmlextras/domparser;1"].createInstance(Components.interfaces.nsIDOMParser);
|
|
|
|
let doc = parser.parseFromString("<foo></foo>", "text/xml");
|
|
|
|
g.stopMe(doc.createEvent("MouseEvent"));
|
|
|
|
} + ")()");
|
|
|
|
|
|
|
|
dbg.enabled = false;
|
|
|
|
}
|