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..e1b1df8a129e07e943d311feabcc5fd80608a14e |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fullscreen/full-screen-is-in-top-layer.html |
| @@ -0,0 +1,38 @@ |
| +<!doctype html> |
| +<html> |
| +<head> |
|
esprehn
2015/09/24 20:17:01
leave out html, body
dsinclair
2015/09/28 17:14:57
Done.
|
| +<style> |
| +div { |
| + top: 100px; |
| + bottom: 100px; |
| + left: 100px; |
| + right: 100px; |
| + height: auto; |
| + width: auto; |
| +} |
| +::backdrop { |
| + background: green; |
| +} |
| +</style> |
| +</head> |
| +<body> |
| +<div>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>Go fullscreen</button> |
| +<script> |
| +div = document.querySelector('div'); |
|
esprehn
2015/09/24 20:17:01
Lets use an id instead so the test is clear (and l
dsinclair
2015/09/28 17:14:57
Done.
|
| +document.querySelector('button').addEventListener('click', function() { |
| + div.webkitRequestFullscreen(); |
| +}); |
| +if (window.testRunner) { |
| + testRunner.waitUntilDone(); |
| + document.addEventListener('webkitfullscreenchange', function() { |
| + setTimeout(function() { |
|
esprehn
2015/09/24 20:17:01
requestAnimationFrame? I'm not sure what you're wa
dsinclair
2015/09/28 17:14:57
Done.
|
| + testRunner.notifyDone(); |
| + }, 0); |
| + }); |
| + document.addEventListener('keydown', function() { div.webkitRequestFullscreen(); }); |
|
esprehn
2015/09/24 20:17:01
on a new line
dsinclair
2015/09/28 17:14:57
Done.
|
| + eventSender.keyDown('a'); |
|
esprehn
2015/09/24 20:17:01
simulate a click instead, having both the keydown
dsinclair
2015/09/28 17:14:57
Done.
|
| +} |
| +</script> |
| +</body> |
| +</html> |