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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-fullscreen-disabled.html

Issue 2499373002: Implementation for feature policy - fullscreen (Closed)
Patch Set: Modified layout tests Created 4 years, 1 month 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/http/tests/feature-policy/resources/feature-policy-fullscreen-disabled.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-fullscreen-disabled.html b/third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-fullscreen-disabled.html
new file mode 100644
index 0000000000000000000000000000000000000000..3da2d3ee5f579060359a0ef5fb25eeb901f1ca23
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-fullscreen-disabled.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<head>
+ <title>Feature-Policy Fullscreen Disabled</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+</head>
+<script>
+ test(function(test) {
foolip 2016/11/28 23:33:22 Should be async_test?
lunalu1 2016/12/01 20:10:07 Done.
+ document.onwebkitfullscreenerror = function ( event ) {
foolip 2016/11/28 23:33:22 If async, test, wrap in test.step_func. You can al
lunalu1 2016/12/01 20:10:07 Done.
+ console.log('FULL SCREEN DENIED');
foolip 2016/11/28 23:33:22 Is this needed? If the result of the test matters,
lunalu1 2016/12/01 20:10:07 Done.
+ test.done();
+ document.webkitExitFullscreen();
+ };
+ var div = document.createElement('div');
+ document.documentElement.appendChild(div);
foolip 2016/11/28 23:33:22 A div in the markup and document.querySelector('di
lunalu1 2016/12/01 20:10:07 Done.
+ assert_false(document.fullscreenEnabled);
foolip 2016/11/28 23:33:22 Using the prefixed or unprefixed API consistently
lunalu1 2016/12/01 20:10:07 Done.
+ div.webkitRequestFullscreen();
foolip 2016/11/28 23:33:22 Without a user gesture the request will fail with
+ }, 'No iframe may use fullscreen feature when disabled.');
+</script>

Powered by Google App Engine
This is Rietveld 408576698