Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(838)

Unified Diff: third_party/WebKit/LayoutTests/fullscreen/full-screen-is-in-top-layer.html

Issue 1363023005: Implement FullScreen using top layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d3f279a07900d8602494f4b6828e58e65708ee36
--- /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('element');
+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>

Powered by Google App Engine
This is Rietveld 408576698