Backed out changeset a17657a71b01 (bug 991376) for pushing tests around, causing chunked browser-chrome bustage on a CLOSED TREE

This commit is contained in:
Wes Kocher 2014-04-03 15:15:26 -07:00
parent 5102990b15
commit 787b9a593b
5 changed files with 10 additions and 53 deletions

View File

@ -1811,12 +1811,6 @@ VariableBubbleView.prototype = {
this._editorContainer.removeEventListener("mouseleave", this._onMouseLeave, false);
},
/**
* Specifies whether literals can be (redundantly) inspected in a popup.
* This behavior is deprecated, but still tested in a few places.
*/
_ignoreLiterals: true,
/**
* Searches for an identifier underneath the specified position in the
* source editor, and if found, opens a VariablesView inspection popup.
@ -1856,8 +1850,7 @@ VariableBubbleView.prototype = {
let identifierInfo = parsedSource.getIdentifierAt({
line: scriptLine + 1,
column: scriptColumn,
scriptIndex: scriptInfo.index,
ignoreLiterals: this._ignoreLiterals
scriptIndex: scriptInfo.index
});
// If the info is null, we're not hovering any identifier.

View File

@ -274,7 +274,6 @@ support-files =
[browser_dbg_variables-view-popup-12.js]
[browser_dbg_variables-view-popup-13.js]
[browser_dbg_variables-view-popup-14.js]
[browser_dbg_variables-view-popup-15.js]
[browser_dbg_variables-view-reexpand-01.js]
[browser_dbg_variables-view-reexpand-02.js]
[browser_dbg_variables-view-webidl.js]

View File

@ -15,8 +15,6 @@ function test() {
let bubble = win.DebuggerView.VariableBubble;
let tooltip = bubble._tooltip.panel;
bubble._ignoreLiterals = false;
function verifyContents(textContent, className) {
is(tooltip.querySelectorAll(".variables-view-container").length, 0,
"There should be no variables view containers added to the tooltip.");

View File

@ -1,33 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/**
* Tests opening the variable inspection popup directly on literals.
*/
const TAB_URL = EXAMPLE_URL + "doc_frame-parameters.html";
function test() {
Task.spawn(function() {
let [tab, debuggee, panel] = yield initDebugger(TAB_URL);
let win = panel.panelWin;
let bubble = win.DebuggerView.VariableBubble;
let tooltip = bubble._tooltip.panel;
// Allow this generator function to yield first.
executeSoon(() => debuggee.start());
yield waitForSourceAndCaretAndScopes(panel, ".html", 24);
yield openVarPopup(panel, { line: 15, ch: 12 });
ok(true, "The variable inspection popup was shown for the real variable.");
once(tooltip, "popupshown").then(() => {
ok(false, "The variable inspection popup shouldn't have been opened.");
});
reopenVarPopup(panel, { line: 17, ch: 27 });
yield waitForTime(1000);
yield resumeDebuggerThenCloseAndFinish(panel);
});
}

View File

@ -136,8 +136,8 @@ SyntaxTreesPool.prototype = {
/**
* @see SyntaxTree.prototype.getIdentifierAt
*/
getIdentifierAt: function({ line, column, scriptIndex, ignoreLiterals }) {
return this._call("getIdentifierAt", scriptIndex, line, column, ignoreLiterals)[0];
getIdentifierAt: function({ line, column, scriptIndex }) {
return this._call("getIdentifierAt", scriptIndex, line, column)[0];
},
/**
@ -256,13 +256,11 @@ SyntaxTree.prototype = {
* The line in the source.
* @param number aColumn
* The column in the source.
* @param boolean aIgnoreLiterals
* Specifies if alone literals should be ignored.
* @return object
* An object containing identifier information as { name, location,
* evalString } properties, or null if nothing is found.
*/
getIdentifierAt: function(aLine, aColumn, aIgnoreLiterals) {
getIdentifierAt: function(aLine, aColumn) {
let info = null;
SyntaxTreeVisitor.walk(this.AST, {
@ -288,9 +286,7 @@ SyntaxTree.prototype = {
* @param Node aNode
*/
onLiteral: function(aNode) {
if (!aIgnoreLiterals) {
this.onIdentifier(aNode);
}
this.onIdentifier(aNode);
},
/**
@ -709,7 +705,11 @@ let ParserHelpers = {
case "Identifier":
return aNode.name;
case "Literal":
return uneval(aNode.value);
if (typeof aNode.value == "string") {
return "\"" + aNode.value + "\"";
} else {
return aNode.value + "";
}
default:
return "";
}