| Index: chrome/test/data/npapi/iframe_shims.html
|
| ===================================================================
|
| --- chrome/test/data/npapi/iframe_shims.html (revision 0)
|
| +++ chrome/test/data/npapi/iframe_shims.html (revision 0)
|
| @@ -0,0 +1,68 @@
|
| +<html><head>
|
| +<script>
|
| + function noop(x) {
|
| + }
|
| +
|
| + var red_clicks = 0;
|
| + var green_clicks = 0;
|
| +
|
| + function redClicked() {
|
| + red_clicks++;
|
| + checkResult();
|
| + }
|
| +
|
| + function greenClicked() {
|
| + green_clicks++;
|
| + checkResult();
|
| + }
|
| +
|
| + function checkResult() {
|
| + var output = document.getElementById("output");
|
| + var success = green_clicks >= 0 && red_clicks == 0;
|
| + output.innerHTML = success ? "SUCCESS" : "FAILURE";
|
| + document.title = output.innerHTML;
|
| + }
|
| +</script>
|
| +</head>
|
| +<body>
|
| +
|
| + <!-- The automated test clicks in particular spots on the page, so
|
| + don't change the geometry of these elements. -->
|
| + <div style="position: relative;">
|
| +
|
| + <div id="embed_parent" style="position: absolute; z-index: 100"
|
| + <embed width="400" height="200" wmode="window" loop="false" quality="high" src="simple_blank.swf" type="application/x-shockwave-flash" />
|
| + </div>
|
| +
|
| + <div id="red_square"
|
| + style="z-index: 50; background-color: #FF0000; position: absolute; top: 110; left: 50; width: 100px; height: 100px; overflow: hidden;">
|
| + <input type="button" onclick="redClicked()" value="red" style="position: absolute; top: 10; left: 10; width: 80px; height: 80px;"/>
|
| + <iframe src="javascript:void(0);" frameborder=0 style="z-index: -1; position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"></iframe>
|
| + </div>
|
| +
|
| + <div id="green_square"
|
| + style="z-index: 150; background-color: #00FF00; position: absolute; top: 110; left: 250; width: 100px; height: 100px; overflow: hidden;">
|
| + <input type="button" onclick="greenClicked()" value="green" style="position: absolute; top: 10; left: 10; width: 80px; height: 80px;"/>
|
| + <iframe src="javascript:void(0);" frameborder=0 style="z-index: -1; position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"></iframe>
|
| + </div>
|
| +
|
| + </div>
|
| +
|
| + <div style="position: relative; top: 250px;">
|
| +
|
| +<p>Test that <a href="http://tulrich.com/iframe_shims/">iframe
|
| +shims</a> can be used to overlay HTML above a windowed plugin. The
|
| +red square should be hidden by the blue flash plugin, and the green
|
| +square should appear over it. Click over the buttons on the squares
|
| +to exercise the test. You should not be able to reach the red
|
| +square's button.</p>
|
| +
|
| +<p>Prints "SUCCESS" on success, "FAILURE" on failure.</p>
|
| +
|
| +<div id=output>FAILURE</div>
|
| +
|
| +</div>
|
| +
|
| +</body>
|
| +</html>
|
| +
|
|
|