mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
51 lines
1.4 KiB
HTML
51 lines
1.4 KiB
HTML
|
<!DOCTYPE HTML>
|
||
|
<html>
|
||
|
<!--
|
||
|
https://bugzilla.mozilla.org/show_bug.cgi?id=512435
|
||
|
-->
|
||
|
<head>
|
||
|
<title>Test for Bug 512435</title>
|
||
|
<script type="application/javascript" src="/MochiKit/MochiKit.js"></script>
|
||
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||
|
<script type="text/javascript" src="/tests/modules/libpr0n/test/mochitest/imgutils.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=512435">Mozilla Bug 512435</a>
|
||
|
<img id="img_a">
|
||
|
<img id="img_b">
|
||
|
</div>
|
||
|
<pre id="test">
|
||
|
<script type="application/javascript">
|
||
|
|
||
|
// Boilerplate
|
||
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||
|
const Ci = Components.interfaces;
|
||
|
const Cc = Components.classes;
|
||
|
SimpleTest.waitForExplicitFinish();
|
||
|
|
||
|
// We're relying on very particular behavior for certain images - clear the
|
||
|
// image cache, _then_ set src
|
||
|
clearImageCache();
|
||
|
document.getElementById("img_a").src = "damon.jpg";
|
||
|
document.getElementById("img_b").src = "shaver.png";
|
||
|
|
||
|
// Our handler
|
||
|
function loadHandler() {
|
||
|
|
||
|
// The two images should be decoded
|
||
|
ok(isFrameDecoded("img_a"), "img_a should be decoded before onload fires");
|
||
|
ok(isFrameDecoded("img_b"), "img_b should be decoded before onload fires");
|
||
|
|
||
|
// All done
|
||
|
SimpleTest.finish();
|
||
|
}
|
||
|
|
||
|
// Set our onload handler
|
||
|
window.onload = loadHandler;
|
||
|
|
||
|
</script>
|
||
|
</pre>
|
||
|
</body>
|
||
|
</html>
|