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

Unified Diff: LayoutTests/fullscreen/full-screen-request-disallow-for-non-media-elements.html

Issue 428633004: Webkit setting for embedders that do not support fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments and nits Created 6 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
Index: LayoutTests/fullscreen/full-screen-request-disallow-for-non-media-elements.html
diff --git a/LayoutTests/fullscreen/full-screen-request-disallow-for-non-media-elements.html b/LayoutTests/fullscreen/full-screen-request-disallow-for-non-media-elements.html
new file mode 100644
index 0000000000000000000000000000000000000000..07effa4e39350cf5c76022782f292f0dd8acb739
--- /dev/null
+++ b/LayoutTests/fullscreen/full-screen-request-disallow-for-non-media-elements.html
@@ -0,0 +1,22 @@
+<body>
falken 2014/07/31 14:53:10 <body> is usually omitted in layout tests. If some
Ignacio Solla 2014/08/01 10:02:44 Done.
+<script src="full-screen-test.js"></script>
+<span id="span" width="300"></span>
+<video id="video" width="300"></video>
+<div>Tests for the disallowFullscreenForNonMediaElements setting which will be set
+in those platforms where fullscreen for non-media elements is not supported.
+<script>
+ if (window.internals) {
+ window.internals.settings.setDisallowFullscreenForNonMediaElements(true);
+
+ var testStep2 = function() {
+ // Fullscreen for media elements is supported, video in this case.
+ waitForEventAndEnd(document, 'webkitfullscreenchange');
+ runWithKeyDown(function(){document.getElementById('video').webkitRequestFullScreen()});
+ };
+
+ // Fullscreen for non media elements is not supported.
+ waitForEventOnce(document, 'webkitfullscreenerror', testStep2);
+ runWithKeyDown(function(){document.getElementById('span').webkitRequestFullScreen()})
+ }
+</script>
+

Powered by Google App Engine
This is Rietveld 408576698