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

Side by Side Diff: third_party/WebKit/LayoutTests/fullscreen/api/document-fullscreen-element.html

Issue 2573773002: Sync requestFullscreen() and exitFullscreen() algorithms with the spec (Closed)
Patch Set: address feedback Created 4 years 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 <title>Document.fullscreenElement</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../trusted-click.js"></script>
6 <div id="log"></div>
7 <script>
8 async_test(function(t)
9 {
10 var div = document.querySelector("div");
11
12 document.onfullscreenchange = t.step_func(function()
13 {
14 assert_equals(document.fullscreenElement, div, "fullscreenElement before exitFullscreen()");
15 document.exitFullscreen();
16 // TODO(foolip): fullscreenElement should still be div.
17 // https://crbug.com/402421
18 assert_equals(document.fullscreenElement, null, "fullscreenElement after exitFullscreen()");
19
20 document.onfullscreenchange = t.step_func(function()
21 {
22 assert_equals(document.fullscreenElement, null, "fullscreenElement a fter exiting fullscreen");
23 t.done();
24 });
25 });
26
27 trusted_click(t.step_func(function()
28 {
29 assert_equals(document.fullscreenElement, null, "fullscreenElement befor e requestFullscreen()");
30 div.requestFullscreen();
31 // TODO(foolip): fullscreenElement should still be null.
32 // https://crbug.com/402421
33 assert_equals(document.fullscreenElement, div, "fullscreenElement after requestFullscreen()");
34 }), document.body);
35 });
36 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698