mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
b=540910 use timeouts in plugin_clipping_helper2 so that the X server processes Xlib requests from the parent before testing requests from the OOP plugin
--HG-- extra : transplant_source : %1Dy%5D%FF%C9%3ED%98%8B%BE%A8%7B%09m%5Cl%0F%9E%E3%FF
This commit is contained in:
parent
e845a6725c
commit
68185e5535
@ -2,8 +2,6 @@
|
||||
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" title="Test Plugin Clipping">
|
||||
<head>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<style>
|
||||
embed { width:200px; height:200px; display:block; }
|
||||
iframe { border:none; }
|
||||
@ -50,6 +48,9 @@ function runTests() {
|
||||
checkClipRegion("p3", [[100, 100, 200, 200]]);
|
||||
checkClipRegion("p4", [[100, 100, 200, 200]]);
|
||||
checkClipRegionForFrame("f1", "p5", [[100, 100, 200, 200]]);
|
||||
|
||||
window.opener.SimpleTest.finish();
|
||||
window.close();
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
|
@ -33,12 +33,12 @@
|
||||
<script class="testbody" type="application/javascript">
|
||||
<![CDATA[
|
||||
var scroll = document.getElementById("scroll");
|
||||
var zbox = document.getElementById("zbox");
|
||||
var sbox = document.getElementById("sbox");
|
||||
var p1 = document.getElementById("p1");
|
||||
var d2 = document.getElementById("d2");
|
||||
|
||||
function runTests() {
|
||||
var zbox = document.getElementById("zbox");
|
||||
var sbox = document.getElementById("sbox");
|
||||
var p1 = document.getElementById("p1");
|
||||
var d2 = document.getElementById("d2");
|
||||
|
||||
checkClipRegion("p1", [[0, 0, 200, 100]]);
|
||||
checkClipRegion("p2", [[0, 0, 200, 50], [0, 50, 50, 150], [150, 50, 200, 150], [0, 150, 200, 200]]);
|
||||
@ -47,15 +47,30 @@ function runTests() {
|
||||
checkClipRegion("p2", [[0, 0, 200, 50], [0, 50, 50, 200], [150, 50, 200, 200]]);
|
||||
|
||||
zbox.style.zIndex = -1;
|
||||
flush();
|
||||
|
||||
// A non-zero timeout is needed on X11 (unless an XSync could be performed)
|
||||
// to delay an OOP plugin's X requests enough so that the X server processes
|
||||
// them after the parent processes requests (for the changes above).
|
||||
setTimeout(part2, 1000);
|
||||
}
|
||||
|
||||
function part2() {
|
||||
checkClipRegion("p2", [[0, 0, 200, 100], [0, 100, 50, 200], [150, 100, 200, 200]]);
|
||||
|
||||
sbox.style.background = "";
|
||||
flush();
|
||||
|
||||
setTimeout(part3, 1000);
|
||||
}
|
||||
|
||||
function part3() {
|
||||
checkClipRegion("p2", [[0, 0, 200, 200]]);
|
||||
|
||||
p1.style.zIndex = 1;
|
||||
flush();
|
||||
|
||||
setTimeout(part4, 1000);
|
||||
}
|
||||
|
||||
function part4() {
|
||||
checkClipRegion("p1", [[0, 0, 200, 200]]);
|
||||
checkClipRegion("p2", [[0, 100, 200, 200]]);
|
||||
|
||||
@ -64,18 +79,17 @@ function runTests() {
|
||||
zbox.style.zIndex = 1;
|
||||
zbox.style.top = "50.3px;"
|
||||
d2.style.top = "100.3px";
|
||||
flush();
|
||||
checkClipRegionNoBounds("p2", [[0, 0, 200, 50], [0, 50, 50, 150], [150, 50, 200, 150], [0, 150, 200, 200]]);
|
||||
|
||||
setTimeout(done, 1000);
|
||||
}
|
||||
|
||||
function flush() {
|
||||
// This function is for X11 to flush the Xlib request queue. It takes
|
||||
// advantage of the current scrolling implementation, which will do this for
|
||||
// us. Beware though, it does not wait for the X server to process the
|
||||
// events.
|
||||
++scroll.scrollTop;
|
||||
--scroll.scrollTop;
|
||||
function done() {
|
||||
checkClipRegionNoBounds("p2", [[0, 0, 200, 50], [0, 50, 50, 150], [150, 50, 200, 150], [0, 150, 200, 200]]);
|
||||
|
||||
window.opener.SimpleTest.finish();
|
||||
window.close();
|
||||
}
|
||||
|
||||
]]>
|
||||
</script>
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" title="Test Plugin Clipping: Plugins and Tables">
|
||||
<head>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<style>
|
||||
embed { width:300px; height:200px; display:block; }
|
||||
</style>
|
||||
@ -34,6 +32,9 @@ function runTests() {
|
||||
checkClipRegion("p1", [[0, 0, 300, 100]]);
|
||||
// p2 is partially covered by a table with an opaque background
|
||||
checkClipRegion("p2", [[0, 0, 300, 100]]);
|
||||
|
||||
window.opener.SimpleTest.finish();
|
||||
window.close();
|
||||
}
|
||||
|
||||
]]>
|
||||
|
@ -2,8 +2,6 @@
|
||||
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" title="Test Plugin Clipping: Plugins in Transforms">
|
||||
<head>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<style>
|
||||
embed { width:300px; height:200px; display:block; }
|
||||
</style>
|
||||
@ -33,6 +31,9 @@ function runTests() {
|
||||
// p1 and p2 are both in a transformed context so they should be hidden.
|
||||
checkClipRegionNoBounds("p1", []);
|
||||
checkClipRegionNoBounds("p2", []);
|
||||
|
||||
window.opener.SimpleTest.finish();
|
||||
window.close();
|
||||
}
|
||||
|
||||
]]>
|
||||
|
@ -153,9 +153,6 @@ function loaded() {
|
||||
|
||||
// Run actual test code
|
||||
runTests();
|
||||
|
||||
finish();
|
||||
window.close();
|
||||
}
|
||||
|
||||
// Need to run 'loaded' after painting is unsuppressed, or we'll set clip
|
||||
|
Loading…
Reference in New Issue
Block a user