Bug 832470 - Watch expressions involving |this| sometimes showing a wrong result, r=past

This commit is contained in:
Victor Porof 2013-01-24 13:28:52 +02:00
Родитель 738d136676
Коммит a6f86fbbdc
10 изменённых файлов: 219 добавлений и 76 удалений

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

@ -35,6 +35,9 @@ Cu.import("resource:///modules/source-editor.jsm");
Cu.import("resource:///modules/devtools/LayoutHelpers.jsm");
Cu.import("resource:///modules/devtools/VariablesView.jsm");
XPCOMUtils.defineLazyModuleGetter(this,
"Reflect", "resource://gre/modules/reflect.jsm");
/**
* Object defining the debugger controller components.
*/
@ -1002,17 +1005,37 @@ StackFrames.prototype = {
syncWatchExpressions: function SF_syncWatchExpressions() {
let list = DebuggerView.WatchExpressions.getExpressions();
if (list.length) {
// Sanity check all watch expressions before syncing them. To avoid
// having the whole watch expressions array throw because of a single
// faulty expression, simply convert it to a string describing the error.
// There's no other information necessary to be offered in such cases.
let sanitizedExpressions = list.map(function(str) {
// Reflect.parse throws when encounters a syntax error.
try {
Reflect.parse(str);
return str; // Watch expression can be executed safely.
} catch (e) {
return "\"" + e.name + ": " + e.message + "\""; // Syntax error.
}
});
if (sanitizedExpressions.length) {
this.syncedWatchExpressions =
this.currentWatchExpressions = "[" + list.map(function(str)
// Avoid yielding an empty pseudo-array when evaluating `arguments`,
// since they're overridden by the expression's closure scope.
"(function(arguments) {" +
// Make sure all the quotes are escaped in the expression's syntax.
"try { return eval(\"" + str.replace(/"/g, "\\$&") + "\"); }" +
"catch(e) { return e.name + ': ' + e.message; }" +
"})(arguments)"
).join(",") + "]";
this.currentWatchExpressions =
"[" +
sanitizedExpressions.map(function(str)
"eval(\"" +
"try {" +
// Make sure all quotes are escaped in the expression's syntax,
// and add a newline after the statement to avoid comments
// breaking the code integrity inside the eval block.
str.replace(/"/g, "\\$&") + "\" + " + "'\\n'" + " + \"" +
"} catch (e) {" +
"e.name + ': ' + e.message;" + // FIXME: bug 812765, 812764
"}" +
"\")"
).join(",") +
"]";
} else {
this.syncedWatchExpressions =
this.currentWatchExpressions = null;

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

@ -997,7 +997,7 @@ create({ constructor: WatchExpressionsView, proto: MenuContainer.prototype }, {
unsorted: true,
relaxed: true,
attachment: {
expression: "",
currentExpression: "",
initialExpression: aExpression,
id: this._generateId()
}
@ -1046,7 +1046,7 @@ create({ constructor: WatchExpressionsView, proto: MenuContainer.prototype }, {
*/
switchExpression: function DVWE_switchExpression(aVar, aExpression) {
let expressionItem =
[i for (i of this._cache) if (i.attachment.expression == aVar.name)][0];
[i for (i of this._cache) if (i.attachment.currentExpression == aVar.name)][0];
// Remove the watch expression if it's going to be a duplicate.
if (!aExpression || this.getExpressions().indexOf(aExpression) != -1) {
@ -1055,7 +1055,7 @@ create({ constructor: WatchExpressionsView, proto: MenuContainer.prototype }, {
}
// Save the watch expression code string.
expressionItem.attachment.expression = aExpression;
expressionItem.attachment.currentExpression = aExpression;
expressionItem.target.inputNode.value = aExpression;
// Synchronize with the controller's watch expressions store.
@ -1070,7 +1070,7 @@ create({ constructor: WatchExpressionsView, proto: MenuContainer.prototype }, {
*/
deleteExpression: function DVWE_deleteExpression(aVar) {
let expressionItem =
[i for (i of this._cache) if (i.attachment.expression == aVar.name)][0];
[i for (i of this._cache) if (i.attachment.currentExpression == aVar.name)][0];
// Remove the watch expression at its respective index.
this.removeExpressionAt(this._cache.indexOf(expressionItem));
@ -1088,7 +1088,7 @@ create({ constructor: WatchExpressionsView, proto: MenuContainer.prototype }, {
* The watch expression code string.
*/
getExpression: function DVWE_getExpression(aIndex) {
return this._cache[aIndex].attachment.expression;
return this._cache[aIndex].attachment.currentExpression;
},
/**
@ -1098,7 +1098,7 @@ create({ constructor: WatchExpressionsView, proto: MenuContainer.prototype }, {
* The watch expressions code strings.
*/
getExpressions: function DVWE_getExpressions() {
return [item.attachment.expression for (item of this._cache)];
return [item.attachment.currentExpression for (item of this._cache)];
},
/**
@ -1187,7 +1187,7 @@ create({ constructor: WatchExpressionsView, proto: MenuContainer.prototype }, {
*/
_onBlur: function DVWE__onBlur({ target: textbox }) {
let expressionItem = this.getItemForElement(textbox);
let oldExpression = expressionItem.attachment.expression;
let oldExpression = expressionItem.attachment.currentExpression;
let newExpression = textbox.value.trim();
// Remove the watch expression if it's empty.
@ -1201,7 +1201,7 @@ create({ constructor: WatchExpressionsView, proto: MenuContainer.prototype }, {
// Expression is eligible.
else {
// Save the watch expression code string.
expressionItem.attachment.expression = newExpression;
expressionItem.attachment.currentExpression = newExpression;
// Make sure the close button is hidden when the textbox is unfocused.
expressionItem.target.closeNode.hidden = true;
}

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

@ -39,6 +39,15 @@
overflow: hidden;
}
/**
* Watch expressions view
*/
#expressions {
overflow-x: hidden;
overflow-y: auto;
}
/**
* Variables view
*/

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

@ -23,11 +23,8 @@ function test()
gWatch = gDebugger.DebuggerView.WatchExpressions;
gDebugger.DebuggerView.togglePanes({ visible: true, animated: false });
executeSoon(function() {
performTest();
});
});
function performTest()
{
@ -129,9 +126,9 @@ function test()
is(gWatch.getItemForElement(element).attachment.initialExpression, "",
"The initial expression at index " + index + " should be correct (2)");
is(gWatch.getItemAtIndex(index).attachment.expression, string,
is(gWatch.getItemAtIndex(index).attachment.currentExpression, string,
"The expression at index " + index + " should be correct (1)");
is(gWatch.getItemForElement(element).attachment.expression, string,
is(gWatch.getItemForElement(element).attachment.currentExpression, string,
"The expression at index " + index + " should be correct (2)");
is(gWatch.getExpression(index), string,
@ -195,9 +192,9 @@ function test()
is(gWatch.getItemForElement(element).attachment.initialExpression, string,
"The initial expression at index " + index + " should be correct (2)");
is(gWatch.getItemAtIndex(index).attachment.expression, string,
is(gWatch.getItemAtIndex(index).attachment.currentExpression, string,
"The expression at index " + index + " should be correct (1)");
is(gWatch.getItemForElement(element).attachment.expression, string,
is(gWatch.getItemForElement(element).attachment.currentExpression, string,
"The expression at index " + index + " should be correct (2)");
is(gWatch.getExpression(index), string,
@ -230,9 +227,9 @@ function test()
is(gWatch.getItemForElement(element).attachment.initialExpression, string,
"The initial expression at index " + index + " should be correct (2)");
is(gWatch.getItemAtIndex(index).attachment.expression, string,
is(gWatch.getItemAtIndex(index).attachment.currentExpression, string,
"The expression at index " + index + " should be correct (1)");
is(gWatch.getItemForElement(element).attachment.expression, string,
is(gWatch.getItemForElement(element).attachment.currentExpression, string,
"The expression at index " + index + " should be correct (2)");
is(gWatch.getExpression(index), string,

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

@ -37,6 +37,8 @@ function test()
gWatch.addExpression("\"a''\"");
gWatch.addExpression("?");
gWatch.addExpression("a");
gWatch.addExpression("this");
gWatch.addExpression("this.canada");
gWatch.addExpression("[1, 2, 3]");
gWatch.addExpression("x = [1, 2, 3]");
gWatch.addExpression("y = [1, 2, 3]; y.test = 4");
@ -45,14 +47,25 @@ function test()
gWatch.addExpression("arguments[0]");
gWatch.addExpression("encodeURI(\"\\\")");
gWatch.addExpression("decodeURI(\"\\\")");
gWatch.addExpression("decodeURIComponent(\"%\")");
gWatch.addExpression("//");
gWatch.addExpression("// 42");
gWatch.addExpression("{}.foo");
gWatch.addExpression("{}.foo()");
gWatch.addExpression("({}).foo()");
gWatch.addExpression("new Array(-1)");
gWatch.addExpression("4.2.toExponential(-4.2)");
gWatch.addExpression("throw new Error(\"bazinga\")");
gWatch.addExpression("({ get error() { throw new Error(\"bazinga\") } }).error");
gWatch.addExpression("throw { get name() { throw \"bazinga\" } }");
}
function performTest()
{
is(gWatch._container._parent.querySelectorAll(".dbg-expression[hidden=true]").length, 0,
"There should be 0 hidden nodes in the watch expressions container");
is(gWatch._container._parent.querySelectorAll(".dbg-expression:not([hidden=true])").length, 14,
"There should be 14 visible nodes in the watch expressions container");
is(gWatch._container._parent.querySelectorAll(".dbg-expression:not([hidden=true])").length, 27,
"There should be 27 visible nodes in the watch expressions container");
test1(function() {
test2(function() {
@ -79,8 +92,8 @@ function test()
{
is(gWatch._container._parent.querySelectorAll(".dbg-expression[hidden=true]").length, 0,
"There should be 0 hidden nodes in the watch expressions container");
is(gWatch._container._parent.querySelectorAll(".dbg-expression:not([hidden=true])").length, 13,
"There should be 13 visible nodes in the watch expressions container");
is(gWatch._container._parent.querySelectorAll(".dbg-expression:not([hidden=true])").length, 27,
"There should be 27 visible nodes in the watch expressions container");
closeDebuggerAndFinish();
}
@ -88,18 +101,26 @@ function test()
function test1(callback) {
waitForWatchExpressions(function() {
info("Performing test1");
checkWatchExpressions("ReferenceError: a is not defined", undefined);
checkWatchExpressions("ReferenceError: a is not defined",
{ type: "object", class: "Object" },
{ type: "object", class: "String" },
undefined,
26);
callback();
});
executeSoon(function() {
gDebuggee.ermahgerd(); // ermahgerd!!
gDebuggee.test(); // ermahgerd!!
});
}
function test2(callback) {
waitForWatchExpressions(function() {
info("Performing test2");
checkWatchExpressions(undefined, "sensational");
checkWatchExpressions(undefined,
{ type: "object", class: "Proxy" },
undefined,
"sensational",
26);
callback();
});
EventUtils.sendMouseEvent({ type: "mousedown" },
@ -110,7 +131,11 @@ function test()
function test3(callback) {
waitForWatchExpressions(function() {
info("Performing test3");
checkWatchExpressions({ type: "object", class: "Object" }, "sensational");
checkWatchExpressions({ type: "object", class: "Object" },
{ type: "object", class: "Proxy" },
undefined,
"sensational",
26);
callback();
});
EventUtils.sendMouseEvent({ type: "mousedown" },
@ -121,7 +146,11 @@ function test()
function test4(callback) {
waitForWatchExpressions(function() {
info("Performing test4");
checkWatchExpressions(5, "sensational", 13);
checkWatchExpressions(5,
{ type: "object", class: "Proxy" },
undefined,
"sensational",
27);
callback();
});
executeSoon(function() {
@ -133,7 +162,11 @@ function test()
function test5(callback) {
waitForWatchExpressions(function() {
info("Performing test5");
checkWatchExpressions(5, "sensational", 13);
checkWatchExpressions(5,
{ type: "object", class: "Proxy" },
undefined,
"sensational",
27);
callback();
});
executeSoon(function() {
@ -145,7 +178,11 @@ function test()
function test6(callback) {
waitForWatchExpressions(function() {
info("Performing test6");
checkWatchExpressions(5, "sensational", 13);
checkWatchExpressions(5,
{ type: "object", class: "Proxy" },
undefined,
"sensational",
27);
callback();
})
executeSoon(function() {
@ -157,7 +194,11 @@ function test()
function test7(callback) {
waitForWatchExpressions(function() {
info("Performing test7");
checkWatchExpressions(5, "sensational", 13);
checkWatchExpressions(5,
{ type: "object", class: "Proxy" },
undefined,
"sensational",
27);
callback();
});
executeSoon(function() {
@ -169,7 +210,11 @@ function test()
function test8(callback) {
waitForWatchExpressions(function() {
info("Performing test8");
checkWatchExpressions(5, "sensational", 13);
checkWatchExpressions(5,
{ type: "object", class: "Proxy" },
undefined,
"sensational",
27);
callback();
});
executeSoon(function() {
@ -202,7 +247,12 @@ function test()
}, false);
}
function checkWatchExpressions(expected_a, expected_arguments, total = 12) {
function checkWatchExpressions(expected_a,
expected_this,
expected_prop,
expected_arguments,
total)
{
is(gWatch._container._parent.querySelectorAll(".dbg-expression[hidden=true]").length, total,
"There should be " + total + " hidden nodes in the watch expressions container");
is(gWatch._container._parent.querySelectorAll(".dbg-expression:not([hidden=true])").length, 0,
@ -220,13 +270,27 @@ function test()
let w4 = scope.get("\"a''\"");
let w5 = scope.get("?");
let w6 = scope.get("a");
let w7 = scope.get("x = [1, 2, 3]");
let w8 = scope.get("y = [1, 2, 3]; y.test = 4");
let w9 = scope.get("z = [1, 2, 3]; z.test = 4; z");
let w10 = scope.get("t = [1, 2, 3]; t.test = 4; !t");
let w11 = scope.get("arguments[0]");
let w12 = scope.get("encodeURI(\"\\\")");
let w13 = scope.get("decodeURI(\"\\\")");
let w7 = scope.get("this");
let w8 = scope.get("this.canada");
let w9 = scope.get("[1, 2, 3]");
let w10 = scope.get("x = [1, 2, 3]");
let w11 = scope.get("y = [1, 2, 3]; y.test = 4");
let w12 = scope.get("z = [1, 2, 3]; z.test = 4; z");
let w13 = scope.get("t = [1, 2, 3]; t.test = 4; !t");
let w14 = scope.get("arguments[0]");
let w15 = scope.get("encodeURI(\"\\\")");
let w16 = scope.get("decodeURI(\"\\\")");
let w17 = scope.get("decodeURIComponent(\"%\")");
let w18 = scope.get("//");
let w19 = scope.get("// 42");
let w20 = scope.get("{}.foo");
let w21 = scope.get("{}.foo()");
let w22 = scope.get("({}).foo()");
let w23 = scope.get("new Array(-1)");
let w24 = scope.get("4.2.toExponential(-4.2)");
let w25 = scope.get("throw new Error(\"bazinga\")");
let w26 = scope.get("({ get error() { throw new Error(\"bazinga\") } }).error");
let w27 = scope.get("throw { get name() { throw \"bazinga\" } }");
ok(w1, "The first watch expression should be present in the scope");
ok(w2, "The second watch expression should be present in the scope");
@ -239,8 +303,22 @@ function test()
ok(w9, "The ninth watch expression should be present in the scope");
ok(w10, "The tenth watch expression should be present in the scope");
ok(w11, "The eleventh watch expression should be present in the scope");
ok(!w12, "The twelveth watch expression should not be present in the scope");
ok(!w13, "The thirteenth watch expression should not be present in the scope");
ok(w12, "The twelfth watch expression should be present in the scope");
ok(w13, "The 13th watch expression should be present in the scope");
ok(w14, "The 14th watch expression should be present in the scope");
ok(w15, "The 15th watch expression should be present in the scope");
ok(w16, "The 16th watch expression should be present in the scope");
ok(w17, "The 17th watch expression should be present in the scope");
ok(w18, "The 18th watch expression should be present in the scope");
ok(w19, "The 19th watch expression should be present in the scope");
ok(w20, "The 20th watch expression should be present in the scope");
ok(w21, "The 21st watch expression should be present in the scope");
ok(w22, "The 22nd watch expression should be present in the scope");
ok(w23, "The 23nd watch expression should be present in the scope");
ok(w24, "The 24th watch expression should be present in the scope");
ok(w25, "The 25th watch expression should be present in the scope");
ok(w26, "The 26th watch expression should be present in the scope");
ok(!w27, "The 27th watch expression should not be present in the scope");
is(w1.value, "a", "The first value is correct");
is(w2.value, "a", "The second value is correct");
@ -255,13 +333,42 @@ function test()
is(w6.value, expected_a, "The sixth value is correct");
}
is(w7.value.type, "object", "The seventh value type is correct");
is(w7.value.class, "Array", "The seventh value class is correct");
is(w8.value, "4", "The eight value is correct");
if (typeof expected_this == "object") {
is(w7.value.type, expected_this.type, "The seventh value type is correct");
is(w7.value.class, expected_this.class, "The seventh value class is correct");
} else {
is(w7.value, expected_this, "The seventh value is correct");
}
if (typeof expected_prop == "object") {
is(w8.value.type, expected_prop.type, "The eighth value type is correct");
is(w8.value.class, expected_prop.class, "The eighth value class is correct");
} else {
is(w8.value, expected_prop, "The eighth value is correct");
}
is(w9.value.type, "object", "The ninth value type is correct");
is(w9.value.class, "Array", "The ninth value class is correct");
is(w10.value, false, "The tenth value is correct");
is(w11.value, expected_arguments, "The eleventh value is correct");
is(w10.value.type, "object", "The tenth value type is correct");
is(w10.value.class, "Array", "The tenth value class is correct");
is(w11.value, "4", "The eleventh value is correct");
is(w12.value.type, "object", "The eleventh value type is correct");
is(w12.value.class, "Array", "The twelfth value class is correct");
is(w13.value, false, "The 13th value is correct");
is(w14.value, expected_arguments, "The 14th value is correct");
is(w15.value, "SyntaxError: unterminated string literal", "The 15th value is correct");
is(w16.value, "SyntaxError: unterminated string literal", "The 16th value is correct");
is(w17.value, "URIError: malformed URI sequence", "The 17th value is correct");
is(w18.value, undefined, "The 18th value is correct");
is(w19.value, undefined, "The 19th value is correct");
is(w20.value, "SyntaxError: syntax error", "The 20th value is correct");
is(w21.value, "SyntaxError: syntax error", "The 21th value is correct");
is(w22.value, "TypeError: (intermediate value).foo is not a function", "The 22th value is correct");
is(w23.value, "RangeError: invalid array length", "The 23th value is correct");
is(w24.value, "RangeError: precision -4 out of range", "The 24st value is correct");
is(w25.value, "Error: bazinga", "The 25nd value is correct");
is(w26.value, "Error: bazinga", "The 26rd value is correct");
}
registerCleanupFunction(function() {

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

@ -340,23 +340,23 @@ function test1(scope) {
is(gWatch._cache[0].target.inputNode.value, "document.title = 43",
"The first textbox input value is not the correct one");
is(gWatch._cache[0].attachment.expression, "document.title = 43",
is(gWatch._cache[0].attachment.currentExpression, "document.title = 43",
"The first textbox input value is not the correct one");
is(gWatch._cache[1].target.inputNode.value, "document.title",
"The second textbox input value is not the correct one");
is(gWatch._cache[1].attachment.expression, "document.title",
is(gWatch._cache[1].attachment.currentExpression, "document.title",
"The second textbox input value is not the correct one");
is(gWatch._cache[2].target.inputNode.value, "aArg",
"The third textbox input value is not the correct one");
is(gWatch._cache[2].attachment.expression, "aArg",
is(gWatch._cache[2].attachment.currentExpression, "aArg",
"The third textbox input value is not the correct one");
is(gWatch._cache[3].target.inputNode.value, "ermahgerd",
"The fourth textbox input value is not the correct one");
is(gWatch._cache[3].attachment.expression, "ermahgerd",
is(gWatch._cache[3].attachment.currentExpression, "ermahgerd",
"The fourth textbox input value is not the correct one");
is(gWatch._cache[4].target.inputNode.value, "this",
"The fifth textbox input value is not the correct one");
is(gWatch._cache[4].attachment.expression, "this",
is(gWatch._cache[4].attachment.currentExpression, "this",
"The fifth textbox input value is not the correct one");
}
@ -371,23 +371,23 @@ function test2(scope) {
is(gWatch._cache[0].target.inputNode.value, "document.title = 43",
"The first textbox input value is not the correct one");
is(gWatch._cache[0].attachment.expression, "document.title = 43",
is(gWatch._cache[0].attachment.currentExpression, "document.title = 43",
"The first textbox input value is not the correct one");
is(gWatch._cache[1].target.inputNode.value, "document.title",
"The second textbox input value is not the correct one");
is(gWatch._cache[1].attachment.expression, "document.title",
is(gWatch._cache[1].attachment.currentExpression, "document.title",
"The second textbox input value is not the correct one");
is(gWatch._cache[2].target.inputNode.value, "aArg = 44",
"The third textbox input value is not the correct one");
is(gWatch._cache[2].attachment.expression, "aArg = 44",
is(gWatch._cache[2].attachment.currentExpression, "aArg = 44",
"The third textbox input value is not the correct one");
is(gWatch._cache[3].target.inputNode.value, "ermahgerd",
"The fourth textbox input value is not the correct one");
is(gWatch._cache[3].attachment.expression, "ermahgerd",
is(gWatch._cache[3].attachment.currentExpression, "ermahgerd",
"The fourth textbox input value is not the correct one");
is(gWatch._cache[4].target.inputNode.value, "this",
"The fifth textbox input value is not the correct one");
is(gWatch._cache[4].attachment.expression, "this",
is(gWatch._cache[4].attachment.currentExpression, "this",
"The fifth textbox input value is not the correct one");
}
@ -402,19 +402,19 @@ function test3(scope) {
is(gWatch._cache[0].target.inputNode.value, "document.title = 43",
"The first textbox input value is not the correct one");
is(gWatch._cache[0].attachment.expression, "document.title = 43",
is(gWatch._cache[0].attachment.currentExpression, "document.title = 43",
"The first textbox input value is not the correct one");
is(gWatch._cache[1].target.inputNode.value, "document.title",
"The second textbox input value is not the correct one");
is(gWatch._cache[1].attachment.expression, "document.title",
is(gWatch._cache[1].attachment.currentExpression, "document.title",
"The second textbox input value is not the correct one");
is(gWatch._cache[2].target.inputNode.value, "ermahgerd",
"The third textbox input value is not the correct one");
is(gWatch._cache[2].attachment.expression, "ermahgerd",
is(gWatch._cache[2].attachment.currentExpression, "ermahgerd",
"The third textbox input value is not the correct one");
is(gWatch._cache[3].target.inputNode.value, "this",
"The fourth textbox input value is not the correct one");
is(gWatch._cache[3].attachment.expression, "this",
is(gWatch._cache[3].attachment.currentExpression, "this",
"The fourth textbox input value is not the correct one");
}
@ -429,15 +429,15 @@ function test4(scope) {
is(gWatch._cache[0].target.inputNode.value, "document.title",
"The first textbox input value is not the correct one");
is(gWatch._cache[0].attachment.expression, "document.title",
is(gWatch._cache[0].attachment.currentExpression, "document.title",
"The first textbox input value is not the correct one");
is(gWatch._cache[1].target.inputNode.value, "ermahgerd",
"The second textbox input value is not the correct one");
is(gWatch._cache[1].attachment.expression, "ermahgerd",
is(gWatch._cache[1].attachment.currentExpression, "ermahgerd",
"The second textbox input value is not the correct one");
is(gWatch._cache[2].target.inputNode.value, "this",
"The third textbox input value is not the correct one");
is(gWatch._cache[2].attachment.expression, "this",
is(gWatch._cache[2].attachment.currentExpression, "this",
"The third textbox input value is not the correct one");
}
@ -452,11 +452,11 @@ function test5(scope) {
is(gWatch._cache[0].target.inputNode.value, "ermahgerd",
"The second textbox input value is not the correct one");
is(gWatch._cache[0].attachment.expression, "ermahgerd",
is(gWatch._cache[0].attachment.currentExpression, "ermahgerd",
"The second textbox input value is not the correct one");
is(gWatch._cache[1].target.inputNode.value, "this",
"The third textbox input value is not the correct one");
is(gWatch._cache[1].attachment.expression, "this",
is(gWatch._cache[1].attachment.currentExpression, "this",
"The third textbox input value is not the correct one");
}
@ -471,7 +471,7 @@ function test6(scope) {
is(gWatch._cache[0].target.inputNode.value, "ermahgerd",
"The third textbox input value is not the correct one");
is(gWatch._cache[0].attachment.expression, "ermahgerd",
is(gWatch._cache[0].attachment.currentExpression, "ermahgerd",
"The third textbox input value is not the correct one");
}

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

@ -6,6 +6,9 @@
<!-- Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ -->
<script type="text/javascript">
function test() {
ermahgerd.call({ canada: new String("eh") });
}
function ermahgerd(aArg) {
var t = document.title;
debugger;
@ -17,6 +20,7 @@
}("sensational"));
}
</script>
</head>
<body>
</body>

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

@ -259,6 +259,7 @@
#expressions {
background-color: white;
min-height: 10px;
max-height: 125px;
}
.dbg-expression {

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

@ -261,6 +261,7 @@
#expressions {
background-color: white;
min-height: 10px;
max-height: 125px;
}
.dbg-expression {

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

@ -267,6 +267,7 @@
#expressions {
background-color: white;
min-height: 10px;
max-height: 125px;
}
.dbg-expression {