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 5448

  • Loading branch information...
commit f096395d589908bf80046cacc013da5f9e0f7289 1 parent a3d6466
Jan Odvarko authored May 29, 2012
1  tests/content/firebug.html
@@ -176,6 +176,7 @@
176 176
     {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"},
177 177
     {group: "html",               uri: "html/5058/issue5058.js",                  desc: "Edit HTML button doesn't work", testPage: "html/5058/issue5058.html"},
178 178
     {group: "html",               uri: "html/5255/issue5255.js",                  desc: "Adding elements through Edit HTML shows them in the wrong place", testPage: "html/5255/issue5255.html"},
  179
+    {group: "html",               uri: "html/5448/issue5448.js",                  desc: "normalize() breaks display of text nodes with entities", testPage: "html/5448/issue5448.html"},
179 180
     {group: "css",                uri: "css/537/issue537.js",                     desc: "Pseudo-elements are not displayed in Style side panel", testPage: "css/537/issue537.html"},
180 181
     {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"},
181 182
     {group: "css",                uri: "css/1338/issue1338.js",                   desc: "Increment CSS values at least significant digit", testPage: "css/1338/issue1338.html"},
34  tests/content/html/5448/issue5448.html
... ...
@@ -0,0 +1,34 @@
  1
+<!DOCTYPE html>
  2
+<html>
  3
+<head>
  4
+    <title>Issue 5448: normalize() breaks display of text nodes with entities</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=5448">Issue 5448</a>:
  11
+    normalize() breaks display of text nodes with entities</h1>
  12
+</header>
  13
+<div>
  14
+    <section id="content">a åäö b</section>
  15
+    <section id="description">
  16
+        <h3>Steps to reproduce</h3>
  17
+        <ol>
  18
+            <li>Open Firebug, enable the Console panel.</li>
  19
+            <li>Inspect the text above (the text in grey area)</li>
  20
+            <li>Turn on <i>Show Entities As Names</i> (HTML panel option)</li>
  21
+            <li>Switch to the Console panel</li>
  22
+            <li>Execute on the command line:
  23
+            <pre>$0.appendChild(document.createTextNode(' tnode')); $0.normalize();</pre>
  24
+            </li>
  25
+            <li>Switch back to the HTML panel. <code>&lt;section id="content&gt;</code>
  26
+            element must contain:<br/><br/>
  27
+            <pre>a &amp;aring;&amp;auml;&amp;ouml; b</pre>
  28
+            </li>
  29
+        </ol>
  30
+    </section>
  31
+    <footer>Jan Odvarko, odvarko@gmail.com</footer>
  32
+</div>
  33
+</body>
  34
+</html>
34  tests/content/html/5448/issue5448.js
... ...
@@ -0,0 +1,34 @@
  1
+function runTest()
  2
+{
  3
+    FBTest.sysout("issue5448.START");
  4
+
  5
+    FBTest.openNewTab(basePath + "html/5448/issue5448.html", function(win)
  6
+    {
  7
+        FBTest.openFirebug();
  8
+        FBTest.enableConsolePanel(function()
  9
+        {
  10
+            FBTest.selectPanel("html");
  11
+
  12
+            FBTest.selectElementInHtmlPanel("content", function(node)
  13
+            {
  14
+                // Execute an expression on the Command Line
  15
+                FBTest.selectPanel("console");
  16
+                var expr = "$0.appendChild(document.createTextNode(' tnode')); $0.normalize();";
  17
+                FBTest.executeCommand(expr);
  18
+
  19
+                // Switch back to the HTML panel
  20
+                FBTest.selectPanel("html");
  21
+
  22
+                // Wait till the executed expression causes HTML panel update.
  23
+                FBTest.waitForHtmlMutation(null, "span", function(node)
  24
+                {
  25
+                    // Verify HTML panel content after mutation.
  26
+                    var expected = /a &aring;&auml;&ouml; b/;
  27
+                    FBTest.compare(expected, node.textContent, "The text content must match");
  28
+
  29
+                    FBTest.testDone("issue5448.DONE");
  30
+                });
  31
+            });
  32
+        });
  33
+    });
  34
+}

0 notes on commit f096395

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