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

Unified Diff: LayoutTests/fullscreen/api/document-fullscreen-element.html

Issue 395633011: Implement the unprefixed the Fullscreen API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nits 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/api/document-fullscreen-element.html
diff --git a/LayoutTests/fullscreen/api/document-fullscreen-element.html b/LayoutTests/fullscreen/api/document-fullscreen-element.html
new file mode 100644
index 0000000000000000000000000000000000000000..3e08e9a14a35dfdfb0c6cfc0963a7a2cbdee1158
--- /dev/null
+++ b/LayoutTests/fullscreen/api/document-fullscreen-element.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<title>Document.fullscreenElement</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../trusted-event.js"></script>
+<div id="log"></div>
+<script>
+async_test(function(t)
+{
+ var div = document.querySelector("div");
+
+ document.onfullscreenchange = t.step_func(function()
+ {
+ assert_equals(document.fullscreenElement, div, "fullscreenElement before exitFullscreen()");
+ document.exitFullscreen();
+ // FIXME: per spec fullscreenElement should still be div
+ assert_equals(document.fullscreenElement, null, "fullscreenElement after exitFullscreen()");
+
+ document.onfullscreenchange = t.step_func(function()
+ {
+ assert_equals(document.fullscreenElement, null, "fullscreenElement after exiting fullscreen");
+ t.done();
+ });
+ });
+
+ trusted_event(t.step_func(function()
+ {
+ assert_equals(document.fullscreenElement, null, "fullscreenElement before requestFullscreen()");
+ div.requestFullscreen();
+ // FIXME: per spec fullscreenElement should still be null
+ assert_equals(document.fullscreenElement, div, "fullscreenElement after requestFullscreen()");
+ }), document.body);
+});
+</script>
« no previous file with comments | « LayoutTests/fullscreen/api/document-exit-fullscreen.html ('k') | LayoutTests/fullscreen/api/document-fullscreen-enabled.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698