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 5779

  • Loading branch information...
commit 3c106d456ee28ceba6beb6e10488d00329e8cc04 1 parent 356c572
Jan Odvarko authored October 04, 2012
39  tests/content/commandLine/5779/issue5779.html
... ...
@@ -0,0 +1,39 @@
  1
+<!DOCTYPE html>
  2
+<html>
  3
+<head>
  4
+    <title>Issue 5779: Allow to set the root element in $ and $$</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=5779">Issue 5779</a>:
  11
+        Allow to set the root element in $ and $$</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 expressions in the command line and check the results<br/>
  19
+                <i>'expression' -> 'result'</i>
  20
+            </li>
  21
+            <ol>
  22
+                <li><code>$('div') -> &lt;div class="test"&gt;</code></li>
  23
+                <li><code>$$('div') -> [div.test, div#root, div.rootdiv1, div.rootdiv2]</code></li>
  24
+                <li><code>$('div', document.getElementById('root')); -> &lt;div class="rootdiv1"&gt;</code></li>
  25
+                <li><code>$$('div', document.getElementById('root')); -> [div.rootdiv1, div.rootdiv2]</code></li>
  26
+            </ol>
  27
+        </ol>
  28
+    </section>
  29
+    <footer>
  30
+        Jan Odvarko &lt;odvarko@gmail.com&gt;
  31
+    </footer>
  32
+</div>
  33
+
  34
+<div id="root">
  35
+    <div class="rootdiv1"></div>
  36
+    <div class="rootdiv2"></div>
  37
+</div>
  38
+</body>
  39
+</html>
37  tests/content/commandLine/5779/issue5779.js
... ...
@@ -0,0 +1,37 @@
  1
+function runTest()
  2
+{
  3
+    FBTest.sysout("issue5779.START");
  4
+    FBTest.openNewTab(basePath + "commandLine/5779/issue5779.html", function(win)
  5
+    {
  6
+        FBTest.openFirebug();
  7
+        FBTest.clearCache();
  8
+        FBTest.enableConsolePanel(function(win)
  9
+        {
  10
+            var tasks = new FBTest.TaskList();
  11
+
  12
+            tasks.push(FBTest.executeCommandAndVerify,
  13
+                "$('div');",
  14
+                "<div class=\"test\">",
  15
+                "a", "objectLink-element");
  16
+
  17
+            tasks.push(FBTest.executeCommandAndVerify,
  18
+                "$$('div');",
  19
+                "[div.test, div#root, div.rootdiv1, div.rootdiv2]",
  20
+                "pre", "objectBox-array");
  21
+
  22
+            tasks.push(FBTest.executeCommandAndVerify,
  23
+                "$('div', document.getElementById('root'));",
  24
+                "<div class=\"rootdiv1\">",
  25
+                "a", "objectLink-element");
  26
+
  27
+            tasks.push(FBTest.executeCommandAndVerify,
  28
+                "$$('div', document.getElementById('root'));",
  29
+                "[div.rootdiv1, div.rootdiv2]",
  30
+                "pre", "objectBox-array");
  31
+
  32
+            tasks.run(function() {
  33
+                FBTest.testDone("issue5779.DONE");
  34
+            });
  35
+        });
  36
+    });
  37
+}
1  tests/content/firebug.html
@@ -174,6 +174,7 @@
174 174
     {group: "commandLine",        uri: "commandLine/4453/issue4453.js",           desc: "Issue 4453: Content of the command line can't be cleared.", testPage: "commandLine/4453/issue4453.html"},
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
+    {group: "commandLine",        uri: "commandLine/5779/issue5779.js",           desc: "Allow to set the root element in $ and $$", testPage: "commandLine/5779/issue5779.html"},
177 178
     {group: "html",               uri: "html/breakpoints/breakOnElement.js",      desc: "Mutation breakpoints test", testPage: "html/breakpoints/breakOnElement.html"},
178 179
     {group: "html",               uri: "html/breakpoints/breakOnElementCB.js",    desc: "Mutation breakpoints test (Chromebug active)", testPage: "html/breakpoints/breakOnElement.html"},
179 180
     {group: "html",               uri: "html/breakpoints/breakOnNext.js",         desc: "Mutation breakpoints test", testPage: "html/breakpoints/breakOnNext.html"},

0 notes on commit 3c106d4

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