Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FBTest for issue 5951

  • Loading branch information...
commit 35f65c563aad544016ce63ae733ccf5b6d3fb94a 1 parent 3c106d4
@janodvarko janodvarko authored
View
37 tests/content/commandLine/5951/issue5951.html
@@ -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>
View
34 tests/content/commandLine/5951/issue5951.js
@@ -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);
+ });
+ });
+}
View
1  tests/content/firebug.html
@@ -175,6 +175,7 @@
{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"},

0 comments on commit 35f65c5

Please sign in to comment.
Something went wrong with that request. Please try again.