Bug 817425 - many id's in devtools debugger listed as undefined, r=past

This commit is contained in:
Victor Porof 2012-12-04 15:48:39 +02:00
parent 4c0118c03c
commit 2ed4f10038
2 changed files with 22 additions and 1 deletions

View File

@ -27,9 +27,30 @@ function testSimpleCall() {
let testVar = testScope.addVar("something");
let duplVar = testScope.addVar("something");
info("Scope id: " + testScope.target.id);
info("Scope name: " + testScope.target.name);
info("Variable id: " + testVar.target.id);
info("Variable name: " + testVar.target.name);
ok(testScope,
"Should have created a scope.");
ok(testVar,
"Should have created a variable.");
ok(testScope.id.contains("test-scope"),
"Should have the correct scope id.");
ok(testScope.target.id.contains("test-scope"),
"Should have the correct scope id on the element.");
is(testScope.name, "test-scope",
"Should have the correct scope name.");
ok(testVar.id.contains("something"),
"Should have the correct variable id.");
ok(testVar.target.id.contains("something"),
"Should have the correct variable id on the element.");
is(testVar.name, "something",
"Should have the correct variable name.");
is(duplVar, null,
"Shouldn't be able to duplicate variables in the same scope.");

View File

@ -713,7 +713,7 @@ Scope.prototype = {
let document = this.document;
let element = this._target = document.createElement("vbox");
element.id = this._id;
element.id = this._idString;
element.className = aClassName;
let arrow = this._arrow = document.createElement("hbox");