mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 01:57:00 +00:00
Merge fx-team to inbound.
This commit is contained in:
commit
cf9fba3a22
@ -87,7 +87,7 @@ function testWithFrame()
|
||||
is(innerNodes[0].querySelector(".name").getAttribute("value"), "<exception>",
|
||||
"Should have the right property name for the exception.");
|
||||
|
||||
is(innerNodes[0].querySelector(".value").getAttribute("value"), "[object Error]",
|
||||
is(innerNodes[0].querySelector(".value").getAttribute("value"), "Error",
|
||||
"Should have the right property value for the exception.");
|
||||
|
||||
// Disable pause on exceptions.
|
||||
|
@ -42,7 +42,7 @@ function testSimpleCall() {
|
||||
is(testVar.target.querySelector(".variables-view-element-details").childNodes.length, 0,
|
||||
"Adding type and class properties shouldn't add any new tree nodes.");
|
||||
|
||||
is(testVar.target.querySelector(".value").getAttribute("value"), "[object Window]",
|
||||
is(testVar.target.querySelector(".value").getAttribute("value"), "Window",
|
||||
"The information for the variable wasn't set correctly.");
|
||||
|
||||
|
||||
|
@ -128,9 +128,9 @@ function testSimpleCall() {
|
||||
is(localVar5.get("someProp5").target.querySelector(".variables-view-element-details").childNodes.length, 8,
|
||||
"The localVar5.someProp5 doesn't contain all the created properties.");
|
||||
|
||||
is(windowVar.target.querySelector(".value").getAttribute("value"), "[object Window]",
|
||||
is(windowVar.target.querySelector(".value").getAttribute("value"), "Window",
|
||||
"The grip information for the windowVar wasn't set correctly.");
|
||||
is(documentVar.target.querySelector(".value").getAttribute("value"), "[object HTMLDocument]",
|
||||
is(documentVar.target.querySelector(".value").getAttribute("value"), "HTMLDocument",
|
||||
"The grip information for the documentVar wasn't set correctly.");
|
||||
|
||||
is(localVar0.target.querySelector(".value").getAttribute("value"), "42",
|
||||
@ -143,7 +143,7 @@ function testSimpleCall() {
|
||||
"The grip information for the localVar3 wasn't set correctly.");
|
||||
is(localVar4.target.querySelector(".value").getAttribute("value"), "null",
|
||||
"The grip information for the localVar4 wasn't set correctly.");
|
||||
is(localVar5.target.querySelector(".value").getAttribute("value"), "[object Object]",
|
||||
is(localVar5.target.querySelector(".value").getAttribute("value"), "Object",
|
||||
"The grip information for the localVar5 wasn't set correctly.");
|
||||
|
||||
is(localVar5.get("someProp0").target.querySelector(".value").getAttribute("value"), "42",
|
||||
@ -156,7 +156,7 @@ function testSimpleCall() {
|
||||
"The grip information for the localVar3 wasn't set correctly.");
|
||||
is(localVar5.get("someProp4").target.querySelector(".value").getAttribute("value"), "null",
|
||||
"The grip information for the localVar4 wasn't set correctly.");
|
||||
is(localVar5.get("someProp5").target.querySelector(".value").getAttribute("value"), "[object Object]",
|
||||
is(localVar5.get("someProp5").target.querySelector(".value").getAttribute("value"), "Object",
|
||||
"The grip information for the localVar5 wasn't set correctly.");
|
||||
is(localVar5.get("someUndefined").target.querySelector(".value").getAttribute("value"), "undefined",
|
||||
"The grip information for the someUndefined wasn't set correctly.");
|
||||
@ -173,7 +173,7 @@ function testSimpleCall() {
|
||||
"The grip information for the sub-localVar3 wasn't set correctly.");
|
||||
is(localVar5.get("someProp5").get("someProp4").target.querySelector(".value").getAttribute("value"), "null",
|
||||
"The grip information for the sub-localVar4 wasn't set correctly.");
|
||||
is(localVar5.get("someProp5").get("someProp5").target.querySelector(".value").getAttribute("value"), "[object Object]",
|
||||
is(localVar5.get("someProp5").get("someProp5").target.querySelector(".value").getAttribute("value"), "Object",
|
||||
"The grip information for the sub-localVar5 wasn't set correctly.");
|
||||
is(localVar5.get("someProp5").get("someUndefined").target.querySelector(".value").getAttribute("value"), "undefined",
|
||||
"The grip information for the sub-someUndefined wasn't set correctly.");
|
||||
|
@ -42,10 +42,10 @@ function testFrameParameters()
|
||||
is(localNodes.length, 12,
|
||||
"The localScope should contain all the created variable elements.");
|
||||
|
||||
is(localNodes[0].querySelector(".value").getAttribute("value"), "[object Window]",
|
||||
is(localNodes[0].querySelector(".value").getAttribute("value"), "Window",
|
||||
"Should have the right property value for 'this'.");
|
||||
|
||||
is(localNodes[1].querySelector(".value").getAttribute("value"), "[object Object]",
|
||||
is(localNodes[1].querySelector(".value").getAttribute("value"), "Object",
|
||||
"Should have the right property value for 'aArg'.");
|
||||
|
||||
is(localNodes[2].querySelector(".value").getAttribute("value"), '"beta"',
|
||||
@ -66,13 +66,13 @@ function testFrameParameters()
|
||||
is(localNodes[7].querySelector(".value").getAttribute("value"), "1",
|
||||
"Should have the right property value for 'a'.");
|
||||
|
||||
is(localNodes[8].querySelector(".value").getAttribute("value"), "[object Arguments]",
|
||||
is(localNodes[8].querySelector(".value").getAttribute("value"), "Arguments",
|
||||
"Should have the right property value for 'arguments'.");
|
||||
|
||||
is(localNodes[9].querySelector(".value").getAttribute("value"), "[object Object]",
|
||||
is(localNodes[9].querySelector(".value").getAttribute("value"), "Object",
|
||||
"Should have the right property value for 'b'.");
|
||||
|
||||
is(localNodes[10].querySelector(".value").getAttribute("value"), "[object Object]",
|
||||
is(localNodes[10].querySelector(".value").getAttribute("value"), "Object",
|
||||
"Should have the right property value for 'c'.");
|
||||
|
||||
resumeAndFinish();
|
||||
|
@ -43,11 +43,11 @@ function testFrameParameters()
|
||||
is(localNodes.length + localNonEnums.length, 12,
|
||||
"The localScope and localNonEnums should contain all the created variable elements.");
|
||||
|
||||
is(localNodes[0].querySelector(".value").getAttribute("value"), "[object Window]",
|
||||
is(localNodes[0].querySelector(".value").getAttribute("value"), "Window",
|
||||
"Should have the right property value for 'this'.");
|
||||
is(localNodes[8].querySelector(".value").getAttribute("value"), "[object Arguments]",
|
||||
is(localNodes[8].querySelector(".value").getAttribute("value"), "Arguments",
|
||||
"Should have the right property value for 'arguments'.");
|
||||
is(localNodes[10].querySelector(".value").getAttribute("value"), "[object Object]",
|
||||
is(localNodes[10].querySelector(".value").getAttribute("value"), "Object",
|
||||
"Should have the right property value for 'c'.");
|
||||
|
||||
|
||||
@ -117,45 +117,45 @@ function testFrameParameters()
|
||||
window.clearInterval(intervalID);
|
||||
|
||||
is(thisNode.target.querySelector(".value")
|
||||
.getAttribute("value"), "[object Window]",
|
||||
.getAttribute("value"), "Window",
|
||||
"Should have the right property value for 'this'.");
|
||||
|
||||
is(thisNode.get("window").target.querySelector(".name")
|
||||
.getAttribute("value"), "window",
|
||||
"Should have the right property name for 'window'.");
|
||||
ok(thisNode.get("window").target.querySelector(".value")
|
||||
.getAttribute("value").search(/object/) != -1,
|
||||
is(thisNode.get("window").target.querySelector(".value")
|
||||
.getAttribute("value"), "Window",
|
||||
"'window' should be an object.");
|
||||
|
||||
is(thisNode.get("document").target.querySelector(".name")
|
||||
.getAttribute("value"), "document",
|
||||
"Should have the right property name for 'document'.");
|
||||
ok(thisNode.get("document").target.querySelector(".value")
|
||||
.getAttribute("value").search(/object/) != -1,
|
||||
is(thisNode.get("document").target.querySelector(".value")
|
||||
.getAttribute("value"), "HTMLDocument",
|
||||
"'document' should be an object.");
|
||||
|
||||
|
||||
is(argumentsNode.target.querySelector(".value")
|
||||
.getAttribute("value"), "[object Arguments]",
|
||||
.getAttribute("value"), "Arguments",
|
||||
"Should have the right property value for 'arguments'.");
|
||||
|
||||
is(argumentsNode.target.querySelectorAll(".variables-view-property > .title > .name")[0]
|
||||
.getAttribute("value"), "0",
|
||||
"Should have the right property name for 'arguments[0]'.");
|
||||
ok(argumentsNode.target.querySelectorAll(".variables-view-property > .title > .value")[0]
|
||||
.getAttribute("value").search(/object/) != -1,
|
||||
is(argumentsNode.target.querySelectorAll(".variables-view-property > .title > .value")[0]
|
||||
.getAttribute("value"), "Object",
|
||||
"'arguments[0]' should be an object.");
|
||||
|
||||
is(argumentsNode.target.querySelectorAll(".variables-view-property > .title > .name")[7]
|
||||
.getAttribute("value"), "__proto__",
|
||||
"Should have the right property name for '__proto__'.");
|
||||
ok(argumentsNode.target.querySelectorAll(".variables-view-property > .title > .value")[7]
|
||||
.getAttribute("value").search(/object/) != -1,
|
||||
is(argumentsNode.target.querySelectorAll(".variables-view-property > .title > .value")[7]
|
||||
.getAttribute("value"), "Object",
|
||||
"'__proto__' should be an object.");
|
||||
|
||||
|
||||
is(cNode.target.querySelector(".value")
|
||||
.getAttribute("value"), "[object Object]",
|
||||
.getAttribute("value"), "Object",
|
||||
"Should have the right property value for 'c'.");
|
||||
|
||||
is(cNode.target.querySelectorAll(".variables-view-property > .title > .name")[0]
|
||||
|
@ -53,7 +53,7 @@ function testFrameParameters()
|
||||
is(globalNodes[1].querySelector(".name").getAttribute("value"), "SpecialPowers",
|
||||
"Should have the right property name for |SpecialPowers|.");
|
||||
|
||||
is(globalNodes[1].querySelector(".value").getAttribute("value"), "[object Object]",
|
||||
is(globalNodes[1].querySelector(".value").getAttribute("value"), "Object",
|
||||
"Should have the right property value for |SpecialPowers|.");
|
||||
|
||||
let globalScopeObject = gDebugger.DebuggerView.Variables.getScopeForNode(globalScope);
|
||||
@ -62,14 +62,14 @@ function testFrameParameters()
|
||||
is(documentNode.target.querySelector(".name").getAttribute("value"), "document",
|
||||
"Should have the right property name for |document|.");
|
||||
|
||||
is(documentNode.target.querySelector(".value").getAttribute("value"), "[object HTMLDocument]",
|
||||
is(documentNode.target.querySelector(".value").getAttribute("value"), "HTMLDocument",
|
||||
"Should have the right property value for |document|.");
|
||||
|
||||
let len = globalNodes.length - 1;
|
||||
is(globalNodes[len].querySelector(".name").getAttribute("value"), "window",
|
||||
"Should have the right property name for |window|.");
|
||||
|
||||
is(globalNodes[len].querySelector(".value").getAttribute("value"), "[object Window]",
|
||||
is(globalNodes[len].querySelector(".value").getAttribute("value"), "Window",
|
||||
"Should have the right property value for |window|.");
|
||||
|
||||
resumeAndFinish();
|
||||
|
@ -67,14 +67,14 @@ function testWithFrame()
|
||||
is(documentNode.target.querySelector(".name").getAttribute("value"), "document",
|
||||
"Should have the right property name for |document|.");
|
||||
|
||||
is(documentNode.target.querySelector(".value").getAttribute("value"), "[object HTMLDocument]",
|
||||
is(documentNode.target.querySelector(".value").getAttribute("value"), "HTMLDocument",
|
||||
"Should have the right property value for |document|.");
|
||||
|
||||
let len = globalNodes.length - 1;
|
||||
is(globalNodes[len].querySelector(".name").getAttribute("value"), "window",
|
||||
"Should have the right property name for |window|.");
|
||||
|
||||
is(globalNodes[len].querySelector(".value").getAttribute("value"), "[object Window]",
|
||||
is(globalNodes[len].querySelector(".value").getAttribute("value"), "Window",
|
||||
"Should have the right property value for |window|.");
|
||||
|
||||
resumeAndFinish();
|
||||
|
@ -52,13 +52,13 @@ function testFrameParameters()
|
||||
is(anonymousNodes[1].querySelector(".name").getAttribute("value"), "button",
|
||||
"Should have the right property name for |button|.");
|
||||
|
||||
is(anonymousNodes[1].querySelector(".value").getAttribute("value"), "[object HTMLButtonElement]",
|
||||
is(anonymousNodes[1].querySelector(".value").getAttribute("value"), "HTMLButtonElement",
|
||||
"Should have the right property value for |button|.");
|
||||
|
||||
is(anonymousNodes[2].querySelector(".name").getAttribute("value"), "buttonAsProto",
|
||||
"Should have the right property name for |buttonAsProto|.");
|
||||
|
||||
is(anonymousNodes[2].querySelector(".value").getAttribute("value"), "[object Object]",
|
||||
is(anonymousNodes[2].querySelector(".value").getAttribute("value"), "Object",
|
||||
"Should have the right property value for |buttonAsProto|.");
|
||||
|
||||
let globalScopeObject = gVars.getScopeForNode(globalScope);
|
||||
@ -67,7 +67,7 @@ function testFrameParameters()
|
||||
is(documentNode.target.querySelector(".name").getAttribute("value"), "document",
|
||||
"Should have the right property name for |document|.");
|
||||
|
||||
is(documentNode.target.querySelector(".value").getAttribute("value"), "[object HTMLDocument]",
|
||||
is(documentNode.target.querySelector(".value").getAttribute("value"), "HTMLDocument",
|
||||
"Should have the right property value for |document|.");
|
||||
|
||||
let buttonNode = gVars.getItemForNode(anonymousNodes[1]);
|
||||
@ -116,21 +116,21 @@ function testFrameParameters()
|
||||
.getAttribute("value"), "__proto__",
|
||||
"Should have the right property name for '__proto__' in buttonNode.");
|
||||
ok(buttonNode.get("__proto__").target.querySelector(".value")
|
||||
.getAttribute("value").search(/object/) != -1,
|
||||
.getAttribute("value"), "HTMLButtonElement",
|
||||
"'__proto__' in buttonNode should be an object.");
|
||||
|
||||
is(buttonAsProtoNode.get("__proto__").target.querySelector(".name")
|
||||
.getAttribute("value"), "__proto__",
|
||||
"Should have the right property name for '__proto__' in buttonAsProtoNode.");
|
||||
ok(buttonAsProtoNode.get("__proto__").target.querySelector(".value")
|
||||
.getAttribute("value").search(/object/) != -1,
|
||||
.getAttribute("value"), "HTMLButtonElement",
|
||||
"'__proto__' in buttonAsProtoNode should be an object.");
|
||||
|
||||
is(documentNode.get("__proto__").target.querySelector(".name")
|
||||
.getAttribute("value"), "__proto__",
|
||||
"Should have the right property name for '__proto__' in documentNode.");
|
||||
ok(documentNode.get("__proto__").target.querySelector(".value")
|
||||
.getAttribute("value").search(/object/) != -1,
|
||||
.getAttribute("value"), "HTMLDocument",
|
||||
"'__proto__' in documentNode should be an object.");
|
||||
|
||||
// Now the main course: make sure that the native getters for WebIDL
|
||||
|
@ -52,13 +52,13 @@ function testWithFrame()
|
||||
is(innerNodes[3].querySelector(".name").getAttribute("value"), "buffer",
|
||||
"Should have the right property name for |buffer|.");
|
||||
|
||||
is(innerNodes[3].querySelector(".value").getAttribute("value"), "[object ArrayBuffer]",
|
||||
is(innerNodes[3].querySelector(".value").getAttribute("value"), "ArrayBuffer",
|
||||
"Should have the right property value for |buffer|.");
|
||||
|
||||
is(innerNodes[4].querySelector(".name").getAttribute("value"), "z",
|
||||
"Should have the right property name for |z|.");
|
||||
|
||||
is(innerNodes[4].querySelector(".value").getAttribute("value"), "[object Int8Array]",
|
||||
is(innerNodes[4].querySelector(".value").getAttribute("value"), "Int8Array",
|
||||
"Should have the right property value for |z|.");
|
||||
|
||||
|
||||
|
@ -53,8 +53,8 @@ function testFrameEval() {
|
||||
testModification(aVar, function(aVar) {
|
||||
resumeAndFinish();
|
||||
}, "document.title", '"Debugger Function Call Parameter Test"');
|
||||
}, "b", "[object Object]");
|
||||
}, "{ a: 1 }", "[object Object]");
|
||||
}, "b", "Object");
|
||||
}, "{ a: 1 }", "Object");
|
||||
}}, 0);
|
||||
}, false);
|
||||
|
||||
|
@ -265,7 +265,8 @@
|
||||
</vbox>
|
||||
</vbox>
|
||||
<tabbox id="event-details-pane"
|
||||
class="devtools-sidebar-tabs">
|
||||
class="devtools-sidebar-tabs"
|
||||
handleCtrlTab="false">
|
||||
<tabs>
|
||||
<tab label="&netmonitorUI.tab.headers;"/>
|
||||
<tab label="&netmonitorUI.tab.cookies;"/>
|
||||
|
@ -178,7 +178,7 @@ function test() {
|
||||
is(jsonScope.querySelectorAll(".variables-view-property .name")[1].getAttribute("value"),
|
||||
"__proto__", "The second json property name was incorrect.");
|
||||
is(jsonScope.querySelectorAll(".variables-view-property .value")[1].getAttribute("value"),
|
||||
"[object Object]", "The second json property value was incorrect.");
|
||||
"Object", "The second json property value was incorrect.");
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ function test() {
|
||||
is(jsonScope.querySelectorAll(names)[0].getAttribute("value"),
|
||||
"0", "The first json property name was incorrect.");
|
||||
is(jsonScope.querySelectorAll(values)[0].getAttribute("value"),
|
||||
"[object Object]", "The first json property value was incorrect.");
|
||||
"Object", "The first json property value was incorrect.");
|
||||
|
||||
is(jsonScope.querySelectorAll(names)[1].getAttribute("value"),
|
||||
"greeting", "The second json property name was incorrect.");
|
||||
@ -87,7 +87,7 @@ function test() {
|
||||
is(Array.slice(jsonScope.querySelectorAll(names), -1).shift().getAttribute("value"),
|
||||
"__proto__", "The last json property name was incorrect.");
|
||||
is(Array.slice(jsonScope.querySelectorAll(values), -1).shift().getAttribute("value"),
|
||||
"[object Object]", "The last json property value was incorrect.");
|
||||
"Object", "The last json property value was incorrect.");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -74,7 +74,7 @@ function test() {
|
||||
is(jsonScope.querySelectorAll(".variables-view-property .name")[1].getAttribute("value"),
|
||||
"__proto__", "The second json property name was incorrect.");
|
||||
is(jsonScope.querySelectorAll(".variables-view-property .value")[1].getAttribute("value"),
|
||||
"[object Object]", "The second json property value was incorrect.");
|
||||
"Object", "The second json property value was incorrect.");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -2247,7 +2247,7 @@ Variable.prototype = Heritage.extend(Scope.prototype, {
|
||||
this._valueLabel.classList.remove(VariablesView.getClass(prevGrip));
|
||||
}
|
||||
this._valueGrip = aGrip;
|
||||
this._valueString = VariablesView.getString(aGrip);
|
||||
this._valueString = VariablesView.getString(aGrip, true);
|
||||
this._valueClassName = VariablesView.getClass(aGrip);
|
||||
|
||||
this._valueLabel.classList.add(this._valueClassName);
|
||||
|
@ -123,11 +123,13 @@ const DEFAULT_KEYBINDINGS = [
|
||||
action: "Move to Bracket Opening",
|
||||
code: Ci.nsIDOMKeyEvent.DOM_VK_OPEN_BRACKET,
|
||||
accel: true,
|
||||
shift: true,
|
||||
},
|
||||
{
|
||||
action: "Move to Bracket Closing",
|
||||
code: Ci.nsIDOMKeyEvent.DOM_VK_CLOSE_BRACKET,
|
||||
accel: true,
|
||||
shift: true,
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -53,33 +53,33 @@ function test() {
|
||||
|
||||
// Setting caret at Line 1 bracket start.
|
||||
editor.setCaretOffset(19);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 220,
|
||||
"JS : Jump to closing bracket of the code block when caret at block start");
|
||||
|
||||
EventUtils.synthesizeKey("[", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 20,
|
||||
"JS : Jump to opening bracket of the code block when caret at block end");
|
||||
|
||||
// Setting caret at Line 10 start.
|
||||
editor.setCaretOffset(161);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 20,
|
||||
"JS : Jump to opening bracket of code block when inside the function");
|
||||
|
||||
editor.setCaretOffset(161);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 220,
|
||||
"JS : Jump to closing bracket of code block when inside the function");
|
||||
|
||||
// Setting caret at Line 6 start.
|
||||
editor.setCaretOffset(67);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 159,
|
||||
"JS : Jump to closing bracket in a nested function with caret inside");
|
||||
|
||||
editor.setCaretOffset(67);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 62,
|
||||
"JS : Jump to opening bracket in a nested function with caret inside");
|
||||
|
||||
@ -93,22 +93,22 @@ function test() {
|
||||
|
||||
// Setting caret at Line 1 bracket start.
|
||||
editor.setCaretOffset(8);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 45,
|
||||
"CSS : Jump to closing bracket of the code block when caret at block start");
|
||||
|
||||
EventUtils.synthesizeKey("[", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 9,
|
||||
"CSS : Jump to opening bracket of the code block when caret at block end");
|
||||
|
||||
// Setting caret at Line 3 start.
|
||||
editor.setCaretOffset(28);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 9,
|
||||
"CSS : Jump to opening bracket of code block when inside the function");
|
||||
|
||||
editor.setCaretOffset(28);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 45,
|
||||
"CSS : Jump to closing bracket of code block when inside the function");
|
||||
|
||||
@ -124,13 +124,13 @@ function test() {
|
||||
|
||||
// Setting caret at Line 1 end.
|
||||
editor.setCaretOffset(6);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 6,
|
||||
"HTML : Jump to block end : Nothing happens in html mode");
|
||||
|
||||
// Setting caret at Line 4 end.
|
||||
editor.setCaretOffset(64);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 64,
|
||||
"HTML : Jump to block start : Nothing happens in html mode");
|
||||
|
||||
@ -144,13 +144,13 @@ function test() {
|
||||
|
||||
// Setting caret at Line 1 start.
|
||||
editor.setCaretOffset(0);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 0,
|
||||
"Text : Jump to block end : Nothing happens in text mode");
|
||||
|
||||
// Setting caret at Line 4 end.
|
||||
editor.setCaretOffset(28);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 28,
|
||||
"Text : Jump to block start : Nothing happens in text mode");
|
||||
|
||||
|
@ -57,15 +57,15 @@ function test() {
|
||||
|
||||
// Setting caret at end of line 11 (function baz() {).
|
||||
editor.setCaretOffset(147);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 16,
|
||||
"JS : Jump to opening bracket of previous sibling block when no parent");
|
||||
|
||||
EventUtils.synthesizeKey("]", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 129,
|
||||
"JS : Jump to closing bracket of same code block");
|
||||
|
||||
EventUtils.synthesizeKey("]", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 151,
|
||||
"JS : Jump to closing bracket of next sibling code block");
|
||||
|
||||
@ -82,15 +82,15 @@ function test() {
|
||||
|
||||
// Setting caret at Line 5 end (.class1 {).
|
||||
editor.setCaretOffset(57);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("[", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 10,
|
||||
"CSS : Jump to opening bracket of previous sibling code block");
|
||||
|
||||
EventUtils.synthesizeKey("]", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 46,
|
||||
"CSS : Jump to closing bracket of same code block");
|
||||
|
||||
EventUtils.synthesizeKey("]", {accelKey: true}, testWin);
|
||||
EventUtils.synthesizeKey("]", {accelKey: true, shiftKey: true}, testWin);
|
||||
is(editor.getCaretOffset(), 77,
|
||||
"CSS : Jump to closing bracket of next sibling code block");
|
||||
|
||||
|
@ -29,7 +29,7 @@ function test()
|
||||
|
||||
findVariableViewProperties(aVar, [
|
||||
{ name: "testProp", value: "testValue" },
|
||||
{ name: "document", value: "[object HTMLDocument]" },
|
||||
{ name: "document", value: "HTMLDocument" },
|
||||
], { webconsole: hud }).then(finishTest);
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ function testPropertyPanel()
|
||||
function onVariablesViewReady(aEvent, aView)
|
||||
{
|
||||
findVariableViewProperties(aView, [
|
||||
{ name: "body", value: "[object HTMLBodyElement]" },
|
||||
{ name: "body", value: "HTMLBodyElement" },
|
||||
], { webconsole: gHUD }).then(finishTest);
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,8 @@ function consoleOpened(hud) {
|
||||
|
||||
function testConsoleDir(hud, ev, view) {
|
||||
findVariableViewProperties(view, [
|
||||
{ name: "__proto__.__proto__.querySelectorAll", value: "[object Function]" },
|
||||
{ name: "location", value: "[object Location]" },
|
||||
{ name: "__proto__.write", value: "[object Function]" },
|
||||
{ name: "__proto__.__proto__.querySelectorAll", value: "Function" },
|
||||
{ name: "location", value: "Location" },
|
||||
{ name: "__proto__.write", value: "Function" },
|
||||
], { webconsole: hud }).then(finishTest);
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ function matchVariablesViewProperty(aProp, aRule, aOptions)
|
||||
}
|
||||
|
||||
if ("isGenerator" in aRule) {
|
||||
let isGenerator = aProp.displayValue == "[object Generator]";
|
||||
let isGenerator = aProp.displayValue == "Generator";
|
||||
if (aRule.isGenerator != isGenerator) {
|
||||
info("rule " + aRule.name + " generator test failed");
|
||||
return resolve(false);
|
||||
@ -612,7 +612,7 @@ function matchVariablesViewProperty(aProp, aRule, aOptions)
|
||||
*/
|
||||
function isVariableViewPropertyIterator(aProp, aWebConsole)
|
||||
{
|
||||
if (aProp.displayValue == "[object Iterator]") {
|
||||
if (aProp.displayValue == "Iterator") {
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
|
||||
|
@ -320,7 +320,7 @@ DebuggerClient.Argument = function DCP(aPosition) {
|
||||
};
|
||||
|
||||
DebuggerClient.Argument.prototype.getArgument = function DCP_getArgument(aParams) {
|
||||
if (!this.position in aParams) {
|
||||
if (!(this.position in aParams)) {
|
||||
throw new Error("Bad index into params: " + this.position);
|
||||
}
|
||||
return aParams[this.position];
|
||||
|
Loading…
x
Reference in New Issue
Block a user