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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforall.php

Issue 2855133004: Re-enable feature policy layout tests after bug fix. (Closed)
Patch Set: Updated fp-vibrate tests expect Created 3 years, 7 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/http/tests/feature-policy/fullscreen-enabledforall.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforall.php b/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforall.php
index 88e9cdbf6c32477509fb956e9c299dcb333854c1..658eb9c7cd4219f0bfce8ea32b991a3b9135a37f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforall.php
+++ b/third_party/WebKit/LayoutTests/http/tests/feature-policy/fullscreen-enabledforall.php
@@ -13,32 +13,32 @@ Header("Feature-Policy: {\"fullscreen\": [\"*\"]}");
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
-<iframe id="f1"></iframe>
-<iframe id="f2" allowfullscreen></iframe>
+<script src="resources/helper.js"></script>
+<iframe></iframe>
+<iframe allowfullscreen></iframe>
<script>
var srcs = [
"resources/feature-policy-fullscreen.html",
"http://localhost:8000/feature-policy/resources/feature-policy-fullscreen.html"
];
-var f1 = document.getElementById('f1');
-var f2 = document.getElementById('f2');
-function loadFrames(iframe) {
- for (var src of srcs) {
- promise_test(function(t) {
- iframe.src = src;
- return new Promise(function(resolve, reject) {
- window.addEventListener('message', function(e) {
- resolve(e.data);
- }, { once: true });
- }).then(function(data) {
- assert_true(data.enabled, 'Document.fullscreenEnabled:');
- assert_equals(data.type, 'change', 'Document.requestFullscreen():');
- });
- }, 'Fullscreen enabled for all on URL: ' + src + ' with allowfullscreen = ' + iframe.allowFullscreen);
- }
+function loadFrame(iframe, src) {
+ var allowfullscreen = iframe.allowFullscreen;
+ promise_test(function() {
+ iframe.src = src;
+ return new Promise(function(resolve, reject) {
+ window.addEventListener('message', function(e) {
+ resolve(e.data);
+ }, { once: true });
+ }).then(function(data) {
+ assert_true(data.enabled, 'Document.fullscreenEnabled:');
+ assert_equals(data.type, 'change', 'Document.requestFullscreen():');
+ });
+ }, 'Fullscreen enabled for all on URL: ' + src + ' with allowfullscreen = ' +
+ allowfullscreen);
}
-loadFrames(f1);
-loadFrames(f2);
+window.onload = function() {
+ loadIframes(srcs);
+}
</script>

Powered by Google App Engine
This is Rietveld 408576698