summaryrefslogtreecommitdiffstats
path: root/dom/plugins/test/reftest
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /dom/plugins/test/reftest
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/plugins/test/reftest')
-rw-r--r--dom/plugins/test/reftest/border-padding-1-ref.html10
-rw-r--r--dom/plugins/test/reftest/border-padding-1.html16
-rw-r--r--dom/plugins/test/reftest/border-padding-2-ref.html17
-rw-r--r--dom/plugins/test/reftest/border-padding-2.html17
-rw-r--r--dom/plugins/test/reftest/border-padding-3-ref.html10
-rw-r--r--dom/plugins/test/reftest/border-padding-3.html35
-rw-r--r--dom/plugins/test/reftest/div-alpha-opacity.html28
-rw-r--r--dom/plugins/test/reftest/div-alpha-zindex.html27
-rw-r--r--dom/plugins/test/reftest/div-sanity.html17
-rw-r--r--dom/plugins/test/reftest/plugin-alpha-opacity.html29
-rw-r--r--dom/plugins/test/reftest/plugin-alpha-zindex.html26
-rw-r--r--dom/plugins/test/reftest/plugin-background-1-step.html22
-rw-r--r--dom/plugins/test/reftest/plugin-background-10-step.html22
-rw-r--r--dom/plugins/test/reftest/plugin-background-2-step.html22
-rw-r--r--dom/plugins/test/reftest/plugin-background-5-step.html22
-rw-r--r--dom/plugins/test/reftest/plugin-background-ref.html17
-rw-r--r--dom/plugins/test/reftest/plugin-background.css61
-rw-r--r--dom/plugins/test/reftest/plugin-background.html20
-rw-r--r--dom/plugins/test/reftest/plugin-background.js73
-rw-r--r--dom/plugins/test/reftest/plugin-busy-alpha-zindex.html56
-rw-r--r--dom/plugins/test/reftest/plugin-canvas-alpha-zindex.html41
-rw-r--r--dom/plugins/test/reftest/plugin-sanity.html13
-rw-r--r--dom/plugins/test/reftest/plugin-transform-1-ref.html10
-rw-r--r--dom/plugins/test/reftest/plugin-transform-1.html10
-rw-r--r--dom/plugins/test/reftest/plugin-transform-2-ref.html7
-rw-r--r--dom/plugins/test/reftest/plugin-transform-2.html13
-rw-r--r--dom/plugins/test/reftest/plugin-transform-alpha-zindex.html28
-rw-r--r--dom/plugins/test/reftest/pluginproblemui-direction-1-ref.html21
-rw-r--r--dom/plugins/test/reftest/pluginproblemui-direction-1.html21
-rw-r--r--dom/plugins/test/reftest/pluginproblemui-direction-2-ref.html25
-rw-r--r--dom/plugins/test/reftest/pluginproblemui-direction-2.html25
-rw-r--r--dom/plugins/test/reftest/reftest.list26
-rw-r--r--dom/plugins/test/reftest/shrink-1-ref.html12
-rw-r--r--dom/plugins/test/reftest/shrink-1.html25
-rw-r--r--dom/plugins/test/reftest/update-1-ref.html12
-rw-r--r--dom/plugins/test/reftest/update-1.html62
-rw-r--r--dom/plugins/test/reftest/utils.js18
-rw-r--r--dom/plugins/test/reftest/windowless-clipping-1-ref.html14
-rw-r--r--dom/plugins/test/reftest/windowless-clipping-1.html15
-rw-r--r--dom/plugins/test/reftest/windowless-layers-ref.html10
-rw-r--r--dom/plugins/test/reftest/windowless-layers.html15
41 files changed, 970 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 0000000000..1a33644ac4
--- /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 0000000000..6fa2446f40
--- /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 0000000000..ae92da4032
--- /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 0000000000..6a39d2d819
--- /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 0000000000..5c7bb74564
--- /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 0000000000..4d240a7eb4
--- /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);
+</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 0000000000..fec913b640
--- /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 0000000000..e4672b913b
--- /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 0000000000..9ffa539191
--- /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 0000000000..2db6cc4de3
--- /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 0000000000..ead9b6f4ce
--- /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 0000000000..9498633b41
--- /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 0000000000..7a0824a565
--- /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 0000000000..cc186a5f29
--- /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 0000000000..2630719c88
--- /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 0000000000..651fdecef5
--- /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 0000000000..f6b251214d
--- /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 0000000000..4cd1e3f538
--- /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 0000000000..8c6d28572d
--- /dev/null
+++ b/dom/plugins/test/reftest/plugin-background.js
@@ -0,0 +1,73 @@
+// 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);
+}
+
+function start() {
+ window.removeEventListener("MozReftestInvalidate", start);
+
+ window.addEventListener("MozAfterPaint", step);
+ window.addEventListener("MozPaintWaitFinished", step);
+
+ 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);
+ window.removeEventListener("MozPaintWaitFinished", step);
+ 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);
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 0000000000..e339dd2669
--- /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 0000000000..517099d1b1
--- /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 0000000000..4f9c30eee4
--- /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 0000000000..259a78b41b
--- /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 0000000000..19f6e8c20f
--- /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 0000000000..93a3924d7e
--- /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 0000000000..7f48640c19
--- /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 0000000000..52fda4bcf9
--- /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 0000000000..fafec34f43
--- /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 0000000000..9888850dc9
--- /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 0000000000..e807b86b5b
--- /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 0000000000..95b358e372
--- /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.list b/dom/plugins/test/reftest/reftest.list
new file mode 100644
index 0000000000..2db57bab37
--- /dev/null
+++ b/dom/plugins/test/reftest/reftest.list
@@ -0,0 +1,26 @@
+# basic sanity checking
+random-if(!haveTestPlugin) HTTP != plugin-sanity.html about:blank
+fails-if(!haveTestPlugin) HTTP == plugin-sanity.html div-sanity.html
+fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-160000) HTTP == plugin-alpha-zindex.html div-alpha-zindex.html
+fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-164000) HTTP == plugin-alpha-opacity.html div-alpha-opacity.html
+random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) HTTP == windowless-clipping-1.html windowless-clipping-1-ref.html # bug 631832
+# fuzzy because of anti-aliasing in dashed border
+fuzzy(0-16,0-256) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) HTTP == border-padding-1.html border-padding-1-ref.html # bug 629430
+fuzzy(0-16,0-256) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) HTTP == border-padding-2.html border-padding-2-ref.html # bug 629430
+fuzzy(0-16,0-256) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin||Android) HTTP == 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) HTTP == pluginproblemui-direction-1.html pluginproblemui-direction-1-ref.html # bug 567367
+#random-if(cocoaWidget) fails-if(!haveTestPlugin&&!Android) HTTP == pluginproblemui-direction-2.html pluginproblemui-direction-2-ref.html
+fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-160000) HTTP == plugin-canvas-alpha-zindex.html div-alpha-zindex.html
+fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-160000) HTTP == 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,0-1,0-160000) HTTP == 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,0-1,0-32400) HTTP == plugin-background.html plugin-background-ref.html
+random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background-1-step.html plugin-background-ref.html
+random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background-2-step.html plugin-background-ref.html
+random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background-5-step.html plugin-background-ref.html
+random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background-10-step.html plugin-background-ref.html
+random-if(!haveTestPlugin) HTTP == plugin-transform-1.html plugin-transform-1-ref.html
+fails-if(!haveTestPlugin) HTTP == plugin-transform-2.html plugin-transform-2-ref.html
+skip-if(!haveTestPlugin) HTTP == shrink-1.html shrink-1-ref.html
+pref(dom.mozPaintCount.enabled,true) skip-if(!haveTestPlugin) HTTP == update-1.html update-1-ref.html
+skip-if(!haveTestPlugin) HTTP == 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 0000000000..0906fe5789
--- /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 0000000000..a277e1afaa
--- /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);
+ </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 0000000000..7303d19840
--- /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 0000000000..cff85bc9f0
--- /dev/null
+++ b/dom/plugins/test/reftest/update-1.html
@@ -0,0 +1,62 @@
+<!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);
+
+ 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.
+ // FIXME: Stop using mozPaintCount for this test.
+ // Can't make it a chrome:// url because it needs http, thus no
+ // SpecialPowers :/
+ 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);
+ </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 0000000000..f046089afc
--- /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 0000000000..e59ecb79b2
--- /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 0000000000..dc1c25ac10
--- /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 0000000000..765527b68f
--- /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 0000000000..9e24c13a68
--- /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>