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 5655

  • Loading branch information...
commit 4d6adfbc05039809ebd7b2e34d8e4d08789b71e9 1 parent d5e7f9c
Jan Odvarko authored
35  tests/content/console/5655/issue5655.html
... ...
@@ -0,0 +1,35 @@
  1
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2
+<html>
  3
+<head>
  4
+    <title>Issue 5655: console panel width empty elements</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=5655">Issue 5655</a>:
  11
+        console panel width empty elements</h1>
  12
+</header>
  13
+<div>
  14
+    <section id="description">
  15
+        <h3>Steps to reproduce</h3>
  16
+        <ol>
  17
+            <li>Open Firebug</li>
  18
+            <li>Enable and switch to the <em>Console</em> panel</li>
  19
+            <li>Execute following expression on the command line and
  20
+                check the results <i>'expression' -> 'result'</i></li>
  21
+            <ol>
  22
+                <li><code>console.log() -> (nothing to output)</code></li>
  23
+                <li><code>console.log(null) -> null</code></li>
  24
+                <li><code>console.log(undefined) -> undefined</code></li>
  25
+                <li><code>console.log("") -> (an empty string)</code></li>
  26
+                <li><code>console.log("TEXT") -> TEXT</code></li>
  27
+                <li><code>console.log(1,2,0,NaN,null,undefined,"",3, "TEXT", {1:2},[1,2,"", undefined]) ->
  28
+    1 2 0 NaN null undefined (an empty string) 3 TEXT Object { 1=2 } [ 1, 2, "", undefined ]</code></li>
  29
+            </ol>
  30
+        </ol>
  31
+    </section>
  32
+    <footer>Jan Odvarko, odvarko@gmail.com</footer>
  33
+</div>
  34
+</body>
  35
+</html>
45  tests/content/console/5655/issue5655.js
... ...
@@ -0,0 +1,45 @@
  1
+function runTest()
  2
+{
  3
+    FBTest.sysout("issue5655.START");
  4
+    FBTest.openNewTab(basePath + "console/api/log.html", function(win)
  5
+    {
  6
+        FBTest.openFirebug();
  7
+        FBTest.enableConsolePanel(function(win)
  8
+        {
  9
+            var tasks = new FBTest.TaskList();
  10
+
  11
+            var nothingToOutput = FW.FBL.$STR("console.msg.nothing_to_output");
  12
+            var emptyString = FW.FBL.$STR("console.msg.an_empty_string");
  13
+
  14
+            tasks.push(executeAndVerify, "console.log()", nothingToOutput);
  15
+            tasks.push(executeAndVerify, "console.log(null)", /null/);
  16
+            tasks.push(executeAndVerify, "console.log(undefined)", /undefined/);
  17
+            tasks.push(executeAndVerify, "console.log(\"\")", emptyString);
  18
+            tasks.push(executeAndVerify, "console.log(\"TEXT\")", "TEXT");
  19
+
  20
+            var expr = "console.log(1,2,0,NaN,null,undefined,\"\",3, \"TEXT\", {1:2},[1,2,\"\", undefined])";
  21
+            var expected = " 1 2 0 NaN null undefined " + emptyString +
  22
+                " 3 TEXT Object { 1=2} [1, 2, \"\", undefined]";
  23
+            tasks.push(executeAndVerify, expr, expected);
  24
+
  25
+            tasks.run(function() {
  26
+                FBTest.testDone("issue5655.DONE");
  27
+            });
  28
+        });
  29
+    });
  30
+}
  31
+
  32
+function executeAndVerify(callback, expression, expected)
  33
+{
  34
+    var config = {tagName: "div", classes: "logRow logRow-log"};
  35
+    FBTest.waitForDisplayedElement("console", config, function(row)
  36
+    {
  37
+        FBTest.compare(expected, row.textContent, "Verify: " +
  38
+            expression + " SHOULD BE " + expected);
  39
+
  40
+        FBTest.clickToolbarButton(null, "fbConsoleClear");
  41
+        callback();
  42
+    });
  43
+
  44
+    FBTest.executeCommand(expression);
  45
+}
1  tests/content/firebug.html
@@ -114,6 +114,7 @@
114 114
     {group: "console",            uri: "console/5359/issue5359.js",               desc: "Use displayName in profiler", testPage: "console/5359/issue5359.html"},
115 115
     {group: "console",            uri: "console/5382/issue5382.js",               desc: "Console.log display bug with nested arrays", testPage: "console/5382/issue5382.html"},
116 116
     {group: "console",            uri: "console/3663/issue3663.js",               desc: "too much recursion when logging array contains itself", testPage: "console/3663/issue3663.html"},
  117
+    {group: "console",            uri: "console/5655/issue5655.js",               desc: "console panel width empty elements", testPage: "console/5655/issue5655.html"},
117 118
     {group: "console/spy",        uri: "console/spy/2285/issue2285.js",           desc: "support for content-type: multipart/x-mixed-replace", testPage: "console/spy/2285/issue2285.html" },
118 119
     {group: "console/spy",        uri: "console/spy/2462/issue2462.js",           desc: "The firebug console still shows the xhr in progress if you abort it (via request.abort()) ", testPage: "console/spy/2462/issue2462.html" },
119 120
     {group: "console/spy",        uri: "console/spy/2712/issue2712.js",           desc: "Gmail has network connections that report 200 Aborted", testPage: "console/spy/2712/issue2712.html" },

0 notes on commit 4d6adfb

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