gecko/toolkit/content/tests/chrome/test_bug437844.xul
Simon Montagu b49c3ecda7 Test for bug 558403
--HG--
rename : toolkit/content/tests/chrome/bug437844.css => toolkit/content/tests/chrome/rtlchrome/rtl.css
rename : toolkit/content/tests/chrome/bug437844.dtd => toolkit/content/tests/chrome/rtlchrome/rtl.dtd
rename : toolkit/content/tests/chrome/bug437844.manifest => toolkit/content/tests/chrome/rtlchrome/rtl.manifest
2010-04-29 09:08:15 +03:00

74 lines
2.5 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 uri = registerCustomChrome("chrome://mochikit/content/chrome/toolkit/content/tests/chrome/rtlchrome/",
true, true);
// 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", uri.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");
cleanupCustomChrome();
SimpleTest.finish();
}, false);
document.documentElement.appendChild(frame);
}, false);
document.documentElement.appendChild(frame);
]]>
</script>
</window>