Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

FBTest for issue 5951

  • Loading branch information...
commit 35f65c563aad544016ce63ae733ccf5b6d3fb94a 1 parent 3c106d4
Jan Odvarko authored
37  tests/content/commandLine/5951/issue5951.html
... ...
@@ -0,0 +1,37 @@
  1
+<!DOCTYPE html>
  2
+<html>
  3
+<head>
  4
+    <title>Issue 5951: Title of array-like objects should be clickable</title>
  5
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  6
+    <link href="../../_common/testcase.css" type="text/css" rel="stylesheet"/>
  7
+</head>
  8
+<body>
  9
+<header>
  10
+    <h1><a href="http://code.google.com/p/fbug/issues/detail?id=5951">Issue 5951</a>:
  11
+        Title of array-like objects should be clickable</h1>
  12
+</header>
  13
+<div class="test">
  14
+    <section id="description">
  15
+        <h3>Steps to reproduce</h3>
  16
+        <ol>
  17
+            <li>Select and enable the Console panel</li>
  18
+            <li>Execute following expression in the command line: <br/>
  19
+                <code>document.getElementsByTagName("div")</code>
  20
+            </li>
  21
+            <li>The result should be: <br/>
  22
+                <code>HTMLCollection[div.test, div#root]</code>
  23
+            </li>
  24
+            <li>Click the <code>HTMLCollection</code> title. You should be
  25
+            navigated to the DOM panel.</li>
  26
+        </ol>
  27
+    </section>
  28
+    <footer>
  29
+        Jan Odvarko &lt;odvarko@gmail.com&gt;
  30
+    </footer>
  31
+</div>
  32
+
  33
+<div id="root">
  34
+</div>
  35
+
  36
+</body>
  37
+</html>
34  tests/content/commandLine/5951/issue5951.js
... ...
@@ -0,0 +1,34 @@
  1
+function runTest()
  2
+{
  3
+    FBTest.sysout("issue5951.START");
  4
+    FBTest.openNewTab(basePath + "commandLine/5951/issue5951.html", function(win)
  5
+    {
  6
+        FBTest.openFirebug();
  7
+        FBTest.clearCache();
  8
+        FBTest.enableConsolePanel(function(win)
  9
+        {
  10
+            var expression = "document.getElementsByTagName('div')";
  11
+            var expected = "HTMLCollection[div.test, div#root]";
  12
+
  13
+            var config = {tagName: "pre", classes: "objectBox-array"};
  14
+            FBTest.waitForDisplayedElement("console", config, function(row)
  15
+            {
  16
+                FBTest.compare(expected, row.textContent, "Verify: " +
  17
+                    expression + " SHOULD BE " + expected);
  18
+
  19
+                var title = row.getElementsByClassName("objectTitle")[0];
  20
+                if (FBTest.ok(title, "HTMLCollection title must exist"))
  21
+                {
  22
+                    FBTest.click(title);
  23
+
  24
+                    var panel = FBTest.getSelectedPanel();
  25
+                    FBTest.compare("dom", panel.name, "The DOM panel must be selected");
  26
+                }
  27
+
  28
+                FBTest.testDone("issue5951.DONE");
  29
+            });
  30
+
  31
+            FBTest.executeCommand(expression);
  32
+        });
  33
+    });
  34
+}
1  tests/content/firebug.html
@@ -175,6 +175,7 @@
175 175
     {group: "commandLine",        uri: "commandLine/5042/issue5042.js",           desc: "Issue 5042: Command Line should not prevent tabbing out when empty", testPage: "commandLine/5042/issue5042.html"},
176 176
     {group: "commandLine",        uri: "commandLine/5130/issue5130.js",           desc: "Array indices are sorted alphabetically instead of numerically", testPage: "commandLine/5130/issue5130.html"},
177 177
     {group: "commandLine",        uri: "commandLine/5779/issue5779.js",           desc: "Allow to set the root element in $ and $$", testPage: "commandLine/5779/issue5779.html"},
  178
+    {group: "commandLine",        uri: "commandLine/5951/issue5951.js",           desc: "Title of array-like objects should be clickable", testPage: "commandLine/5951/issue5951.html"},
178 179
     {group: "html",               uri: "html/breakpoints/breakOnElement.js",      desc: "Mutation breakpoints test", testPage: "html/breakpoints/breakOnElement.html"},
179 180
     {group: "html",               uri: "html/breakpoints/breakOnElementCB.js",    desc: "Mutation breakpoints test (Chromebug active)", testPage: "html/breakpoints/breakOnElement.html"},
180 181
     {group: "html",               uri: "html/breakpoints/breakOnNext.js",         desc: "Mutation breakpoints test", testPage: "html/breakpoints/breakOnNext.html"},

0 notes on commit 35f65c5

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