gecko/content/html/document/test/test_bug570376.html
Phil Ringnalda 9a967f7fbd Bug 570376 followup, rename the test file to have the right bug number
--HG--
rename : content/html/document/test/test_bug570375.html => content/html/document/test/test_bug570376.html
2010-07-05 20:02:34 -07:00

45 lines
1.5 KiB
HTML

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=570376
-->
<head>
<title>Test for Bug 570376</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=570376">Mozilla Bug 570376</a>
<p id="display">
<iframe id="testiframe"></iframe>
</p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 570376
Don't crash loading <form><legend> with the html5 parser preffed off.
**/
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var gOriginalHtml5Pref = prefs.getBoolPref("html5.enable");
prefs.setBoolPref("html5.enable", false);
$("testiframe").onload = function () {
ok(true, "Shouldn't crash loading a form containing a legend with the html5 parser preffed off");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
prefs.setBoolPref("html5.enable", gOriginalHtml5Pref);
}
$("testiframe").src = "data:text/html,<form><legend>";
</script>
</pre>
</body>
</html>