gecko/toolkit/content/tests/chrome/test_bug437844.xul

73 lines
2.6 KiB
XML

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet
href="chrome://mochikit/content/tests/SimpleTest/test.css"
type="text/css"?>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=437844
https://bugzilla.mozilla.org/show_bug.cgi?id=348233
-->
<window title="Mozilla Bug 437844 and Bug 348233"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<title>Test for Bug 437844 and Bug 348233</title>
<script type="application/javascript"
src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="RegisterUnregisterChrome.js"></script>
<body xmlns="http://www.w3.org/1999/xhtml">
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=437844">
Mozilla Bug 437844
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=348233">
Mozilla Bug 348233
</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
<script class="testbody" type="application/javascript">
<![CDATA[
/** Test for Bug 437844 and Bug 348233 **/
SimpleTest.waitForExplicitFinish();
let cleanupFunc = registerManifestTemporarily("chrome://mochikit/content/chrome/toolkit/content/tests/chrome/rtlchrome/rtl.manifest");
// Load about:plugins in an iframe
let frame = document.createElement("iframe");
frame.setAttribute("src", "about:plugins");
frame.addEventListener("load", function () {
frame.removeEventListener("load", arguments.callee, false);
is(frame.contentDocument.dir, "rtl", "about:plugins should be RTL in RTL locales");
frame = document.createElement("iframe");
frame.setAttribute("src", convertChromeURI("chrome://mochikit/content/chrome/toolkit/content/tests/chrome/rtlchrome/").spec); // a file:// URI, bug 348233
frame.addEventListener("load", function () {
frame.removeEventListener("load", arguments.callee, false);
is(frame.contentDocument.body.dir, "rtl", "file:// listings should be RTL in RTL locales");
cleanupFunc();
SimpleTest.finish();
}, false);
document.documentElement.appendChild(frame);
}, false);
document.documentElement.appendChild(frame);
]]>
</script>
</window>