Bug 401361. Reftest
authorroc+@cs.cmu.edu
Thu, 08 Nov 2007 12:51:05 -0800
changeset 7692 babf940dc94fde677c34956dc76bea0e44f03bb2
parent 7691 e4c77988580e6e7a6f95e60605c333797a4ba8fe
child 7693 70e24cb466d16b1e11fc6c73b9b26b121d1437da
push idunknown
push userunknown
push dateunknown
bugs401361
milestone1.9b2pre
Bug 401361. Reftest
layout/reftests/bugs/401361-1-ref.xul
layout/reftests/bugs/401361-1.xul
layout/reftests/bugs/401361-frame.html
layout/reftests/bugs/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/401361-1-ref.xul
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<window id="yourwindow"
+        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+        xmlns:html="http://www.w3.org/1999/xhtml">
+<vbox align="left">
+<iframe style="border: 1px solid black; width: 200px; height: 200px; visibility:hidden"/>
+<hbox style="width:200px; height:100px; background:white;">
+  <hbox style="width:100px; height:100px; background:cyan;" flex="0"></hbox>
+</hbox>
+<hbox style="width:200px; height:100px; background:white;">
+</hbox>
+</vbox>
+</window>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/401361-1.xul
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<window id="yourwindow"
+        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+        xmlns:html="http://www.w3.org/1999/xhtml">
+<script type="text/javascript">
+<![CDATA[
+function load()
+{
+  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+  var frame = document.getElementById("frame");
+  var contentViewer = frame.docShell.contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
+  contentViewer.fullZoom = 0.5;
+  var canvas = document.getElementById("canvas");
+  var ctx = canvas.getContext("2d");
+  ctx.drawWindow(frame.contentWindow, 0, 0, 200, 200, "rgba(255,255,255,255)");
+}
+window.addEventListener("load", load, false);
+]]>
+</script>
+<vbox align="left">
+<iframe id="frame" style="border: 1px solid black; width: 200px; height: 200px; visibility:hidden" src="401361-frame.html"/>
+<html:canvas id="canvas" width="200" height="200"/>
+</vbox>
+</window>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/401361-frame.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<html>
+<body style='margin:0'>
+<div style='width:100px; height:100px; background:cyan;'></div>
+</table>
+</body>
+</html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -430,8 +430,9 @@ fails == 393655-2.html 393655-2-ref.html
 == 399384-1.html 399384-1-ref.html
 == 400171-1a.html 400171-1-ref.html
 == 400171-1b.html 400171-1-ref.html
 == 400171-1c.html 400171-1-ref.html
 == 400171-2a.html 400171-2-ref.html
 == 400171-2b.html 400171-2-ref.html
 == 400171-2c.html 400171-2-ref.html
 == 400421-1.html 400421-1-ref.html
+== 401361-1.xul 401361-1-ref.xul