Index: LayoutTests/fullscreen/model/remove-last.html |
diff --git a/LayoutTests/fullscreen/model/remove-last.html b/LayoutTests/fullscreen/model/remove-last.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b7a3807193caf94240c1f5532edc0977ccc2cb6b |
--- /dev/null |
+++ b/LayoutTests/fullscreen/model/remove-last.html |
@@ -0,0 +1,32 @@ |
+<!DOCTYPE html> |
+<title>Remove the last element on the fullscreen element stack</title> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script src="../trusted-event.js"></script> |
+<div id="log"></div> |
+<div id="first"> |
+ <div id="last"></div> |
+</div> |
+<script> |
+async_test(function(t) |
+{ |
+ var first = document.getElementById("first"); |
+ trusted_request(first); |
+ document.onfullscreenchange = t.step_func(function() |
+ { |
+ assert_equals(document.fullscreenElement, first); |
+ var last = document.getElementById("last"); |
+ trusted_request(last); |
+ document.onfullscreenchange = t.step_func(function() |
+ { |
+ assert_equals(document.fullscreenElement, last); |
+ last.remove(); |
+ document.onfullscreenchange = t.step_func(function() |
+ { |
+ assert_equals(document.fullscreenElement, first); |
+ t.done(); |
+ }); |
+ }); |
+ }); |
+}); |
+</script> |