Skip to content
Browse files

FBTest for issue 5504

  • Loading branch information...
1 parent a700a8e commit 7440a4b7505a14a151f07c95ac24fc93e41bfb28 @janodvarko janodvarko committed May 29, 2012
Showing with 52 additions and 0 deletions.
  1. +1 −0 tests/content/firebug.html
  2. +25 −0 tests/content/html/5504/issue5504.html
  3. +26 −0 tests/content/html/5504/issue5504.js
View
1 tests/content/firebug.html
@@ -177,6 +177,7 @@
{group: "html", uri: "html/5058/issue5058.js", desc: "Edit HTML button doesn't work", testPage: "html/5058/issue5058.html"},
{group: "html", uri: "html/5255/issue5255.js", desc: "Adding elements through Edit HTML shows them in the wrong place", testPage: "html/5255/issue5255.html"},
{group: "html", uri: "html/5448/issue5448.js", desc: "normalize() breaks display of text nodes with entities", testPage: "html/5448/issue5448.html"},
+ {group: "html", uri: "html/5504/issue5504.js", desc: "New attributes default to undefined='undefined'", testPage: "html/5504/issue5504.html"},
{group: "css", uri: "css/537/issue537.js", desc: "Pseudo-elements are not displayed in Style side panel", testPage: "css/537/issue537.html"},
{group: "css", uri: "css/1189/issue1189.js", desc: "Display errors of inherited CSS styles in combination with CSS shorthand properties", testPage: "css/1189/issue1189.html"},
{group: "css", uri: "css/1338/issue1338.js", desc: "Increment CSS values at least significant digit", testPage: "css/1338/issue1338.html"},
View
25 tests/content/html/5504/issue5504.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Issue 5504: New attributes default to undefined="undefined"</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=5504">Issue 5504</a>:
+ New attributes default to undefined="undefined"</h1>
+</header>
+<div>
+ <section id="description">
+ <h3>Steps to reproduce</h3>
+ <ol>
+ <li>Open Firebug, switch to the HTML panel</li>
+ <li>Right click on <code>body</code> element and pick <code>New Attribute</code></li>
+ <li>The default name should be an empty string</li>
+ </ol>
+ </section>
+ <footer>Jan Odvarko, odvarko@gmail.com</footer>
+</div>
+</body>
+</html>
View
26 tests/content/html/5504/issue5504.js
@@ -0,0 +1,26 @@
+function runTest()
+{
+ FBTest.sysout("issue5504.START");
+
+ FBTest.openNewTab(basePath + "html/5504/issue5504.html", function(win)
+ {
+ FBTest.openFirebug();
+ var panel = FBTest.selectPanel("html");
+
+ // Get the selected elemetn and execute "New Attribute" action on it.
+ var nodeBox = getSelectedNodeBox();
+ FBTest.executeContextMenuCommand(nodeBox, "htmlNewAttribute", function()
+ {
+ var editor = panel.panelNode.getElementsByClassName("textEditorInner").item(0);
+ FBTest.compare("", editor.value, "The default value must be an empty string");
+ FBTest.testDone("issue5504.DONE");
+ });
+ });
+}
+
+// xxxHonza: use the one from FBTest
+function getSelectedNodeBox()
+{
+ var panel = FBTest.getPanel("html");
+ return panel.panelNode.querySelector(".nodeBox.selected");
+}

0 comments on commit 7440a4b

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