content/base/test/test_bug466751.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/test/test_bug466751.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +<html xmlns="http://www.w3.org/1999/xhtml">
     1.5 +<!--
     1.6 +https://bugzilla.mozilla.org/show_bug.cgi?id=466751
     1.7 +-->
     1.8 +<head>
     1.9 +  <title>Test for Bug 466751</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=466751">Mozilla Bug 466751</a>
    1.15 +<p id="display"></p>
    1.16 +<div id="content" style="display: none">
    1.17 +  <div id="test" />
    1.18 +</div>
    1.19 +<pre id="test">
    1.20 +<script class="testbody" type="text/javascript"><![CDATA[
    1.21 +
    1.22 +/** Test for Bug 466751 **/
    1.23 +
    1.24 +var el = $("test");
    1.25 +var name, message;
    1.26 +
    1.27 +try {
    1.28 +  el.innerHTML = '<div ">bla</div>';
    1.29 +} catch (ex) {
    1.30 +  name = ex.name;
    1.31 +  message = ex.message;
    1.32 +}
    1.33 +
    1.34 +const NS_ERROR_DOM_SYNTAX_ERR = 0x8053000C;
    1.35 +ok(/An invalid or illegal string was specified/.test(message), "threw SyntaxError message");
    1.36 +is(name, "SyntaxError", "threw SyntaxError");
    1.37 +
    1.38 +]]>
    1.39 +</script>
    1.40 +</pre>
    1.41 +</body>
    1.42 +</html>
    1.43 +

mercurial