Bug 773653 - Intermittent leak in browser_dbg_breakpoint-new-script.js; r=rcampbell

This commit is contained in:
Victor Porof 2012-07-18 17:06:45 +03:00
Родитель 85b076a82d
Коммит 49cd63f442
1 изменённых файлов: 11 добавлений и 9 удалений

Просмотреть файл

@ -49,24 +49,22 @@ function testAddBreakpoint()
function testResume()
{
gDebugger.DebuggerController.activeThread.addOneTimeListener("resumed", function test() {
gDebugger.DebuggerController.activeThread.addOneTimeListener("paused", function test() {
let thread = gDebugger.DebuggerController.activeThread;
thread.addOneTimeListener("resumed", function() {
thread.addOneTimeListener("paused", function() {
executeSoon(testBreakpointHit);
}, false);
});
EventUtils.sendMouseEvent({ type: "click" },
content.document.querySelector("button"),
content.window);
content.document.querySelector("button"));
});
gDebugger.DebuggerController.activeThread.resume();
thread.resume();
}
function testBreakpointHit()
{
var frames = gDebugger.DebuggerView.StackFrames._frames;
is(gDebugger.DebuggerController.activeThread.state, "paused",
"The breakpoint was hit.");
@ -76,10 +74,14 @@ function testBreakpointHit()
function resumeAndFinish() {
let thread = gDebugger.DebuggerController.activeThread;
thread.addOneTimeListener("paused", function test(aEvent, aPacket) {
thread.addOneTimeListener("resumed", function() {
executeSoon(closeDebuggerAndFinish);
});
is(aPacket.why.type, "debuggerStatement", "Execution has advanced to the next line.");
isnot(aPacket.why.type, "breakpoint", "No ghost breakpoint was hit.");
thread.resume();
closeDebuggerAndFinish();
});
thread.resume();