Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fullscreen/full-screen-is-in-top-layer.html |
| diff --git a/third_party/WebKit/LayoutTests/fullscreen/full-screen-is-in-top-layer.html b/third_party/WebKit/LayoutTests/fullscreen/full-screen-is-in-top-layer.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b91bd8fe558e38397c7ff0ada024b369b1ef1604 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fullscreen/full-screen-is-in-top-layer.html |
| @@ -0,0 +1,37 @@ |
| +<!doctype html> |
| +<style> |
| +div { |
| + top: 100px; |
| + bottom: 100px; |
| + left: 100px; |
| + right: 100px; |
| + height: auto; |
| + width: auto; |
| +} |
| +::backdrop { |
| + background: green; |
| +} |
| +</style> |
| + |
| +<div id='element'>Test that fullscreen elements are in the top layer. The test passes if you see a green backdrop behind this box when fullscreen.</div> |
| + |
| +<button id='button'>Go fullscreen</button> |
| + |
| +<script> |
| +var element = document.getElementById('elem'); |
|
philipj_slow
2015/09/29 08:05:22
This looks strange, there is no element with id 'e
dsinclair
2015/10/01 14:50:13
Done.
|
| +document.getElementById('button').addEventListener('click', function() { |
| + element.webkitRequestFullscreen(); |
| +}); |
| + |
| +if (window.testRunner) { |
| + testRunner.waitUntilDone(); |
| + document.addEventListener('webkitfullscreenchange', function() { |
| + testRunner.notifyDone(); |
| + }); |
| + |
| + var button = document.getElementById('button'); |
| + eventSender.mouseMoveTo(button.offsetLeft + button.offsetWidth / 2, button.offsetTop + button.offsetHeight / 2); |
| + eventSender.mouseDown(); |
| + eventSender.mouseUp(); |
| +} |
| +</script> |