зеркало из https://github.com/mozilla/gecko-dev.git
test for bug 807728
--HG-- extra : transplant_source : Y%9F%88%0CW%10Ko3r%1Ej%C2%D3%237%E5%BFu%B1
This commit is contained in:
Родитель
dc32bd1462
Коммит
9888034a13
|
@ -26,4 +26,5 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) =
|
|||
random-if(!haveTestPlugin) == plugin-transform-1.html plugin-transform-1-ref.html
|
||||
fails-if(!haveTestPlugin) == plugin-transform-2.html plugin-transform-2-ref.html
|
||||
skip-if(!haveTestPlugin) == shrink-1.html shrink-1-ref.html
|
||||
skip-if(!haveTestPlugin) == update-1.html update-1-ref.html
|
||||
fails-if(!haveTestPlugin) == windowless-layers.html windowless-layers-ref.html
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<embed id="plugin" type="application/x-test"
|
||||
drawmode="solid" color="FFFF0000" width="30" height="50">
|
||||
</embed>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<title>Test for bug 807728</title>
|
||||
<script>
|
||||
function do_test()
|
||||
{
|
||||
var plugin = document.getElementById("plugin");
|
||||
var color = "FF000000";
|
||||
var color1 = "FF000001";
|
||||
var color2 = "FF000002";
|
||||
var last_paint_count = 0;
|
||||
// Enough paints to test reusing a surface after it has been
|
||||
// moved from front to back buffer.
|
||||
var paints_required = 10;
|
||||
var final_color = "FFFF0000";
|
||||
|
||||
function wait_for_paints() {
|
||||
var paint_count = plugin.getPaintCount();
|
||||
if (paint_count >= paints_required && color == final_color) {
|
||||
document.documentElement.removeAttribute("class");
|
||||
return;
|
||||
}
|
||||
if (paint_count != last_paint_count) {
|
||||
last_paint_count = paint_count;
|
||||
if (paint_count + 1 >= paints_required) {
|
||||
color = final_color;
|
||||
} else if (color != color1) {
|
||||
color = color1;
|
||||
} else {
|
||||
color = color2;
|
||||
}
|
||||
plugin.setColor(color);
|
||||
}
|
||||
setTimeout(wait_for_paints, 0);
|
||||
}
|
||||
|
||||
wait_for_paints();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="do_test()">
|
||||
<embed id="plugin" type="application/x-test"
|
||||
drawmode="solid" color="FF000000" width="30" height="50">
|
||||
</embed>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче