Closed Bug 1618102 Opened 4 years ago Closed 4 years ago

Full screen API "is caller in focused tab" check needs to use BrowsingContext instead of DOM window

Categories

(Core :: DOM: Core & HTML, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla75
Fission Milestone M5
Tracking Status
firefox75 --- fixed

People

(Reporter: hsivonen, Assigned: hsivonen)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Priority: -- → P2

There's a test for this stuff in the chrome-process context and, of course, BrowsingContext::Top() doesn't have the right semantics for that:
dom/tests/mochitest/chrome/test_MozDomFullscreen_event.xhtml

Blocks: 1618135
Blocks: 1618119
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a55fe811294d
Use BrowsingContext for Full screen API "is caller in focused tab?" check. r=farre

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=linux%2C18.04%2Cx64%2Cdebug%2Cmochitests%2Cwith%2Cfission%2Cenabled%2Ctest-linux1804-64%2Fdebug-mochitest-browser-chrome-fis-e10s-2%2Cm-fis%28bc2%29&group_state=expanded&fromchange=a55fe811294d91e2c7d64e79344bfab96e2a7958&tochange=a546217f66bf0759aaa6c5a836ecb033e95479cd&selectedJob=290665246

Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=290660221&repo=autoland

Backout link: https://hg.mozilla.org/integration/autoland/rev/aaf8be7a47db162f112caa481661b294dbdf4bb8

[task 2020-02-26T22:45:43.488Z] 22:45:43     INFO - TEST-PASS | browser/base/content/test/fullscreen/browser_fullscreen_window_focus.js | Should leave full-screen - 
[task 2020-02-26T22:45:43.488Z] 22:45:43     INFO - Leaving test bound test_parentWindowFocus
[task 2020-02-26T22:45:43.489Z] 22:45:43     INFO - Entering test bound test_iframeWindowFocus
[task 2020-02-26T22:45:43.490Z] 22:45:43     INFO - Buffered messages logged at 22:44:17
[task 2020-02-26T22:45:43.491Z] 22:45:43     INFO - Calling window.open()
[task 2020-02-26T22:45:43.492Z] 22:45:43     INFO - Buffered messages logged at 22:44:20
[task 2020-02-26T22:45:43.493Z] 22:45:43     INFO - re-focusing main window
[task 2020-02-26T22:45:43.494Z] 22:45:43     INFO - must wait for focus
[task 2020-02-26T22:45:43.498Z] 22:45:43     INFO - Entering full-screen
[task 2020-02-26T22:45:43.500Z] 22:45:43     INFO - Buffered messages logged at 22:44:21
[task 2020-02-26T22:45:43.501Z] 22:45:43     INFO - Console message: [JavaScript Warning: "Request for fullscreen was denied because requesting element is not in the currently focused tab." {file: "http://example.com/browser/browser/base/content/test/fullscreen/open_and_focus_helper.html" line: 0}]
[task 2020-02-26T22:45:43.502Z] 22:45:43     INFO - Console message: [JavaScript Error: "TypeError: Fullscreen request denied"]
[task 2020-02-26T22:45:43.503Z] 22:45:43     INFO - Buffered messages finished
[task 2020-02-26T22:45:43.504Z] 22:45:43     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/fullscreen/browser_fullscreen_window_focus.js | Test timed out - 
[task 2020-02-26T22:45:43.505Z] 22:45:43     INFO - GECKO(1779) | MEMORY STAT | vsize 3329MB | residentFast 360MB | heapAllocated 108MB
[task 2020-02-26T22:45:43.506Z] 22:45:43     INFO - TEST-OK | browser/base/content/test/fullscreen/browser_fullscreen_window_focus.js | took 90036ms
[task 2020-02-26T22:45:43.507Z] 22:45:43     INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-02-26T22:45:43.508Z] 22:45:43     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/fullscreen/browser_fullscreen_window_focus.js | Found a tab after previous test timed out: http://example.com/browser/browser/base/content/test/fullscreen/open_and_focus_helper.html - 
[task 2020-02-26T22:45:43.509Z] 22:45:43     INFO - GECKO(1779) | [Child 2364, Main Thread] WARNING: NS_ENSURE_TRUE(aWindow) failed: file /builds/worker/workspace/build/src/dom/base/nsFocusManager.cpp, line 551
[task 2020-02-26T22:45:43.510Z] 22:45:43     INFO - GECKO(1779) | [Child 2446: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 0x7fab3c61c800 == 1 [pid = 2446] [id = {8c2b68ac-b210-4167-904c-2f29e70740f3}]
[task 2020-02-26T22:45:43.512Z] 22:45:43     INFO - GECKO(1779) | [Child 2446: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 1 (0x7fab57893520) [pid = 2446] [serial = 1] [outer = (nil)]
[task 2020-02-26T22:45:43.513Z] 22:45:43     INFO - GECKO(1779) | [Child 2446, Main Thread] WARNING: NS_ENSURE_TRUE(mPresShell) failed: file /builds/worker/workspace/build/src/layout/base/nsPresContext.cpp, line 848
[task 2020-02-26T22:45:43.514Z] 22:45:43     INFO - GECKO(1779) | [Child 2446: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 2 (0x7fab3c8b1000) [pid = 2446] [serial = 2] [outer = 0x7fab57893520]
[task 2020-02-26T22:45:43.516Z] 22:45:43     INFO - checking window state
[task 2020-02-26T22:45:43.517Z] 22:45:43     INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-02-26T22:45:43.518Z] 22:45:43     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/fullscreen/browser_fullscreen_window_focus.js | Found a browser window after previous test timed out - 
[task 2020-02-26T22:45:43.584Z] 22:45:43     INFO - GECKO(1779) | [Parent 1779, Main Thread] WARNING: NS_ENSURE_TRUE(GetWrapper()) failed: file /builds/worker/workspace/build/src/dom/ipc/JSWindowActor.cpp, line 66
[task 2020-02-26T22:45:43.660Z] 22:45:43     INFO - TEST-START | browser/base/content/test/fullscreen/browser_fullscreen_window_open.js
Flags: needinfo?(hsivonen)

(In reply to Cosmin Sabou [:CosminS] from comment #6)

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=linux%2C18.04%2Cx64%2Cdebug%2Cmochitests%2Cwith%2Cfission%2Cenabled%2Ctest-linux1804-64%2Fdebug-mochitest-browser-chrome-fis-e10s-2%2Cm-fis%28bc2%29&group_state=expanded&fromchange=a55fe811294d91e2c7d64e79344bfab96e2a7958&tochange=a546217f66bf0759aaa6c5a836ecb033e95479cd&selectedJob=290665246

Do I understand correctly that this failed once on landing, but a retrigger of the test succeeded and the subsequent runs until backout also succeeded? I.e. we're looking at an intermittent and the first run at landing was unlucky?

Flags: needinfo?(hsivonen) → needinfo?(csabou)

I now see that there are other failures, but they are substantially similar to the pre-existing bug 1611355. I think the right way forward is to re-push this and attribute the failures to bug 1611355.

Flags: needinfo?(csabou)
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/25c5f7118de8
Use BrowsingContext for Full screen API "is caller in focused tab?" check. r=farre
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75

M5

Fission Milestone: --- → M5
Regressions: 1618386
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: