layout/generic/test/plugin_clipping_helper_table.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/generic/test/plugin_clipping_helper_table.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,44 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
     1.6 +<html xmlns="http://www.w3.org/1999/xhtml" title="Test Plugin Clipping: Plugins and Tables">
     1.7 +<head>
     1.8 +  <style>
     1.9 +  embed { width:300px; height:200px; display:block; }
    1.10 +  </style>
    1.11 +</head>
    1.12 +<body>
    1.13 +
    1.14 +<!-- Use a XUL element here so we can get its boxObject.screenX/Y -->
    1.15 +<hbox style="height:10px; position:absolute; left:0; top:0; z-index:-100;" id="h1"
    1.16 +      xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    1.17 +  <hbox style="width:100px;"></hbox><hbox id="h2"/>
    1.18 +</hbox>
    1.19 +
    1.20 +<embed id="p1" type="application/x-test" wmode="window"
    1.21 +       style="position:absolute; top:0; left:0;"></embed>
    1.22 +<table style="width:300px; height:100px; position:absolute; top:100px; left:0; background:white;">
    1.23 +</table>
    1.24 +<embed id="p2" type="application/x-test" wmode="window"
    1.25 +       style="position:absolute; top:200px; left:0;"></embed>
    1.26 +<table style="width:300px; height:300px; position:absolute; top:300px; left:0; background:white; border-collapse:collapse;">
    1.27 +</table>
    1.28 +
    1.29 +<script src="plugin_clipping_lib.js"></script>
    1.30 +<script class="testbody" type="application/javascript">
    1.31 +<![CDATA[
    1.32 +
    1.33 +function runTests() {
    1.34 +  // p1 is partially covered by a table with an opaque background
    1.35 +  checkClipRegion("p1", [[0, 0, 300, 100]]);
    1.36 +  // p2 is partially covered by a table with an opaque background
    1.37 +  checkClipRegion("p2", [[0, 0, 300, 100]]);
    1.38 +
    1.39 +  window.opener.SimpleTest.finish();
    1.40 +  window.close();
    1.41 +}
    1.42 +
    1.43 +]]>
    1.44 +</script>
    1.45 +
    1.46 +</body>
    1.47 +</html>

mercurial