Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FBTest for issue 5448

  • Loading branch information...
commit f096395d589908bf80046cacc013da5f9e0f7289 1 parent a3d6466
@janodvarko janodvarko authored
View
1  tests/content/firebug.html
@@ -176,6 +176,7 @@
{group: "html", uri: "html/4826/issue4826.js", desc: "Changing the ID of a node in HTML Panel doesn't update Element Path", testPage: "html/4826/issue4826.html"},
{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: "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
34 tests/content/html/5448/issue5448.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Issue 5448: normalize() breaks display of text nodes with entities</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=5448">Issue 5448</a>:
+ normalize() breaks display of text nodes with entities</h1>
+</header>
+<div>
+ <section id="content">a åäö b</section>
+ <section id="description">
+ <h3>Steps to reproduce</h3>
+ <ol>
+ <li>Open Firebug, enable the Console panel.</li>
+ <li>Inspect the text above (the text in grey area)</li>
+ <li>Turn on <i>Show Entities As Names</i> (HTML panel option)</li>
+ <li>Switch to the Console panel</li>
+ <li>Execute on the command line:
+ <pre>$0.appendChild(document.createTextNode(' tnode')); $0.normalize();</pre>
+ </li>
+ <li>Switch back to the HTML panel. <code>&lt;section id="content&gt;</code>
+ element must contain:<br/><br/>
+ <pre>a &amp;aring;&amp;auml;&amp;ouml; b</pre>
+ </li>
+ </ol>
+ </section>
+ <footer>Jan Odvarko, odvarko@gmail.com</footer>
+</div>
+</body>
+</html>
View
34 tests/content/html/5448/issue5448.js
@@ -0,0 +1,34 @@
+function runTest()
+{
+ FBTest.sysout("issue5448.START");
+
+ FBTest.openNewTab(basePath + "html/5448/issue5448.html", function(win)
+ {
+ FBTest.openFirebug();
+ FBTest.enableConsolePanel(function()
+ {
+ FBTest.selectPanel("html");
+
+ FBTest.selectElementInHtmlPanel("content", function(node)
+ {
+ // Execute an expression on the Command Line
+ FBTest.selectPanel("console");
+ var expr = "$0.appendChild(document.createTextNode(' tnode')); $0.normalize();";
+ FBTest.executeCommand(expr);
+
+ // Switch back to the HTML panel
+ FBTest.selectPanel("html");
+
+ // Wait till the executed expression causes HTML panel update.
+ FBTest.waitForHtmlMutation(null, "span", function(node)
+ {
+ // Verify HTML panel content after mutation.
+ var expected = /a &aring;&auml;&ouml; b/;
+ FBTest.compare(expected, node.textContent, "The text content must match");
+
+ FBTest.testDone("issue5448.DONE");
+ });
+ });
+ });
+ });
+}
Please sign in to comment.
Something went wrong with that request. Please try again.