mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 21:28:04 +02:00
This excludes dom/, otherwise the file size is too large for phabricator to handle. This is an autogenerated commit to handle scripts loading mochitest harness files, in the simple case where the script src is on the same line as the tag. This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170 using the `--part 2` argument. Differential Revision: https://phabricator.services.mozilla.com/D27456 --HG-- extra : moz-landing-system : lando
58 lines
1.6 KiB
HTML
58 lines
1.6 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test handling plugins invalidating during paint</title>
|
|
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<script type="text/javascript" src="plugin-utils.js"></script>
|
|
<script type="text/javascript">
|
|
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
|
</script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
<style>
|
|
embed { width:200px; height:200px; display:block; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<p id="display"></p>
|
|
<div id="content" style="display: block">
|
|
<embed id="p1" type="application/x-test" drawmode="solid" color="80808080"></embed>
|
|
</div>
|
|
<pre id="test">
|
|
<script class="testbody" type="text/javascript">
|
|
var p1 = document.getElementById("p1");
|
|
var initialPaintCount;
|
|
|
|
function checkEnded() {
|
|
var paints = p1.getPaintCount() - initialPaintCount;
|
|
if (paints > 20) {
|
|
ok(true, "Got " + paints + " paints");
|
|
SimpleTest.finish();
|
|
return;
|
|
}
|
|
|
|
setTimeout(checkEnded, 30);
|
|
}
|
|
|
|
function doTest() {
|
|
initialPaintCount = p1.getPaintCount();
|
|
|
|
// Tell the plugin to invalidate every time it paints
|
|
p1.setInvalidateDuringPaint(true);
|
|
// Trigger an invalidation to get painting started
|
|
p1.setColor("FFFFFFFF");
|
|
// Now we should have an infinite cycle of painting and invalidations.
|
|
|
|
// Poll for more than 20 paints to happen.
|
|
checkEnded();
|
|
}
|
|
|
|
// Need to run 'doTest' after painting is unsuppressed, or we'll set clip
|
|
// regions to empty.
|
|
addLoadEvent(doTest);
|
|
SimpleTest.waitForExplicitFinish();
|
|
SimpleTest.requestFlakyTimeout("untriaged");
|
|
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|