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

Unified Diff: third_party/WebKit/Source/web/tests/data/fullscreen_style.html

Issue 2122013003: Wait until after layout when restoring scroll on exiting fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests after foolip@'s patch Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/data/fullscreen_style.html
diff --git a/third_party/WebKit/Source/web/tests/data/fullscreen_style.html b/third_party/WebKit/Source/web/tests/data/fullscreen_style.html
new file mode 100644
index 0000000000000000000000000000000000000000..f84634232750d44bd548c1e8bf086ef8426a92c5
--- /dev/null
+++ b/third_party/WebKit/Source/web/tests/data/fullscreen_style.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ body, html {
+ height: 100%;
+ margin: 0px;
+ }
+
+ body:-webkit-full-screen-ancestor > :not(:-webkit-full-screen-ancestor):not(:-webkit-full-screen) {
+ display: none!important
+ }
+
+ #spacer {
+ width: 200px;
+ height: 3000px;
+ background-color: red;
+ }
+
+ #fullscreenElement {
+ width: 20px;
+ height: 20px;
+ background-color: blue;
+ position: absolute;
+ left: 10px;
+ top: 500px;
+ }
+ </style>
+ <script>
+ // To test manually, you can enter fullscreen by clicking on the blue square while
+ // the page has some scroll offset. Exiting fullscreen should reset to the previous
+ // scroll position.
+ var fullscreen = false;
+ addEventListener('load', function() {
+ document.getElementById('fullscreenElement').addEventListener('click', function() {
+ if (fullscreen)
+ document.webkitExitFullscreen();
+ else
+ this.webkitRequestFullscreen();
+
+ fullscreen = !fullscreen;
+ });
+ });
+ </script>
+ </head>
+
+ <body>
+ <div id="spacer"></div>
+ <div id="fullscreenElement"></div>
+ </body>
+</html>
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698