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 href="/tests/SimpleTest/test.css" type="text/css"?> |
michael@0 | 3 | <html xmlns="http://www.w3.org/1999/xhtml" title="Test Plugin Clipping"> |
michael@0 | 4 | <head> |
michael@0 | 5 | <style> |
michael@0 | 6 | embed { width:200px; height:200px; display:block; } |
michael@0 | 7 | iframe { border:none; } |
michael@0 | 8 | </style> |
michael@0 | 9 | </head> |
michael@0 | 10 | <body> |
michael@0 | 11 | |
michael@0 | 12 | <!-- Use a XUL element here so we can get its boxObject.screenX/Y --> |
michael@0 | 13 | <hbox style="height:10px; position:absolute; left:0; top:0; z-index:-100;" id="h1" |
michael@0 | 14 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
michael@0 | 15 | <hbox style="width:100px;"></hbox><hbox id="h2"/> |
michael@0 | 16 | </hbox> |
michael@0 | 17 | |
michael@0 | 18 | <!-- Non-clipped plugin --> |
michael@0 | 19 | <embed id="p1" type="application/x-test" wmode="window" |
michael@0 | 20 | style="position:absolute; left:300px; top:0"></embed> |
michael@0 | 21 | <!-- Clipped to the top and left by the viewport --> |
michael@0 | 22 | <embed id="p2" type="application/x-test" wmode="window" |
michael@0 | 23 | style="position:absolute; left:-100px; top:-100px;"></embed> |
michael@0 | 24 | <!-- Clipped by a scrollable DIV --> |
michael@0 | 25 | <div style="overflow:auto; width:200px; height:200px; |
michael@0 | 26 | position:absolute; left:100px; top:0;"> |
michael@0 | 27 | <div style="position:relative; left:-100px; top:-100px;"> |
michael@0 | 28 | <embed id="p3" type="application/x-test" wmode="window"></embed> |
michael@0 | 29 | </div> |
michael@0 | 30 | </div> |
michael@0 | 31 | <!-- Clipped by a scrollable DIV *and* to the viewport --> |
michael@0 | 32 | <div style="overflow:auto; width:200px; height:200px; position:absolute; top:100px; left:-100px;"> |
michael@0 | 33 | <div style="position:relative; top:-100px;"> |
michael@0 | 34 | <embed id="p4" type="application/x-test" wmode="window"></embed> |
michael@0 | 35 | </div> |
michael@0 | 36 | </div> |
michael@0 | 37 | <!-- Clipped by an iframe --> |
michael@0 | 38 | <iframe id="f1" style="position:absolute; left:200px; top:200px; width:200px; height:200px;" |
michael@0 | 39 | src="data:text/html,<embed style='position:absolute; left:-100px; top:-100px; width:200px; height:200px;' id='p5' type='application/x-test' wmode='window'>"></iframe> |
michael@0 | 40 | |
michael@0 | 41 | <script src="plugin_clipping_lib.js"></script> |
michael@0 | 42 | <script class="testbody" type="application/javascript"> |
michael@0 | 43 | <![CDATA[ |
michael@0 | 44 | |
michael@0 | 45 | function runTests() { |
michael@0 | 46 | checkClipRegion("p1", [[0, 0, 200, 200]]); |
michael@0 | 47 | checkClipRegion("p2", [[100, 100, 200, 200]]); |
michael@0 | 48 | checkClipRegion("p3", [[100, 100, 200, 200]]); |
michael@0 | 49 | checkClipRegion("p4", [[100, 100, 200, 200]]); |
michael@0 | 50 | checkClipRegionForFrame("f1", "p5", [[100, 100, 200, 200]]); |
michael@0 | 51 | |
michael@0 | 52 | window.opener.SimpleTest.finish(); |
michael@0 | 53 | window.close(); |
michael@0 | 54 | } |
michael@0 | 55 | ]]> |
michael@0 | 56 | </script> |
michael@0 | 57 | |
michael@0 | 58 | </body> |
michael@0 | 59 | </html> |