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

Unified Diff: LayoutTests/fullscreen/trusted-event.js

Issue 462103002: Extract "fullscreen element ready check" from requestFullscreen() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test Created 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fullscreen/trusted-event.js
diff --git a/LayoutTests/fullscreen/trusted-event.js b/LayoutTests/fullscreen/trusted-event.js
index 1f6a835195ab16310a1027c70e2522dc1a2e9939..9f74186b64c6ccf225c219f7920fd17c3abc9f4c 100644
--- a/LayoutTests/fullscreen/trusted-event.js
+++ b/LayoutTests/fullscreen/trusted-event.js
@@ -17,6 +17,7 @@ function trusted_event(callback, container)
// Running as manual test. Show a button to click.
var button = document.createElement("button");
button.textContent = "click to run test";
+ button.style.display = "block";
button.style.fontSize = "20px";
button.style.padding = "10px";
button.onclick = function()
@@ -30,8 +31,10 @@ function trusted_event(callback, container)
}
// Invokes element.requestFullscreen() from a trusted event.
-function trusted_request(element)
+// When testing manually, a button is added to the container,
+// or to element's parent if no container is provided.
+function trusted_request(element, container)
{
var request = element.requestFullscreen.bind(element);
- trusted_event(request, element.parentNode);
+ trusted_event(request, container || element.parentNode);
}
« no previous file with comments | « LayoutTests/fullscreen/api/element-ready-check-not-in-document.html ('k') | Source/core/dom/FullscreenElementStack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698