diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/plugins/test/reftest | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/plugins/test/reftest')
42 files changed, 1002 insertions, 0 deletions
diff --git a/dom/plugins/test/reftest/border-padding-1-ref.html b/dom/plugins/test/reftest/border-padding-1-ref.html new file mode 100644 index 000000000..1a33644ac --- /dev/null +++ b/dom/plugins/test/reftest/border-padding-1-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> +<body style="margin:0"> +<div style="width:184px; height:192px; margin:90px 80px; outline:5px dashed blue; + border:dotted black; border-width:4px 8px 4px 8px; + background:cyan;"> + <div style="margin:3px 1px; height:186px; background:lime;"></div> +</div> +</body> +</html> diff --git a/dom/plugins/test/reftest/border-padding-1.html b/dom/plugins/test/reftest/border-padding-1.html new file mode 100644 index 000000000..6fa2446f4 --- /dev/null +++ b/dom/plugins/test/reftest/border-padding-1.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<script src="utils.js"> +</script> +</head> +<body style="margin:0" onLoad="forceLoadPlugin('p1')"> +<object type="application/x-test" drawmode="solid" color="ff00ff00" + style="width:200px; height:200px; display:block; margin:90px 80px; + outline:5px dashed blue; + background:cyan; + border:dotted black; border-width:4px 8px 4px 8px; + padding:3px 1px;" id="p1"> +</object> +</body> +</html> diff --git a/dom/plugins/test/reftest/border-padding-2-ref.html b/dom/plugins/test/reftest/border-padding-2-ref.html new file mode 100644 index 000000000..ae92da403 --- /dev/null +++ b/dom/plugins/test/reftest/border-padding-2-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<script src="utils.js"> +</script> +</head> +<body style="margin:0" onLoad="forceLoadPlugin('plugin')"> +<div style="width:184px; height:192px; margin:90px 80px; outline:5px dashed blue; + border:dotted black; border-width:4px 8px 4px 8px; + background:cyan;"> + <object style="margin:3px 1px; height:186px; width:182px; display:block;" + type="application/x-test" + id="plugin"> + </object> +</div> +</body> +</html> diff --git a/dom/plugins/test/reftest/border-padding-2.html b/dom/plugins/test/reftest/border-padding-2.html new file mode 100644 index 000000000..6a39d2d81 --- /dev/null +++ b/dom/plugins/test/reftest/border-padding-2.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<script src="utils.js"> +</script> +</head> +<body style="margin:0" onLoad="forceLoadPlugin('plugin')"> +<object type="application/x-test" + style="width:200px; height:200px; display:block; margin:90px 80px; + outline:5px dashed blue; + background:cyan; + border:dotted black; border-width:4px 8px 4px 8px; + padding:3px 1px;" + id="plugin"> +</object> +</body> +</html> diff --git a/dom/plugins/test/reftest/border-padding-3-ref.html b/dom/plugins/test/reftest/border-padding-3-ref.html new file mode 100644 index 000000000..5c7bb7456 --- /dev/null +++ b/dom/plugins/test/reftest/border-padding-3-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> +<body style="margin:0"> +<div style="width:184px; height:192px; margin:90px 80px; outline:5px dashed blue; + border:dotted black; border-width:4px 8px 4px 8px; + background:cyan;"> + <div style="margin:3px 1px; height:186px; width:182px; background:rgb(255,128,255);"></object> +</div> +</body> +</html> diff --git a/dom/plugins/test/reftest/border-padding-3.html b/dom/plugins/test/reftest/border-padding-3.html new file mode 100644 index 000000000..533445601 --- /dev/null +++ b/dom/plugins/test/reftest/border-padding-3.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<script src="utils.js"> +</script> +</head> +<body style="margin:0" onLoad="forceLoadPlugin('plugin', true)"> +<object type="application/x-test" id="plugin" + drawmode="solid" color="00000000" + style="width:200px; height:200px; display:block; margin:90px 80px; + outline:5px dashed blue; + background:cyan; + border:dotted black; border-width:4px 8px 4px 8px; + padding:3px 1px;"> +</object> +<script> +var prevPaintCount = 0; +function doTestWait() { + if (document.getElementById("plugin").getPaintCount() != prevPaintCount) { + document.documentElement.removeAttribute('class'); + } else { + setTimeout(doTestWait, 0); + } +} + +function doTest() { + prevPaintCount = document.getElementById("plugin").getPaintCount(); + document.getElementById("plugin").setColor("FFFF80FF"); + setTimeout(doTestWait, 0); + +} +window.addEventListener("MozReftestInvalidate", doTest, false); +</script> +</body> +</html> diff --git a/dom/plugins/test/reftest/div-alpha-opacity.html b/dom/plugins/test/reftest/div-alpha-opacity.html new file mode 100644 index 000000000..fec913b64 --- /dev/null +++ b/dom/plugins/test/reftest/div-alpha-opacity.html @@ -0,0 +1,28 @@ +<!doctype html> +<html> +<head> +<style type="text/css"> +#one { + position:absolute; + left:0px; top:0px; + width:400px; height:400px; + border:2px solid blue; + background-color: rgb(160,160,160); + opacity:0.8; + z-index:1; +} +#two { + position:absolute; + top:100px; left:100px; + width:200px; height:200px; + z-index:0; + background-color: rgb(255,0,0); +} +</style> +</head> +<body> +<div id="two"></div> +<div id="one"></div> +</body> +</html> + diff --git a/dom/plugins/test/reftest/div-alpha-zindex.html b/dom/plugins/test/reftest/div-alpha-zindex.html new file mode 100644 index 000000000..e4672b913 --- /dev/null +++ b/dom/plugins/test/reftest/div-alpha-zindex.html @@ -0,0 +1,27 @@ +<!doctype html> +<html> +<head> +<style type="text/css"> +#one { + position:absolute; + left:0px; top:0px; + width:400px; height:400px; + background-color: rgb(0,255,0); + opacity:0.6; + z-index:1; +} +#two { + position:absolute; + top:100px; left:100px; + width:200px; height:200px; + z-index:0; + background-color: rgb(255,0,0); +} +</style> +</head> +<body> +<div id="two"></div> +<div id="one"></div> +</body> +</html> + diff --git a/dom/plugins/test/reftest/div-sanity.html b/dom/plugins/test/reftest/div-sanity.html new file mode 100644 index 000000000..9ffa53919 --- /dev/null +++ b/dom/plugins/test/reftest/div-sanity.html @@ -0,0 +1,17 @@ +<!doctype html> +<html><head> +<title>div boxes</title> +<style> +div { + width: 400px; + height: 400px; + display: inline-block; +} +</style> +</head> +<body> +<div style="background-color: #FF0000;"></div> <!-- red --> +<div style="background-color: #00FF00;"></div> <!-- green --> +<div style="background-color: #0000FF;"></div> <!-- blue --> +<div style="background-color: #999999;"></div> <!-- gray --> +</body></html> diff --git a/dom/plugins/test/reftest/plugin-alpha-opacity.html b/dom/plugins/test/reftest/plugin-alpha-opacity.html new file mode 100644 index 000000000..2db6cc4de --- /dev/null +++ b/dom/plugins/test/reftest/plugin-alpha-opacity.html @@ -0,0 +1,29 @@ +<!doctype html> +<html class="reftest-wait"> +<head> +<style type="text/css"> +#one { + position:absolute; + left:0px; top:0px; + width:404px; height:404px; + border:2px solid blue; + opacity:.8; + z-index:1; +} +#two { + position:absolute; + top:100px; left:100px; + width:200px; height:200px; + z-index:0; + background-color: rgb(255,0,0); +} +</style> +<script src="utils.js"> +</script> +</head> +<body onLoad="forceLoadPlugin('one')"> +<div id="two"></div> +<embed id="one" type="application/x-test" width="400" height="400" drawmode="solid" color="FFa0a0a0"></embed> +</body> +</html> + diff --git a/dom/plugins/test/reftest/plugin-alpha-zindex.html b/dom/plugins/test/reftest/plugin-alpha-zindex.html new file mode 100644 index 000000000..ead9b6f4c --- /dev/null +++ b/dom/plugins/test/reftest/plugin-alpha-zindex.html @@ -0,0 +1,26 @@ +<!doctype html> +<html class="reftest-wait"> +<head> +<style type="text/css"> +#one { + position:absolute; + left:0px; top:0px; + z-index:1; +} +#two { + position:absolute; + top:100px; left:100px; + width:200px; height:200px; + z-index:0; + background-color: rgb(255,0,0); +} +</style> +<script src="utils.js"> +</script> +</head> +<body onLoad="forceLoadPlugin('one')"> +<div id="two"></div> +<embed id="one" type="application/x-test" width="400" height="400" drawmode="solid" color="9900FF00" id="p1"></embed> +</body> +</html> + diff --git a/dom/plugins/test/reftest/plugin-background-1-step.html b/dom/plugins/test/reftest/plugin-background-1-step.html new file mode 100644 index 000000000..9498633b4 --- /dev/null +++ b/dom/plugins/test/reftest/plugin-background-1-step.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> + <link rel="stylesheet" type="text/css" href="plugin-background.css"></link> + <script type="text/javascript"> +var NUM_STEPS = 1; + </script> + <script type="text/javascript" src="plugin-background.js"></script> +</head> +<body> + <div id="bad">Test some plugin stuff.</div> + <div id="good"></div> + + <embed id="plugin" type="application/x-test" width="199" height="199" + drawmode="solid" color="330000FF"></embed> + + <div id="topbar"></div> + <div id="leftbar"></div> + <div id="rightbar"></div> + <div id="bottombar"></div> +</body> +</html> diff --git a/dom/plugins/test/reftest/plugin-background-10-step.html b/dom/plugins/test/reftest/plugin-background-10-step.html new file mode 100644 index 000000000..7a0824a56 --- /dev/null +++ b/dom/plugins/test/reftest/plugin-background-10-step.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> + <link rel="stylesheet" type="text/css" href="plugin-background.css"></link> + <script type="text/javascript"> +var NUM_STEPS = 10; + </script> + <script type="text/javascript" src="plugin-background.js"></script> +</head> +<body> + <div id="bad">Test some plugin stuff.</div> + <div id="good"></div> + + <embed id="plugin" type="application/x-test" width="199" height="199" + drawmode="solid" color="330000FF"></embed> + + <div id="topbar"></div> + <div id="leftbar"></div> + <div id="rightbar"></div> + <div id="bottombar"></div> +</body> +</html> diff --git a/dom/plugins/test/reftest/plugin-background-2-step.html b/dom/plugins/test/reftest/plugin-background-2-step.html new file mode 100644 index 000000000..cc186a5f2 --- /dev/null +++ b/dom/plugins/test/reftest/plugin-background-2-step.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> + <link rel="stylesheet" type="text/css" href="plugin-background.css"></link> + <script type="text/javascript"> +var NUM_STEPS = 2; + </script> + <script type="text/javascript" src="plugin-background.js"></script> +</head> +<body> + <div id="bad">Test some plugin stuff.</div> + <div id="good"></div> + + <embed id="plugin" type="application/x-test" width="199" height="199" + drawmode="solid" color="330000FF"></embed> + + <div id="topbar"></div> + <div id="leftbar"></div> + <div id="rightbar"></div> + <div id="bottombar"></div> +</body> +</html> diff --git a/dom/plugins/test/reftest/plugin-background-5-step.html b/dom/plugins/test/reftest/plugin-background-5-step.html new file mode 100644 index 000000000..2630719c8 --- /dev/null +++ b/dom/plugins/test/reftest/plugin-background-5-step.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> + <link rel="stylesheet" type="text/css" href="plugin-background.css"></link> + <script type="text/javascript"> +var NUM_STEPS = 5; + </script> + <script type="text/javascript" src="plugin-background.js"></script> +</head> +<body> + <div id="bad">Test some plugin stuff.</div> + <div id="good"></div> + + <embed id="plugin" type="application/x-test" width="199" height="199" + drawmode="solid" color="330000FF"></embed> + + <div id="topbar"></div> + <div id="leftbar"></div> + <div id="rightbar"></div> + <div id="bottombar"></div> +</body> +</html> diff --git a/dom/plugins/test/reftest/plugin-background-ref.html b/dom/plugins/test/reftest/plugin-background-ref.html new file mode 100644 index 000000000..651fdecef --- /dev/null +++ b/dom/plugins/test/reftest/plugin-background-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> + <link rel="stylesheet" type="text/css" href="plugin-background.css"></link> +</head> +<body> + <div id="bad">Test some plugin stuff.</div> + <div id="good"></div> + + <div id="plugin"></div> + + <div id="topbar"></div> + <div id="leftbar"></div> + <div id="rightbar"></div> + <div id="bottombar"></div> +</body> +</html> diff --git a/dom/plugins/test/reftest/plugin-background.css b/dom/plugins/test/reftest/plugin-background.css new file mode 100644 index 000000000..f6b251214 --- /dev/null +++ b/dom/plugins/test/reftest/plugin-background.css @@ -0,0 +1,61 @@ +div { + position: absolute; +} +#bad { + left:220px; top:0px; + z-index: 0; +} +#good { + left:0px; top:0px; + width:220px; height:220px; + /* Core Animation alpha blending rounding differs + from the Core Graphics blending, adjust with care */ + background-color: rgba(0,255,0, 0.51); + z-index: 0; +} + +#topbar { + left:0px; top:0px; + width:220px; height:20px; + background-color: rgb(0,0,0); + z-index: 2; +} +#topbar { + left:0px; top:0px; + width:220px; height:20px; + background-color: rgb(0,0,0); + z-index: 2; +} +#leftbar { + left:0px; top:0px; + width:20px; height:220px; + background-color: rgb(0,0,0); + z-index: 2; +} +#rightbar { + left:200px; top:0px; + width:20px; height:220px; + background-color: rgb(0,0,0); + z-index: 2; +} +#bottombar { + left:0px; top:200px; + width:220px; height:20px; + background-color: rgb(0,0,0); + z-index: 2; +} + +div#plugin { + position: absolute; + left:1px; top:1px; + width:199px; height:199px; + background-color: rgba(0,0,255, 0.2); + z-index: 1; +} + +embed#plugin { + position: absolute; + left:1px; top:1px; + z-index: 1; +} + diff --git a/dom/plugins/test/reftest/plugin-background.html b/dom/plugins/test/reftest/plugin-background.html new file mode 100644 index 000000000..4cd1e3f53 --- /dev/null +++ b/dom/plugins/test/reftest/plugin-background.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> + <link rel="stylesheet" type="text/css" href="plugin-background.css"></link> +</head> +<script src="utils.js"> +</script> +<body onLoad="forceLoadPlugin('plugin')"> + <div id="bad">Test some plugin stuff.</div> + <div id="good"></div> + + <embed id="plugin" type="application/x-test" width="199" height="199" + drawmode="solid" color="330000FF"></embed> + + <div id="topbar"></div> + <div id="leftbar"></div> + <div id="rightbar"></div> + <div id="bottombar"></div> +</body> +</html> diff --git a/dom/plugins/test/reftest/plugin-background.js b/dom/plugins/test/reftest/plugin-background.js new file mode 100644 index 000000000..5d24562cf --- /dev/null +++ b/dom/plugins/test/reftest/plugin-background.js @@ -0,0 +1,75 @@ +// The including script sets this for us +//var NUM_STEPS; + +var plugin; +var left = 1, top = 1, width = 199, height = 199; +function movePluginTo(x, y, w, h) { + left = x; top = y; width = w; height = h; + plugin.width = w; + plugin.height = h; + plugin.style.left = left + "px"; + plugin.style.top = top + "px"; +} +function deltaInBounds(dx,dy, dw,dh) { + var l = dx + left; + var r = l + width + dw; + var t = dy + top; + var b = t + height + dh; + return (0 <= l && l <= 20 && + 0 <= t && t <= 20 && + 200 <= r && r <= 220 && + 200 <= b && b <= 220); +} + +var initialFrame; +function start() { + window.removeEventListener("MozReftestInvalidate", start, false); + + window.addEventListener("MozAfterPaint", step, false); + window.addEventListener("MozPaintWaitFinished", step, false); + + initialFrame = window.mozPaintCount; + plugin = document.getElementById("plugin"); + + movePluginTo(0,0, 200,200); +} + +var steps = 0; +var which = "move"; // or "grow" +var dx = 1, dy = 1, dw = 1, dh = 1; +function step() { + if (++steps >= NUM_STEPS) { + window.removeEventListener("MozAfterPaint", step, false); + window.removeEventListener("MozPaintWaitFinished", step, false); + return finish(); + } + + var didSomething = false; + if (which == "grow") { + if (deltaInBounds(0,0, dw,dh)) { + movePluginTo(left,top, width+dw, height+dh); + didSomething = true; + } else { + dw = -dw; dh = -dh; + } + } else { + // "move" + if (deltaInBounds(dx,dy, 0,0)) { + movePluginTo(left+dx,top+dy, width, height); + didSomething = true; + } else { + dx = -dx; dy = -dy; + } + } + which = (which == "grow") ? "move" : "grow"; + + if (!didSomething) { + step(); + } +} + +function finish() { + document.documentElement.removeAttribute("class"); +} + +window.addEventListener("MozReftestInvalidate", start, false); diff --git a/dom/plugins/test/reftest/plugin-busy-alpha-zindex.html b/dom/plugins/test/reftest/plugin-busy-alpha-zindex.html new file mode 100644 index 000000000..e339dd266 --- /dev/null +++ b/dom/plugins/test/reftest/plugin-busy-alpha-zindex.html @@ -0,0 +1,56 @@ +<!doctype html> +<html class="reftest-wait"> +<head> + <style type="text/css"> +#one { + position:absolute; + left:0px; top:0px; + z-index:4; +} +#two { + position:absolute; + top:100px; left:100px; + background-color:rgb(0,0,0,0); + z-index:3; +} +#three { + position:absolute; + left:100px; top:100px; + width:200px; height:200px; + background-color: rgb(255,0,0); + opacity:0.6; + z-index:2; +} +#four { + position:absolute; + top:100px; left:100px; + z-index:1; +} + </style> + <script src="utils.js" type="text/javascript"> + </script> + <script type="text/javascript"> +function paintCanvas() { + var canvas = document.getElementById("two"); + var ctx = canvas.getContext("2d"); + ctx.fillStyle = "rgba(255,0,0, 0.6)"; + ctx.fillRect(0,0, 200,200); +} + + function doTest() { + paintCanvas(); + forceLoadPlugin(['one', 'four']); + } + </script> +</style> +</head> +<body onload="doTest();"> + <embed id="four" type="application/x-test" width="200" height="200" + drawmode="solid" color="FFFF0000"></embed> + <div id="three"></div> + <canvas id="two" width="200" height="200"></canvas> + <embed id="one" type="application/x-test" width="400" height="400" + drawmode="solid" color="9900FF00"></embed> +</body> +</html> + diff --git a/dom/plugins/test/reftest/plugin-canvas-alpha-zindex.html b/dom/plugins/test/reftest/plugin-canvas-alpha-zindex.html new file mode 100644 index 000000000..517099d1b --- /dev/null +++ b/dom/plugins/test/reftest/plugin-canvas-alpha-zindex.html @@ -0,0 +1,41 @@ +<!doctype html> +<html class="reftest-wait"> +<head> + <style type="text/css"> +#one { + position:absolute; + left:0px; top:0px; + z-index:1; +} +#two { + position:absolute; + top:100px; left:100px; +// Set these using the canvas API +// width:200px; height:200px; +// background-color: rgb(255,0,0); + z-index:0; +} + </style> + <script src="utils.js" type="text/javascript"> + </script> + <script type="text/javascript"> +function paintCanvas() { + var canvas = document.getElementById("two"); + var ctx = canvas.getContext("2d"); + ctx.fillStyle = "rgb(255,0,0)"; + ctx.fillRect(0,0, 200,200); +} + + function doTest() { + paintCanvas(); + forceLoadPlugin('one'); + } + </script> +</style> +</head> +<body onload="doTest()"> + <canvas width="200" height="200" id="two"></canvas> + <embed id="one" type="application/x-test" width="400" height="400" drawmode="solid" color="9900FF00"></embed> +</body> +</html> + diff --git a/dom/plugins/test/reftest/plugin-sanity.html b/dom/plugins/test/reftest/plugin-sanity.html new file mode 100644 index 000000000..4f9c30eee --- /dev/null +++ b/dom/plugins/test/reftest/plugin-sanity.html @@ -0,0 +1,13 @@ +<!doctype html> +<html class="reftest-wait"> +<head> +<title>Plugin boxes</title> +<script src="utils.js"> +</script> +</head> +<body onLoad="forceLoadPlugin(['p1', 'p2', 'p3', 'p4'])"> +<embed type="application/x-test" width="400" height="400" drawmode="solid" color="FFFF0000" id="p1"></embed> <!-- red --> +<embed type="application/x-test" width="400" height="400" drawmode="solid" color="FF00FF00" id="p2"></embed> <!-- green --> +<embed type="application/x-test" width="400" height="400" drawmode="solid" color="FF0000FF" id="p3"></embed> <!-- blue --> +<embed type="application/x-test" width="400" height="400" drawmode="solid" color="FF999999" id="p4"></embed> <!-- gray --> +</body></html> diff --git a/dom/plugins/test/reftest/plugin-transform-1-ref.html b/dom/plugins/test/reftest/plugin-transform-1-ref.html new file mode 100644 index 000000000..259a78b41 --- /dev/null +++ b/dom/plugins/test/reftest/plugin-transform-1-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<script src="utils.js">
+</script>
+</head>
+<body onLoad="forceLoadPlugin('p')">
+<embed type="application/x-test" id="p"></embed>
+</body>
+</html>
diff --git a/dom/plugins/test/reftest/plugin-transform-1.html b/dom/plugins/test/reftest/plugin-transform-1.html new file mode 100644 index 000000000..19f6e8c20 --- /dev/null +++ b/dom/plugins/test/reftest/plugin-transform-1.html @@ -0,0 +1,10 @@ +<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<script src="utils.js">
+</script>
+</head>
+<body onLoad="forceLoadPlugin('p')">
+<embed type="application/x-test" style="-moz-transform:scale(1)" id="p"></embed>
+</body>
+</html>
diff --git a/dom/plugins/test/reftest/plugin-transform-2-ref.html b/dom/plugins/test/reftest/plugin-transform-2-ref.html new file mode 100644 index 000000000..93a3924d7 --- /dev/null +++ b/dom/plugins/test/reftest/plugin-transform-2-ref.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML>
+<html>
+<body>
+<div style="width:100px; height:100px; -moz-transform-origin:top left;
+ -moz-transform:scale(2); background:rgb(0,255,0)"></embed>
+</body>
+</html>
diff --git a/dom/plugins/test/reftest/plugin-transform-2.html b/dom/plugins/test/reftest/plugin-transform-2.html new file mode 100644 index 000000000..7f48640c1 --- /dev/null +++ b/dom/plugins/test/reftest/plugin-transform-2.html @@ -0,0 +1,13 @@ +<!DOCTYPE HTML>
+<html class="reftest-wait">
+<head>
+<script src="utils.js">
+</script>
+</head>
+<body onLoad="forceLoadPlugin('one')">
+<embed type="application/x-test" drawmode="solid" color="FF00FF00"
+ style="width:100px; height:100px; -moz-transform-origin:top left;
+ -moz-transform:scale(2); display:block"
+ id="one"></embed>
+</body>
+</html>
diff --git a/dom/plugins/test/reftest/plugin-transform-alpha-zindex.html b/dom/plugins/test/reftest/plugin-transform-alpha-zindex.html new file mode 100644 index 000000000..52fda4bcf --- /dev/null +++ b/dom/plugins/test/reftest/plugin-transform-alpha-zindex.html @@ -0,0 +1,28 @@ +<!doctype html> +<html class="reftest-wait"> +<head> +<style type="text/css"> +#one { + position:absolute; + left:0px; top:0px; + z-index:1; +} +#two { + position:absolute; + top:0px; left:0px; + width:200px; height:200px; + z-index:0; + background-color: rgb(255,0,0); + -moz-transform-origin: 0 0; + -moz-transform: translate(100px,100px); +} +</style> +<script src="utils.js"> +</script> +</head> +<body onLoad="forceLoadPlugin('one')"> + <div id="two"></div> + <embed id="one" type="application/x-test" width="400" height="400" drawmode="solid" color="9900FF00"></embed> +</body> +</html> + diff --git a/dom/plugins/test/reftest/pluginproblemui-direction-1-ref.html b/dom/plugins/test/reftest/pluginproblemui-direction-1-ref.html new file mode 100644 index 000000000..fafec34f4 --- /dev/null +++ b/dom/plugins/test/reftest/pluginproblemui-direction-1-ref.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html class="reftest-expect-process-crash reftest-wait"> + <head> + <title>Plugin Problem UI directionality test</title> + </head> + <body dir="ltr" style="text-align: left;"> + <embed type="application/x-test" width="400" height="400" id="crashme"></embed> + <script type="text/javascript"> + var plugin = document.getElementById("crashme"); + function checkForCrashUI() { + if (getComputedStyle(plugin, null).MozBinding != "none") { + document.documentElement.classList.remove("reftest-wait"); + clearInterval(interval); + } + } + + var interval = setInterval(checkForCrashUI, 100); + setTimeout(function() { plugin.crash(); }, 0); + </script> + </body> +</html> diff --git a/dom/plugins/test/reftest/pluginproblemui-direction-1.html b/dom/plugins/test/reftest/pluginproblemui-direction-1.html new file mode 100644 index 000000000..9888850dc --- /dev/null +++ b/dom/plugins/test/reftest/pluginproblemui-direction-1.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html class="reftest-expect-process-crash reftest-wait"> + <head> + <title>Plugin Problem UI directionality test</title> + </head> + <body dir="rtl" style="text-align: left;"> + <embed type="application/x-test" width="400" height="400" id="crashme"></embed> + <script type="text/javascript"> + var plugin = document.getElementById("crashme"); + function checkForCrashUI() { + if (getComputedStyle(plugin, null).MozBinding != "none") { + document.documentElement.classList.remove("reftest-wait"); + clearInterval(interval); + } + } + + var interval = setInterval(checkForCrashUI, 100); + setTimeout(function() { plugin.crash(); }, 0); + </script> + </body> +</html> diff --git a/dom/plugins/test/reftest/pluginproblemui-direction-2-ref.html b/dom/plugins/test/reftest/pluginproblemui-direction-2-ref.html new file mode 100644 index 000000000..e807b86b5 --- /dev/null +++ b/dom/plugins/test/reftest/pluginproblemui-direction-2-ref.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html class="reftest-expect-process-crash reftest-wait"> + <head> + <title>Plugin Problem UI directionality test</title> + </head> + <body dir="ltr" style="text-align: left;"> + <!-- a variant of pluginproblemui-direction-1.html that covers up + the spot where we get random variation with d2d, so that we + can still test it with d2d --> + <div style="position: absolute; width: 1px; height: 1px; background: red; z-index: 1; left: 401px; top: 19px;"></div> + <embed type="application/x-test" width="400" height="400" id="crashme"></embed> + <script type="text/javascript"> + var plugin = document.getElementById("crashme"); + function checkForCrashUI() { + if (getComputedStyle(plugin, null).MozBinding != "none") { + document.documentElement.classList.remove("reftest-wait"); + clearInterval(interval); + } + } + + var interval = setInterval(checkForCrashUI, 100); + setTimeout(function() { plugin.crash(); }, 0); + </script> + </body> +</html> diff --git a/dom/plugins/test/reftest/pluginproblemui-direction-2.html b/dom/plugins/test/reftest/pluginproblemui-direction-2.html new file mode 100644 index 000000000..95b358e37 --- /dev/null +++ b/dom/plugins/test/reftest/pluginproblemui-direction-2.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html class="reftest-expect-process-crash reftest-wait"> + <head> + <title>Plugin Problem UI directionality test</title> + </head> + <body dir="rtl" style="text-align: left;"> + <!-- a variant of pluginproblemui-direction-1.html that covers up + the spot where we get random variation with d2d, so that we + can still test it with d2d --> + <div style="position: absolute; width: 1px; height: 1px; background: red; z-index: 1; left: 401px; top: 19px;"></div> + <embed type="application/x-test" width="400" height="400" id="crashme"></embed> + <script type="text/javascript"> + var plugin = document.getElementById("crashme"); + function checkForCrashUI() { + if (getComputedStyle(plugin, null).MozBinding != "none") { + document.documentElement.classList.remove("reftest-wait"); + clearInterval(interval); + } + } + + var interval = setInterval(checkForCrashUI, 100); + setTimeout(function() { plugin.crash(); }, 0); + </script> + </body> +</html> diff --git a/dom/plugins/test/reftest/reftest-stylo.list b/dom/plugins/test/reftest/reftest-stylo.list new file mode 100644 index 000000000..0f900b369 --- /dev/null +++ b/dom/plugins/test/reftest/reftest-stylo.list @@ -0,0 +1,33 @@ +# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing +# basic sanity checking +# fails random-if(!haveTestPlugin) == plugin-sanity.html plugin-sanity.html +# fails-if(!haveTestPlugin) == plugin-sanity.html plugin-sanity.html +skip fails-if(!haveTestPlugin) fuzzy-if(skiaContent,1,160000) == plugin-alpha-zindex.html plugin-alpha-zindex.html +fails-if(!haveTestPlugin) fuzzy-if(skiaContent,1,164000) == plugin-alpha-opacity.html plugin-alpha-opacity.html +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == windowless-clipping-1.html windowless-clipping-1.html +# bug 631832 +# fuzzy because of anti-aliasing in dashed border +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == border-padding-1.html border-padding-1.html +# bug 629430 +skip random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == border-padding-2.html border-padding-2.html +# bug 629430 +skip random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin) skip-if(Android||B2G) == border-padding-3.html border-padding-3.html +# bug 629430 +# bug 773482 +# The following two "pluginproblemui-direction" tests are unreliable on all platforms. They should be re-written or replaced. +#random-if(cocoaWidget||d2d||/^Windows\x20NT\x205\.1/.test(http.oscpu)) fails-if(!haveTestPlugin&&!Android) == pluginproblemui-direction-1.html pluginproblemui-direction-1.html +# bug 567367 +#random-if(cocoaWidget) fails-if(!haveTestPlugin&&!Android) == pluginproblemui-direction-2.html pluginproblemui-direction-2.html +fails-if(!haveTestPlugin) fuzzy-if(skiaContent,1,160000) == plugin-canvas-alpha-zindex.html plugin-canvas-alpha-zindex.html +fails fails-if(!haveTestPlugin) fuzzy-if(skiaContent,1,160000) == plugin-transform-alpha-zindex.html plugin-transform-alpha-zindex.html +skip == plugin-busy-alpha-zindex.html plugin-busy-alpha-zindex.html +skip == plugin-background.html plugin-background.html +skip == plugin-background-1-step.html plugin-background-1-step.html +skip == plugin-background-2-step.html plugin-background-2-step.html +skip == plugin-background-5-step.html plugin-background-5-step.html +skip == plugin-background-10-step.html plugin-background-10-step.html +skip == plugin-transform-1.html plugin-transform-1.html +skip == plugin-transform-2.html plugin-transform-2.html +skip == shrink-1.html shrink-1.html +skip skip-if(!haveTestPlugin) == update-1.html update-1.html +skip skip-if(!haveTestPlugin) == windowless-layers.html windowless-layers.html diff --git a/dom/plugins/test/reftest/reftest.list b/dom/plugins/test/reftest/reftest.list new file mode 100644 index 000000000..e2d819536 --- /dev/null +++ b/dom/plugins/test/reftest/reftest.list @@ -0,0 +1,26 @@ +# basic sanity checking +random-if(!haveTestPlugin) != plugin-sanity.html about:blank +fails-if(!haveTestPlugin) == plugin-sanity.html div-sanity.html +fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,1,160000) == plugin-alpha-zindex.html div-alpha-zindex.html +fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,1,164000) == plugin-alpha-opacity.html div-alpha-opacity.html +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == windowless-clipping-1.html windowless-clipping-1-ref.html # bug 631832 +# fuzzy because of anti-aliasing in dashed border +fuzzy(16,256) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == border-padding-1.html border-padding-1-ref.html # bug 629430 +fuzzy(16,256) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == border-padding-2.html border-padding-2-ref.html # bug 629430 +fuzzy(16,256) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin||Android) == border-padding-3.html border-padding-3-ref.html # bug 629430 # bug 773482 +# The following two "pluginproblemui-direction" tests are unreliable on all platforms. They should be re-written or replaced. +#random-if(cocoaWidget||d2d||/^Windows\x20NT\x205\.1/.test(http.oscpu)) fails-if(!haveTestPlugin&&!Android) == pluginproblemui-direction-1.html pluginproblemui-direction-1-ref.html # bug 567367 +#random-if(cocoaWidget) fails-if(!haveTestPlugin&&!Android) == pluginproblemui-direction-2.html pluginproblemui-direction-2-ref.html +fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,1,160000) == plugin-canvas-alpha-zindex.html div-alpha-zindex.html +fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,1,160000) == plugin-transform-alpha-zindex.html div-alpha-zindex.html +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,1,160000) == plugin-busy-alpha-zindex.html div-alpha-zindex.html +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,1,32400) == plugin-background.html plugin-background-ref.html +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,1,32400) == plugin-background-1-step.html plugin-background-ref.html +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,1,32400) == plugin-background-2-step.html plugin-background-ref.html +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,1,32400) == plugin-background-5-step.html plugin-background-ref.html +random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,1,32400) == plugin-background-10-step.html plugin-background-ref.html +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 +skip-if(!haveTestPlugin) == windowless-layers.html windowless-layers-ref.html diff --git a/dom/plugins/test/reftest/shrink-1-ref.html b/dom/plugins/test/reftest/shrink-1-ref.html new file mode 100644 index 000000000..0906fe578 --- /dev/null +++ b/dom/plugins/test/reftest/shrink-1-ref.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<script src="utils.js"> +</script> +</head> +<body onLoad="forceLoadPlugin('plugin')"> + <embed id="plugin" type="application/x-test" + width="50px" height="40px"> + </embed> +</body> +</html> diff --git a/dom/plugins/test/reftest/shrink-1.html b/dom/plugins/test/reftest/shrink-1.html new file mode 100644 index 000000000..495705698 --- /dev/null +++ b/dom/plugins/test/reftest/shrink-1.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> + <script src="utils.js"> + </script> + <script> +function doShrink() +{ + var plugin = document.getElementById("plugin"); + plugin.setSlowPaint(true); + plugin.width = "50"; + plugin.height = "40"; + + document.documentElement.removeAttribute("class"); +} + +document.addEventListener("MozReftestInvalidate", doShrink, false); + </script> +</head> +<body onLoad="forceLoadPlugin('plugin', true)"> + <embed id="plugin" type="application/x-test" + width="300" height="500"> + </embed> +</body> +</html> diff --git a/dom/plugins/test/reftest/update-1-ref.html b/dom/plugins/test/reftest/update-1-ref.html new file mode 100644 index 000000000..7303d1984 --- /dev/null +++ b/dom/plugins/test/reftest/update-1-ref.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<script src="utils.js"> +</script> +</head> +<body onLoad="forceLoadPlugin('plugin')"> + <embed id="plugin" type="application/x-test" + drawmode="solid" color="FFFF0000" width="30" height="50"> + </embed> +</body> +</html> diff --git a/dom/plugins/test/reftest/update-1.html b/dom/plugins/test/reftest/update-1.html new file mode 100644 index 000000000..f307b4394 --- /dev/null +++ b/dom/plugins/test/reftest/update-1.html @@ -0,0 +1,59 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> + <title>Test for bugs 807728 and 810426</title> + <script src="utils.js"> + </script> + <script> +function start() +{ + document.removeEventListener("MozReftestInvalidate", start, false); + + var plugin = document.getElementById("plugin"); + var color = "FF000000"; + var color_count = 0; + var last_paint_count = 0; + // Enough paints to test reusing a surface after it has been + // moved from front to back buffer. + var final_paint_count = window.mozPaintCount + 10; + var final_color = "FFFF0000"; + + // Using mozPaintCount to track when content has been updated as an + // indication that the browser has received updates, instead of + // plugin.getPaintCount() which tracks when the plugin sends updates or + // MozAfterPaint events which track OS paints. Not using + // MozPaintWaitFinished because invalidation causes no geometry changes. + function wait_for_paints() { + var paint_count = window.mozPaintCount; + if (paint_count >= final_paint_count && color == final_color) { + document.documentElement.removeAttribute("class"); + return; + } + if (paint_count != last_paint_count) { + last_paint_count = paint_count; + if (paint_count + 1 >= final_paint_count) { + color = final_color; + // Wait for the paint with the final color + final_paint_count = paint_count + 1; + } else { + ++color_count; + color = "FF00000" + color_count; + } + plugin.setColor(color); + } + setTimeout(wait_for_paints, 0); + } + + wait_for_paints(); +} + +// MozReftestInvalidate is delivered after initial painting has settled. +document.addEventListener("MozReftestInvalidate", start, false); + </script> +</head> +<body onLoad="forceLoadPlugin('plugin', true)"> + <embed id="plugin" type="application/x-test" + drawmode="solid" color="FF000000" width="30" height="50"> + </embed> +</body> +</html> diff --git a/dom/plugins/test/reftest/utils.js b/dom/plugins/test/reftest/utils.js new file mode 100644 index 000000000..f046089af --- /dev/null +++ b/dom/plugins/test/reftest/utils.js @@ -0,0 +1,18 @@ +function forceLoadPluginElement(id) { + var e = document.getElementById(id); + var found = e.pluginFoundElement; +} + +function forceLoadPlugin(ids, skipRemoveAttribute) { + if (Array.isArray(ids)) { + ids.forEach(function(element, index, array) { + forceLoadPluginElement(element); + }); + } else { + forceLoadPluginElement(ids); + } + if (skipRemoveAttribute) { + return; + } + document.documentElement.removeAttribute("class"); +} diff --git a/dom/plugins/test/reftest/windowless-clipping-1-ref.html b/dom/plugins/test/reftest/windowless-clipping-1-ref.html new file mode 100644 index 000000000..e59ecb79b --- /dev/null +++ b/dom/plugins/test/reftest/windowless-clipping-1-ref.html @@ -0,0 +1,14 @@ +<html class="reftest-wait"> +<head> +<script src="utils.js"> +</script> +</head> +<body onLoad="forceLoadPlugin('p1')"> +<div style="width:100px; height:100px; overflow:auto;"> + <div style="width:100px; height:100px; overflow:hidden;"> + <embed type="application/x-test" style="width:200px;" id="p1"></embed> + </div> +</div> +<div style="width:100px; height:100px; background-color:lime;"></div> +</body> +</html> diff --git a/dom/plugins/test/reftest/windowless-clipping-1.html b/dom/plugins/test/reftest/windowless-clipping-1.html new file mode 100644 index 000000000..dc1c25ac1 --- /dev/null +++ b/dom/plugins/test/reftest/windowless-clipping-1.html @@ -0,0 +1,15 @@ +<html class="reftest-wait">
+<head>
+<script src="utils.js">
+</script>
+</head>
+<body onLoad="forceLoadPlugin('p1')">
+<div style="width:100px; height:100px; overflow:hidden;">
+ <embed type="application/x-test" style="width:200px;"></embed>
+</div>
+<div style="width:100px; height:100px; overflow:hidden;">
+ <embed type="application/x-test" style="width:200px;"
+ drawmode="solid" color="ff00ff00" id="p1"></embed>
+</div>
+</body>
+</html>
diff --git a/dom/plugins/test/reftest/windowless-layers-ref.html b/dom/plugins/test/reftest/windowless-layers-ref.html new file mode 100644 index 000000000..765527b68 --- /dev/null +++ b/dom/plugins/test/reftest/windowless-layers-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<script src="utils.js"> +</script> +</head> +<body onLoad="forceLoadPlugin('p1')"> + <embed type="application/x-test" style="width:200px; height:200px;" id="p1"> +</body> +</html> diff --git a/dom/plugins/test/reftest/windowless-layers.html b/dom/plugins/test/reftest/windowless-layers.html new file mode 100644 index 000000000..9e24c13a6 --- /dev/null +++ b/dom/plugins/test/reftest/windowless-layers.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> +<script src="utils.js"> +</script> +</head> +<body onLoad="forceLoadPlugin(['p1', 'p2'])"> + <div style="width:200px; height:200px; overflow:hidden; position:absolute; z-index:1"> + <embed type="application/x-test" style="width:200px; height:200px;" id="p1"> + </div> + <div style="width:200px; height:100px; overflow:hidden; position:absolute; z-index:2"> + <embed type="application/x-test" style="width:200px; height:200px;" id="p2"> + </div> +</body> +</html> |