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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/resources/attempt-fullscreen.html

Issue 2898503002: Reenable feature policy control over fullscreen (Closed)
Patch Set: Reworking tests a bit Created 3 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <title>IFrame Fullscreen API success reporter</title>
4 <body>
5 <script>
6 reportFullscreenSuccessful = (success) => {
7 return () => {
8 parent.postMessage({"report": {
9 "api": "fullscreen",
10 "result": success,
11 "frame": window.name
12 }}, "*");
13 };
14 };
15
16 exitFullscreenAndReportSuccess = () => {
17 document.onfullscreenchange = reportFullscreenSuccessful(true);
18 document.exitFullscreen();
foolip 2017/08/16 21:43:15 I suppose it was annoying to be left in fullscreen
iclelland 2017/08/17 20:01:56 Done.
19 };
20
21 window.addEventListener('message', e => {
22 if (e.data.action == "report") {
23 document.onfullscreenchange = exitFullscreenAndReportSuccess;
24 document.onfullscreenerror = reportFullscreenSuccessful(false);
25 document.body.requestFullscreen();
26 }
27 });
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698