mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 695275 - Add test for ThebesLayer -> ImageLayer conversion. r=roc
This commit is contained in:
parent
7722ff274a
commit
ffe61897e1
@ -65,6 +65,9 @@ _TEST_FILES = \
|
|||||||
border_radius_hit_testing_iframe.html \
|
border_radius_hit_testing_iframe.html \
|
||||||
test_preserve3d_sorting_hit_testing.html \
|
test_preserve3d_sorting_hit_testing.html \
|
||||||
preserve3d_sorting_hit_testing_iframe.html \
|
preserve3d_sorting_hit_testing_iframe.html \
|
||||||
|
test_image_layers.html \
|
||||||
|
image_rgrg-256x256.png \
|
||||||
|
image_rrgg-256x256.png \
|
||||||
bug369950-subframe.xml \
|
bug369950-subframe.xml \
|
||||||
decoration_line_rendering.js \
|
decoration_line_rendering.js \
|
||||||
test_after_paint_pref.html \
|
test_after_paint_pref.html \
|
||||||
|
BIN
layout/base/tests/image_rgrg-256x256.png
Normal file
BIN
layout/base/tests/image_rgrg-256x256.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 131 B |
BIN
layout/base/tests/image_rrgg-256x256.png
Normal file
BIN
layout/base/tests/image_rrgg-256x256.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 120 B |
46
layout/base/tests/test_image_layers.html
Normal file
46
layout/base/tests/test_image_layers.html
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Test that images that are the only item in ThebesLayers get put into ImageLayers</title>
|
||||||
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||||
|
</head>
|
||||||
|
<body onload="changeImage()">
|
||||||
|
<div>
|
||||||
|
<img id="image" src="./image_rgrg-256x256.png" style="-moz-transform: translatex(1px)"></img>
|
||||||
|
</div>
|
||||||
|
<pre id="test">
|
||||||
|
<script type="application/javascript">
|
||||||
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
|
||||||
|
var image = document.getElementById("image");
|
||||||
|
var lastPaintCount;
|
||||||
|
|
||||||
|
function changeImage() {
|
||||||
|
lastPaintCount = window.mozPaintCount;
|
||||||
|
|
||||||
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||||
|
var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
|
||||||
|
getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||||
|
utils.checkAndClearPaintedState(image);
|
||||||
|
|
||||||
|
image.src = "./image_rrgg-256x256.png";
|
||||||
|
checkDone();
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkDone() {
|
||||||
|
if (window.mozPaintCount == lastPaintCount) {
|
||||||
|
setTimeout(checkDone, 30);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||||
|
var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
|
||||||
|
getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||||
|
ok(!utils.checkAndClearPaintedState(image), "Should not paint any thebes layers for our image!");
|
||||||
|
SimpleTest.finish();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</pre>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user