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

Unified Diff: LayoutTests/fullscreen/full-screen-render-inline.html

Issue 462253003: Remove early returns in fullscreen tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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/full-screen-render-inline.html
diff --git a/LayoutTests/fullscreen/full-screen-render-inline.html b/LayoutTests/fullscreen/full-screen-render-inline.html
index 44c1ceb25cfa378f8f0c6c681d42a0112c2e213f..ceb3113eb00c76c22ead70248cedaaa4d02b41f1 100644
--- a/LayoutTests/fullscreen/full-screen-render-inline.html
+++ b/LayoutTests/fullscreen/full-screen-render-inline.html
@@ -3,33 +3,31 @@
<body>
<div>a<span>b<div>c</div>d</span>e</div>
<script>
-// This test turns fullscreen on and off quickly,
-// then see if it renderes just like as before.
- if ("webkitRequestFullScreen" in Element.prototype) {
- if (window.testRunner)
- testRunner.waitUntilDone();
- document.body.offsetTop;
- var span = document.getElementsByTagName('span')[0];
+ // This test turns fullscreen on and off quickly,
+ // then see if it renderes just like as before.
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+ document.body.offsetTop;
+ var span = document.getElementsByTagName('span')[0];
- var fullscreenChangeEvent = function(event) {
- if (document.webkitIsFullScreen) {
- setTimeout(function () {
- document.webkitCancelFullScreen();
- }, 0);
- } else {
- if (window.testRunner)
- testRunner.notifyDone();
- }
- };
+ var fullscreenChangeEvent = function(event) {
+ if (document.webkitIsFullScreen) {
+ setTimeout(function () {
+ document.webkitCancelFullScreen();
+ }, 0);
+ } else {
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+ };
- document.addEventListener('webkitfullscreenchange', fullscreenChangeEvent);
+ document.addEventListener('webkitfullscreenchange', fullscreenChangeEvent);
- document.addEventListener('keydown', function () {
- span.webkitRequestFullScreen();
- });
- if (window.eventSender)
- eventSender.keyDown('a');
- }
+ document.addEventListener('keydown', function () {
+ span.webkitRequestFullScreen();
+ });
+ if (window.eventSender)
+ eventSender.keyDown('a');
</script>
</body>
</html>
« no previous file with comments | « LayoutTests/fullscreen/full-screen-remove-sibling.html ('k') | LayoutTests/fullscreen/full-screen-request.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698