1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/test/test_bug545644.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.6 +<!-- 1.7 +--> 1.8 +<head> 1.9 + <title>Test for XHTML serializer + innerHtml, bug 545644</title> 1.10 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.11 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.12 +</head> 1.13 +<body> 1.14 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=545644">Mozilla Bug </a> 1.15 +<p id="display"></p> 1.16 + 1.17 +<pre id="test"> 1.18 +<script class="testbody" type="text/javascript"> 1.19 + 1.20 +function testInner () { 1.21 + var div = document.getElementById("test_inner"); 1.22 + 1.23 + try { 1.24 + div.innerHTML = "some \u00A0 &nbsp; text"; 1.25 + ok(false, "innerHTML in xhtml", "test failed, no exception by the parser when giving an unexpected entity"+e); 1.26 + } catch (e) { 1.27 + ok (true, "innerHTML in xhtml", "test ok"); 1.28 + } 1.29 + 1.30 + try { 1.31 + div.innerHTML = "some \u00A0 text"; 1.32 + div.innerHTML += "!"; 1.33 + ok (true, "innerHTML in xhtml", "test ok"); 1.34 + } catch (e) { 1.35 + ok(false, "innerHTML in xhtml", "test failed, unexpected exception "+e); 1.36 + } 1.37 + 1.38 + SimpleTest.finish(); 1.39 +} 1.40 + 1.41 + 1.42 +SimpleTest.waitForExplicitFinish(); 1.43 + 1.44 +addLoadEvent(testInner); 1.45 + 1.46 +</script> 1.47 +</pre> 1.48 +<div id="test_inner"></div> 1.49 +</body> 1.50 +</html> 1.51 + 1.52 +