mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00

This is an autogenerated commit to handle scripts loading mochitest harness files, in the case where the script src is on the line below the script tag. This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170 using the `--part 3` argument. Differential Revision: https://phabricator.services.mozilla.com/D27458 --HG-- extra : moz-landing-system : lando
60 lines
1.5 KiB
HTML
60 lines
1.5 KiB
HTML
<html>
|
|
<head>
|
|
<title>Test for plugin child widgets not being messed up by scrolling</title>
|
|
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
|
<script type="text/javascript" src="utils.js"></script>
|
|
<link rel="stylesheet" type="text/css"
|
|
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
|
</head>
|
|
<body onload="setTimeout(runTests, 0)">
|
|
<script type="application/javascript">
|
|
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
|
</script>
|
|
|
|
<p id="display">
|
|
<div style="overflow:hidden; height:100px;" id="scroll">
|
|
<embed type="application/x-test" wmode="window" width="100" height="800" id="plugin"></object>
|
|
<div style="height:1000px;"></div>
|
|
</div>
|
|
</p>
|
|
<div id="content" style="display: none">
|
|
|
|
</div>
|
|
<pre id="test">
|
|
</pre>
|
|
|
|
<script class="testbody" type="application/javascript">
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
var plugin = document.getElementById("plugin");
|
|
|
|
function consistencyCheck(state) {
|
|
var s = plugin.doInternalConsistencyCheck();
|
|
ok(s == "", "Consistency check: " + state + ": " + s);
|
|
}
|
|
|
|
function runTests() {
|
|
consistencyCheck("Initial state");
|
|
|
|
var scroll = document.getElementById("scroll");
|
|
scroll.scrollTop = 10;
|
|
consistencyCheck("Scrolled down a bit");
|
|
|
|
setTimeout(function() {
|
|
consistencyCheck("Before scrolling back to top");
|
|
scroll.scrollTop = 0;
|
|
consistencyCheck("Scrolled to top");
|
|
|
|
setTimeout(function() {
|
|
consistencyCheck("After scrolling to top");
|
|
|
|
SimpleTest.finish();
|
|
}, 0);
|
|
}, 0);
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|