From 8ab6a91cb0ddfb245c5763dcc1c134a087b0d6fe Mon Sep 17 00:00:00 2001 From: Henry Chang Date: Wed, 12 Jul 2017 10:49:11 +0800 Subject: [PATCH] Bug 1355746 - Part 4. Fix intermittent full screen test failures. r=smaug,xidorn We found that a window will not get focus immediately after exiting full screen mode on Linux. This seems to be a long-standing issue which surfaces due to the change of background HTML parsing timing. So, we try to get focus everytime before requesting full screen mode to ensure the request will not fail because of the focus issue. MozReview-Commit-ID: 2pOShFZcq8A --HG-- extra : rebase_source : 47a9431e02549b483874ddfba804bed0d1c6a534 extra : intermediate-source : 64f74f99771510bc06aaf4e9fc875e61b4c67a75 extra : source : 57f259680880504181191c5fe5fa9688c0692703 --- dom/html/test/file_fullscreen-api.html | 2 +- dom/html/test/file_fullscreen-prefixed.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/html/test/file_fullscreen-api.html b/dom/html/test/file_fullscreen-api.html index b79856d9a660..25eb18aa814b 100644 --- a/dom/html/test/file_fullscreen-api.html +++ b/dom/html/test/file_fullscreen-api.html @@ -305,7 +305,7 @@ function testNamespaces(followupTestFn) { }); } - elem.requestFullscreen(); + SimpleTest.waitForFocus(() => elem.requestFullscreen()); } runNextNamespaceTest(); diff --git a/dom/html/test/file_fullscreen-prefixed.html b/dom/html/test/file_fullscreen-prefixed.html index 5f3d60196aa3..a7fc4ebe19cb 100644 --- a/dom/html/test/file_fullscreen-prefixed.html +++ b/dom/html/test/file_fullscreen-prefixed.html @@ -103,7 +103,7 @@ class TestCase { } }; this.changeListeners("add", eventType, handleEvent); - actionCallback(); + SimpleTest.waitForFocus(() => actionCallback()); }); }