Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FBTest for issue 5655

  • Loading branch information...
commit 4d6adfbc05039809ebd7b2e34d8e4d08789b71e9 1 parent d5e7f9c
@janodvarko janodvarko authored
View
35 tests/content/console/5655/issue5655.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <title>Issue 5655: console panel width empty elements</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=5655">Issue 5655</a>:
+ console panel width empty elements</h1>
+</header>
+<div>
+ <section id="description">
+ <h3>Steps to reproduce</h3>
+ <ol>
+ <li>Open Firebug</li>
+ <li>Enable and switch to the <em>Console</em> panel</li>
+ <li>Execute following expression on the command line and
+ check the results <i>'expression' -> 'result'</i></li>
+ <ol>
+ <li><code>console.log() -> (nothing to output)</code></li>
+ <li><code>console.log(null) -> null</code></li>
+ <li><code>console.log(undefined) -> undefined</code></li>
+ <li><code>console.log("") -> (an empty string)</code></li>
+ <li><code>console.log("TEXT") -> TEXT</code></li>
+ <li><code>console.log(1,2,0,NaN,null,undefined,"",3, "TEXT", {1:2},[1,2,"", undefined]) ->
+ 1 2 0 NaN null undefined (an empty string) 3 TEXT Object { 1=2 } [ 1, 2, "", undefined ]</code></li>
+ </ol>
+ </ol>
+ </section>
+ <footer>Jan Odvarko, odvarko@gmail.com</footer>
+</div>
+</body>
+</html>
View
45 tests/content/console/5655/issue5655.js
@@ -0,0 +1,45 @@
+function runTest()
+{
+ FBTest.sysout("issue5655.START");
+ FBTest.openNewTab(basePath + "console/api/log.html", function(win)
+ {
+ FBTest.openFirebug();
+ FBTest.enableConsolePanel(function(win)
+ {
+ var tasks = new FBTest.TaskList();
+
+ var nothingToOutput = FW.FBL.$STR("console.msg.nothing_to_output");
+ var emptyString = FW.FBL.$STR("console.msg.an_empty_string");
+
+ tasks.push(executeAndVerify, "console.log()", nothingToOutput);
+ tasks.push(executeAndVerify, "console.log(null)", /null/);
+ tasks.push(executeAndVerify, "console.log(undefined)", /undefined/);
+ tasks.push(executeAndVerify, "console.log(\"\")", emptyString);
+ tasks.push(executeAndVerify, "console.log(\"TEXT\")", "TEXT");
+
+ var expr = "console.log(1,2,0,NaN,null,undefined,\"\",3, \"TEXT\", {1:2},[1,2,\"\", undefined])";
+ var expected = " 1 2 0 NaN null undefined " + emptyString +
+ " 3 TEXT Object { 1=2} [1, 2, \"\", undefined]";
+ tasks.push(executeAndVerify, expr, expected);
+
+ tasks.run(function() {
+ FBTest.testDone("issue5655.DONE");
+ });
+ });
+ });
+}
+
+function executeAndVerify(callback, expression, expected)
+{
+ var config = {tagName: "div", classes: "logRow logRow-log"};
+ FBTest.waitForDisplayedElement("console", config, function(row)
+ {
+ FBTest.compare(expected, row.textContent, "Verify: " +
+ expression + " SHOULD BE " + expected);
+
+ FBTest.clickToolbarButton(null, "fbConsoleClear");
+ callback();
+ });
+
+ FBTest.executeCommand(expression);
+}
View
1  tests/content/firebug.html
@@ -114,6 +114,7 @@
{group: "console", uri: "console/5359/issue5359.js", desc: "Use displayName in profiler", testPage: "console/5359/issue5359.html"},
{group: "console", uri: "console/5382/issue5382.js", desc: "Console.log display bug with nested arrays", testPage: "console/5382/issue5382.html"},
{group: "console", uri: "console/3663/issue3663.js", desc: "too much recursion when logging array contains itself", testPage: "console/3663/issue3663.html"},
+ {group: "console", uri: "console/5655/issue5655.js", desc: "console panel width empty elements", testPage: "console/5655/issue5655.html"},
{group: "console/spy", uri: "console/spy/2285/issue2285.js", desc: "support for content-type: multipart/x-mixed-replace", testPage: "console/spy/2285/issue2285.html" },
{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" },
{group: "console/spy", uri: "console/spy/2712/issue2712.js", desc: "Gmail has network connections that report 200 Aborted", testPage: "console/spy/2712/issue2712.html" },
Please sign in to comment.
Something went wrong with that request. Please try again.