Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | <?xml-stylesheet type="text/css" href="chrome://global/skin"?> |
michael@0 | 3 | <window title="Content/chrome integration subwindow" |
michael@0 | 4 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
michael@0 | 5 | onload="runTests()" |
michael@0 | 6 | style="background:black; -moz-appearance:none;"> |
michael@0 | 7 | <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script> |
michael@0 | 8 | |
michael@0 | 9 | <stack style="height:300px; width:200px;"> |
michael@0 | 10 | <!-- the bottom 100px is a strip of black that should be vixible through the content iframe --> |
michael@0 | 11 | <vbox style="background:pink; border-bottom:100px solid black"/> |
michael@0 | 12 | <!-- the middle 100px is a strip of black in the content iframe --> |
michael@0 | 13 | <!-- the bottom 100px of the iframe is transparent, the top 100px is yellow --> |
michael@0 | 14 | <iframe type="content" style="border:none;" |
michael@0 | 15 | transparent="transparent" |
michael@0 | 16 | src="data:text/html,<div style='position:absolute;left:0;top:0;width:100%;height:100px;background:yellow;border-bottom:100px solid black'>"/> |
michael@0 | 17 | <!-- the top 100px is a strip of black above the content iframe --> |
michael@0 | 18 | <vbox style="border-top:100px solid black;"/> |
michael@0 | 19 | </stack> |
michael@0 | 20 | |
michael@0 | 21 | <script type="application/javascript"> |
michael@0 | 22 | <![CDATA[ |
michael@0 | 23 | var imports = [ "SimpleTest", "is", "isnot", "ok", "SpecialPowers" ]; |
michael@0 | 24 | for each (var name in imports) { |
michael@0 | 25 | window[name] = window.opener.wrappedJSObject[name]; |
michael@0 | 26 | } |
michael@0 | 27 | |
michael@0 | 28 | function runTests() { |
michael@0 | 29 | var testCanvas = snapshotWindow(window); |
michael@0 | 30 | |
michael@0 | 31 | var refCanvas = snapshotWindow(window); |
michael@0 | 32 | var ctx = refCanvas.getContext('2d'); |
michael@0 | 33 | ctx.fillStyle = "black"; |
michael@0 | 34 | ctx.fillRect(0, 0, refCanvas.width, refCanvas.height); |
michael@0 | 35 | |
michael@0 | 36 | var comparison = compareSnapshots(testCanvas, refCanvas, true); |
michael@0 | 37 | ok(comparison[0], "Rendering OK, got " + comparison[1] + ", expected " + comparison[2]); |
michael@0 | 38 | |
michael@0 | 39 | var tester = window.SimpleTest; |
michael@0 | 40 | window.close(); |
michael@0 | 41 | tester.finish(); |
michael@0 | 42 | } |
michael@0 | 43 | ]]> |
michael@0 | 44 | </script> |
michael@0 | 45 | </window> |