Permalink
Browse files

Resolve conflict

  • Loading branch information...
2 parents 149ee8f + a152dfc commit fb14ef90fb5b2572e2cf1e46913776aa1f6c5b57 @janodvarko janodvarko committed Oct 5, 2012
@@ -1675,7 +1675,10 @@ css.selector.selectorError=Selection failed:
# in the CSS panel.
css.selector.Selection=Elements
+# LOCALIZATION NOTE (panel.tip.selector): Tooltip text for the Selection side panel
+# Shown when hovering the Selection panel tab
panel.tip.selector=Displays elements matching a CSS selector
+
css.selector.TryASelector=Try a selector...
# LOCALIZATION NOTE (css.selector.cmd.getMatchingElements): A label for context menu item.
@@ -34,7 +34,16 @@ function runTest()
FBTest.testDone("issue3363.DONE");
});
- FBTest.executeCommand(command);
+ // xxxHonza: the method uses internaly sendChare to type the
+ // command char by char. But, the command is this case is too long
+ // and it causes timout.
+ //FBTest.executeCommand(command);
+
+ // xxxHonza: Set the text directly, there could be better FBTest API for it.
+ FBTest.clearCommand();
+ var cmdLine = FW.Firebug.CommandLine.getSingleRowCommandLine();
+ cmdLine.value = command;
+ FBTest.sendKey("RETURN", "fbCommandLine");
});
});
}
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Issue 5779: Allow to set the root element in $ and $$</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link href="../../_common/testcase.css" type="text/css" rel="stylesheet"/>
+</head>
+<body>
+<header>
+ <h1><a href="http://code.google.com/p/fbug/issues/detail?id=5779">Issue 5779</a>:
+ Allow to set the root element in $ and $$</h1>
+</header>
+<div class="test">
+ <section id="description">
+ <h3>Steps to reproduce</h3>
+ <ol>
+ <li>Select and enable the Console panel</li>
+ <li>Execute following expressions in the command line and check the results<br/>
+ <i>'expression' -> 'result'</i>
+ </li>
+ <ol>
+ <li><code>$('div') -> &lt;div class="test"&gt;</code></li>
+ <li><code>$$('div') -> [div.test, div#root, div.rootdiv1, div.rootdiv2]</code></li>
+ <li><code>$('div', document.getElementById('root')); -> &lt;div class="rootdiv1"&gt;</code></li>
+ <li><code>$$('div', document.getElementById('root')); -> [div.rootdiv1, div.rootdiv2]</code></li>
+ </ol>
+ </ol>
+ </section>
+ <footer>
+ Jan Odvarko &lt;odvarko@gmail.com&gt;
+ </footer>
+</div>
+
+<div id="root">
+ <div class="rootdiv1"></div>
+ <div class="rootdiv2"></div>
+</div>
+</body>
+</html>
@@ -0,0 +1,37 @@
+function runTest()
+{
+ FBTest.sysout("issue5779.START");
+ FBTest.openNewTab(basePath + "commandLine/5779/issue5779.html", function(win)
+ {
+ FBTest.openFirebug();
+ FBTest.clearCache();
+ FBTest.enableConsolePanel(function(win)
+ {
+ var tasks = new FBTest.TaskList();
+
+ tasks.push(FBTest.executeCommandAndVerify,
+ "$('div');",
+ "<div class=\"test\">",
+ "a", "objectLink-element");
+
+ tasks.push(FBTest.executeCommandAndVerify,
+ "$$('div');",
+ "[div.test, div#root, div.rootdiv1, div.rootdiv2]",
+ "pre", "objectBox-array");
+
+ tasks.push(FBTest.executeCommandAndVerify,
+ "$('div', document.getElementById('root'));",
+ "<div class=\"rootdiv1\">",
+ "a", "objectLink-element");
+
+ tasks.push(FBTest.executeCommandAndVerify,
+ "$$('div', document.getElementById('root'));",
+ "[div.rootdiv1, div.rootdiv2]",
+ "pre", "objectBox-array");
+
+ tasks.run(function() {
+ FBTest.testDone("issue5779.DONE");
+ });
+ });
+ });
+}
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Issue 5951: Title of array-like objects should be clickable</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link href="../../_common/testcase.css" type="text/css" rel="stylesheet"/>
+</head>
+<body>
+<header>
+ <h1><a href="http://code.google.com/p/fbug/issues/detail?id=5951">Issue 5951</a>:
+ Title of array-like objects should be clickable</h1>
+</header>
+<div class="test">
+ <section id="description">
+ <h3>Steps to reproduce</h3>
+ <ol>
+ <li>Select and enable the Console panel</li>
+ <li>Execute following expression in the command line: <br/>
+ <code>document.getElementsByTagName("div")</code>
+ </li>
+ <li>The result should be: <br/>
+ <code>HTMLCollection[div.test, div#root]</code>
+ </li>
+ <li>Click the <code>HTMLCollection</code> title. You should be
+ navigated to the DOM panel.</li>
+ </ol>
+ </section>
+ <footer>
+ Jan Odvarko &lt;odvarko@gmail.com&gt;
+ </footer>
+</div>
+
+<div id="root">
+</div>
+
+</body>
+</html>
@@ -0,0 +1,34 @@
+function runTest()
+{
+ FBTest.sysout("issue5951.START");
+ FBTest.openNewTab(basePath + "commandLine/5951/issue5951.html", function(win)
+ {
+ FBTest.openFirebug();
+ FBTest.clearCache();
+ FBTest.enableConsolePanel(function(win)
+ {
+ var expression = "document.getElementsByTagName('div')";
+ var expected = "HTMLCollection[div.test, div#root]";
+
+ var config = {tagName: "pre", classes: "objectBox-array"};
+ FBTest.waitForDisplayedElement("console", config, function(row)
+ {
+ FBTest.compare(expected, row.textContent, "Verify: " +
+ expression + " SHOULD BE " + expected);
+
+ var title = row.getElementsByClassName("objectTitle")[0];
+ if (FBTest.ok(title, "HTMLCollection title must exist"))
+ {
+ FBTest.click(title);
+
+ var panel = FBTest.getSelectedPanel();
+ FBTest.compare("dom", panel.name, "The DOM panel must be selected");
+ }
+
+ FBTest.testDone("issue5951.DONE");
+ });
+
+ FBTest.executeCommand(expression);
+ });
+ });
+}
@@ -12,59 +12,11 @@ function runTest()
FBTest.executeContextMenuCommand(FW.Firebug.chrome.$("fbLocationList"),
"InspectIndomPanel", function()
{
- var panel = FBTest.getSelectedPanel();
- if (FBTest.compare("dom", panel.name, "DOM panel must be selected now"))
- {
- var props = panel.panelNode.getElementsByClassName("memberLabel");
- var prop;
-
- for (var i=0; i<props.length; i++)
- {
- if (props[i].textContent == "cssRules")
- {
- prop = props[i];
- break;
- }
- }
-
- var config = {tagName: "tr", classes: "memberRow ordinalRow", counter: 6};
- FBTest.waitForDisplayedElement("dom", config, function(row)
- {
- var cssRulesLabels = panel.panelNode.
- querySelectorAll(".memberRow.ordinalRow[level=\"1\"] .memberLabel");
- var cssRules = [];
- for (var i=0; i<cssRulesLabels.length; i++)
- {
- var cssRulesLabel = cssRulesLabels[i];
- cssRules.push(FW.FBL.getAncestorByClass(cssRulesLabel, "memberRow").
- getElementsByClassName("memberValueCell").item(0));
- }
-
- if (FBTest.compare(6, cssRules.length, "There must be 6 CSS rules"))
- {
- var expectedCSSRules =
- [
- "CSSCharsetRule utf-8",
- "CSSImportRule external/externalStylesheet.css",
- "CSSMediaRule (min-width: 500px) and (max-width: 700px)",
- "CSSFontFaceRule \"TitilliumMaps\"",
- "CSSKeyframesRule slidein",
- "CSSStyleRule #internalRule"
- ];
-
- // xxxsz: We don't check the tooltips yet
- for (var i=0; i<cssRules.length; i++)
- {
- FBTest.compare(expectedCSSRules[i], cssRules[i].textContent, (i+1)+
- ". rule must be '"+expectedCSSRules[i]+"'");
- }
- }
-
- FBTest.testDone("issue5247.DONE");
- });
-
- FBTest.click(prop);
- }
+ // xxxHonza, xxxsz: hack that fixes this text on Mac. The panel can
+ // be selected asynchronously.
+ setTimeout(function() {
+ onInspect();
+ }, 1000);
});
}
else
@@ -73,3 +25,60 @@ function runTest()
}
});
}
+
+function onInspect()
+{
+ var panel = FBTest.getSelectedPanel();
+ if (FBTest.compare("dom", panel.name, "DOM panel must be selected now"))
+ {
+ var props = panel.panelNode.getElementsByClassName("memberLabel");
+ var prop;
+
+ for (var i=0; i<props.length; i++)
+ {
+ if (props[i].textContent == "cssRules")
+ {
+ prop = props[i];
+ break;
+ }
+ }
+
+ var config = {tagName: "tr", classes: "memberRow ordinalRow", counter: 6};
+ FBTest.waitForDisplayedElement("dom", config, function(row)
+ {
+ var cssRulesLabels = panel.panelNode.
+ querySelectorAll(".memberRow.ordinalRow[level=\"1\"] .memberLabel");
+ var cssRules = [];
+ for (var i=0; i<cssRulesLabels.length; i++)
+ {
+ var cssRulesLabel = cssRulesLabels[i];
+ cssRules.push(FW.FBL.getAncestorByClass(cssRulesLabel, "memberRow").
+ getElementsByClassName("memberValueCell").item(0));
+ }
+
+ if (FBTest.compare(6, cssRules.length, "There must be 6 CSS rules"))
+ {
+ var expectedCSSRules =
+ [
+ "CSSCharsetRule utf-8",
+ "CSSImportRule external/externalStylesheet.css",
+ "CSSMediaRule (min-width: 500px) and (max-width: 700px)",
+ "CSSFontFaceRule \"TitilliumMaps\"",
+ "CSSKeyframesRule slidein",
+ "CSSStyleRule #internalRule"
+ ];
+
+ // xxxsz: We don't check the tooltips yet
+ for (var i=0; i<cssRules.length; i++)
+ {
+ FBTest.compare(expectedCSSRules[i], cssRules[i].textContent, (i+1)+
+ ". rule must be '"+expectedCSSRules[i]+"'");
+ }
+ }
+
+ FBTest.testDone("issue5247.DONE");
+ });
+
+ FBTest.click(prop);
+ }
+}
@@ -174,6 +174,8 @@
{group: "commandLine", uri: "commandLine/4453/issue4453.js", desc: "Issue 4453: Content of the command line can't be cleared.", testPage: "commandLine/4453/issue4453.html"},
{group: "commandLine", uri: "commandLine/5042/issue5042.js", desc: "Issue 5042: Command Line should not prevent tabbing out when empty", testPage: "commandLine/5042/issue5042.html"},
{group: "commandLine", uri: "commandLine/5130/issue5130.js", desc: "Array indices are sorted alphabetically instead of numerically", testPage: "commandLine/5130/issue5130.html"},
+ {group: "commandLine", uri: "commandLine/5779/issue5779.js", desc: "Allow to set the root element in $ and $$", testPage: "commandLine/5779/issue5779.html"},
+ {group: "commandLine", uri: "commandLine/5951/issue5951.js", desc: "Title of array-like objects should be clickable", testPage: "commandLine/5951/issue5951.html"},
{group: "html", uri: "html/breakpoints/breakOnElement.js", desc: "Mutation breakpoints test", testPage: "html/breakpoints/breakOnElement.html"},
{group: "html", uri: "html/breakpoints/breakOnElementCB.js", desc: "Mutation breakpoints test (Chromebug active)", testPage: "html/breakpoints/breakOnElement.html"},
{group: "html", uri: "html/breakpoints/breakOnNext.js", desc: "Mutation breakpoints test", testPage: "html/breakpoints/breakOnNext.html"},
@@ -11,9 +11,13 @@ function runTest()
var nodeBox = getSelectedNodeBox();
FBTest.executeContextMenuCommand(nodeBox, "htmlNewAttribute", function()
{
- var editor = panel.panelNode.getElementsByClassName("textEditorInner").item(0);
- FBTest.compare("", editor.value, "The default value must be an empty string");
- FBTest.testDone("issue5504.DONE");
+ // Wait till the inline editor is available.
+ var config = {tagName: "input", classes: "textEditorInner"};
+ FBTest.waitForDisplayedElement("html", config, function(editor)
+ {
+ FBTest.compare("", editor.value, "The default value must be an empty string");
+ FBTest.testDone("issue5504.DONE");
+ });
});
});
}
@@ -11,18 +11,24 @@ function runTest()
FBTest.setPref("displayedAttributeValueLimit", 10);
var longOnclickValue = win.document.getElementById("long-onclick").
getAttribute("onclick");
+
FBTest.selectElementInHtmlPanel("long-onclick", function (nodes)
{
// getting onclick attribute's value
var onclickValue = nodes.getElementsByClassName("nodeValue").item(1);
FBTest.synthesizeMouse(onclickValue);
- var texteditor = panel.panelNode.getElementsByClassName("textEditorInner").item(0);
- if (FBTest.ok(texteditor, "Editor must be loaded now."))
+
+ // Wait till the inline editor is available.
+ var config = {tagName: "input", classes: "textEditorInner"};
+ FBTest.waitForDisplayedElement("html", config, function(texteditor)
{
- FBTest.compare(longOnclickValue, texteditor.value,
- "Inline editor must contain whole string of onclick value.");
- }
- FBTest.testDone("issue5755.DONE");
+ if (FBTest.ok(texteditor, "Editor must be loaded now."))
+ {
+ FBTest.compare(longOnclickValue, texteditor.value,
+ "Inline editor must contain whole string of onclick value.");
+ }
+ FBTest.testDone("issue5755.DONE");
+ });
});
}
else
@@ -36,8 +36,15 @@ function testDeleteAllWatches(callback, panelNode, targetSelector, watchExpressi
var target = panelNode.querySelector(targetSelector);
FBTest.executeContextMenuCommand(target, "fbDeleteAllWatches", function()
{
- FBTest.compare(0, countWatches(panelNode), "There should not be any watch");
- callback();
+ // xxxHonza: needs to be done properly.
+ // The code should handle a mutation event or periodically check (for
+ // limited amount of time) if the watch window is empty.
+ // See: http://code.google.com/p/fbug/issues/detail?id=5958
+ setTimeout(function()
+ {
+ FBTest.compare(0, countWatches(panelNode), "There should not be any watch");
+ callback();
+ }, 1000);
});
});
}

0 comments on commit fb14ef9

Please sign in to comment.