mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
45 lines
1.6 KiB
HTML
45 lines
1.6 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.parser.enable");
|
|
prefs.setBoolPref("html5.parser.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.parser.enable", gOriginalHtml5Pref);
|
|
}
|
|
$("testiframe").src = "data:text/html,<form><legend>";
|
|
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|