Fix some errors in debugger tests

This commit is contained in:
Ryan Dahl 2010-12-30 17:52:14 -08:00
parent 294bcb33e6
commit aea568b04a
2 changed files with 7 additions and 5 deletions

View File

@ -108,7 +108,7 @@ function Client() {
this._reqCallbacks = [];
var socket = this;
this.currentFrame = 0;
this.currentFrame = NO_FRAME;
this.currentSourceLine = -1;
this.currentSource = null;
this.handles = {};

View File

@ -85,11 +85,13 @@ addTest(function (client, done) {
addTest(function (client, done) {
console.error("requesting scripts");
client.reqScripts(function (s) {
console.error("got %d scripts", s.length);
client.reqScripts(function () {
console.error("got %d scripts", Object.keys(client.scripts).length);
var foundMainScript = false;
for (var i = 0; i < s.length; i++) {
if (s[i].name === 'node.js') {
for (var k in client.scripts) {
var script = client.scripts[k];
if (script && script.name === 'node.js') {
foundMainScript = true;
break;
}