Bug: Intermittent browser/base/content/test/general/browser_documentnavigation.js | back focus with downloads panel open element matches (wanted:  got: downloadsHistory) - Got [object XULElement], expected [object XULFrameElement]
Status: RESOLVED
Priority: P5
Resolution: FIXED
Created: 2021-12-22 00:03:52+00:00
Resolved: 2022-01-17 06:03:50+00:00

**Filed by:** ccozmuta [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=362067295&repo=autoland
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/HzIITjo7TNqsjk0NvoaLUA/runs/1/artifacts/public/logs/live_backing.log

---
```
[task 2021-12-21T22:54:34.356Z] 22:54:34     INFO - TEST-START | browser/base/content/test/general/browser_documentnavigation.js
[task 2021-12-21T22:54:34.384Z] 22:54:34     INFO - GECKO(2695) | [Parent 2695, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x804B0050 (NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS): file /builds/worker/checkouts/gecko/toolkit/components/antitracking/URLQueryStringStripper.cpp:129
[task 2021-12-21T22:54:34.387Z] 22:54:34     INFO - GECKO(2695) | [Child 2770, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x804B0050 (NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS): file /builds/worker/checkouts/gecko/toolkit/components/antitracking/URLQueryStringStripper.cpp:129
[task 2021-12-21T22:54:34.420Z] 22:54:34     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 9 (7f0291b0c800) [pid = 2891] [serial = 159] [outer = 0] [url = about:blank]
[task 2021-12-21T22:54:34.420Z] 22:54:34     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 8 (7f0298644c00) [pid = 2891] [serial = 155] [outer = 0] [url = about:blank]
[task 2021-12-21T22:54:34.422Z] 22:54:34     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 7 (7f0291b07800) [pid = 2891] [serial = 157] [outer = 0] [url = about:blank]
[task 2021-12-21T22:54:34.423Z] 22:54:34     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f0291b0bc00 == 2 [pid = 2891] [id = 62] [url = about:blank]
[task 2021-12-21T22:54:34.424Z] 22:54:34     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f0291b09000 == 1 [pid = 2891] [id = 63] [url = about:blank]
[task 2021-12-21T22:54:34.457Z] 22:54:34     INFO - GECKO(2695) | [Child 2770: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 7 (7f71256bf000) [pid = 2770] [serial = 161] [outer = 7f7126ca1200]
[task 2021-12-21T22:54:34.619Z] 22:54:34     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 6 (7f0291585740) [pid = 2891] [serial = 158] [outer = 0] [url = about:blank]
[task 2021-12-21T22:54:34.621Z] 22:54:34     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 5 (7f0291585040) [pid = 2891] [serial = 161] [outer = 0] [url = about:blank]
[task 2021-12-21T22:54:34.675Z] 22:54:34     INFO - GECKO(2695) | [Child 2913: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 5 (7f40322da400) [pid = 2913] [serial = 128] [outer = 0] [url = data:text/html,<p><a id="commonlink" href="http://mochi.test/moz/">Common link</a></p><p><math id="mathlink" xmlns="http://www.w3.org/1998/Math/MathML" href="http://mochi.test/moz/"><mtext>MathML XLink</mtext></math></p><p><svg id="svgxlink" xmlns="http://www.w3.org/2000/svg" width="100px" height="50px" version="1.1"><a xlink:type="simple" xlink:href="http://mochi.test/moz/"><text transform="translate(10, 25)">SVG XLink</text></a></svg></p><br><span id="host"></span><script>document.getElementById("host").attachShadow({mode: "closed"}).appendChild(document.getElementById("commonlink").cloneNode(true));</script><iframe id="frame" src="https://test2.example.com:443/browser/browser/base/content/test/general/file_with_link_to_http.html"></iframe>]
[task 2021-12-21T22:54:34.675Z] 22:54:34     INFO - GECKO(2695) | [Child 2913: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 4 (7f40322de000) [pid = 2913] [serial = 130] [outer = 0] [url = https://test2.example.com/browser/browser/base/content/test/general/file_with_link_to_http.html]
[task 2021-12-21T22:54:34.675Z] 22:54:34     INFO - GECKO(2695) | [Child 2913: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 3 (7f4032b03800) [pid = 2913] [serial = 132] [outer = 0] [url = about:blank]
[task 2021-12-21T22:54:34.675Z] 22:54:34     INFO - GECKO(2695) | [Child 2913: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (7f40322d3400) [pid = 2913] [serial = 127] [outer = 0] [url = about:blank]
[task 2021-12-21T22:54:34.675Z] 22:54:34     INFO - GECKO(2695) | [Child 2913: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f40322de800 == 0 [pid = 2913] [id = 45] [url = about:blank]
[task 2021-12-21T22:54:34.736Z] 22:54:34     INFO - GECKO(2695) | [Child 2913: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 1 (7f4032ba1ac0) [pid = 2913] [serial = 131] [outer = 0] [url = about:blank]
[task 2021-12-21T22:54:34.864Z] 22:54:34     INFO - GECKO(2695) | [Parent 2695, Main Thread] WARNING: '!IsSelectionValid()', file /builds/worker/checkouts/gecko/widget/ContentCache.cpp:667
[task 2021-12-21T22:54:34.864Z] 22:54:34     INFO - GECKO(2695) | [Parent 2695, Main Thread] WARNING: '!mContentCache.HandleQueryContentEvent( aEvent, textInputHandlingWidget)', file /builds/worker/checkouts/gecko/dom/ipc/BrowserParent.cpp:3052
[task 2021-12-21T22:54:35.129Z] 22:54:35     INFO - GECKO(2695) | [Parent 2695, Main Thread] WARNING: '!IsSelectionValid()', file /builds/worker/checkouts/gecko/widget/ContentCache.cpp:667
[task 2021-12-21T22:54:35.130Z] 22:54:35     INFO - GECKO(2695) | [Parent 2695, Main Thread] WARNING: '!mContentCache.HandleQueryContentEvent( aEvent, textInputHandlingWidget)', file /builds/worker/checkouts/gecko/dom/ipc/BrowserParent.cpp:3052
[task 2021-12-21T22:54:35.331Z] 22:54:35     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 7f0291b07800 == 2 [pid = 2891] [id = 65]
[task 2021-12-21T22:54:35.332Z] 22:54:35     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 6 (7f0291585040) [pid = 2891] [serial = 166] [outer = 0]
[task 2021-12-21T22:54:35.332Z] 22:54:35     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 7 (7f0291b07c00) [pid = 2891] [serial = 167] [outer = 7f0291585040]
<...>
[task 2021-12-21T22:54:39.254Z] 22:54:39     INFO - Leaving test bound 
[task 2021-12-21T22:54:39.254Z] 22:54:39     INFO - Entering test bound test_download_focus
[task 2021-12-21T22:54:39.255Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | focus with downloads panel open panel document matches - 
[task 2021-12-21T22:54:39.256Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | focus with downloads panel open panel element matches (wanted: downloadsHistory got: downloadsHistory) - 
[task 2021-12-21T22:54:39.256Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | expected element html1 was found - 
[task 2021-12-21T22:54:39.257Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | focus with downloads panel open child focus matches - 
[task 2021-12-21T22:54:39.258Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | focus with downloads panel open document matches - 
[task 2021-12-21T22:54:39.259Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | focus with downloads panel open element matches (wanted:  got: ) - 
[task 2021-12-21T22:54:39.259Z] 22:54:39     INFO - Buffered messages logged at 22:54:38
[task 2021-12-21T22:54:39.260Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | focus downloads panel open urlbar document matches - 
[task 2021-12-21T22:54:39.261Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | focus downloads panel open urlbar element matches (wanted: urlbar-input got: urlbar-input) - 
[task 2021-12-21T22:54:39.261Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | expected element html1 was found - 
[task 2021-12-21T22:54:39.262Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | back focus with downloads panel open child focus matches - 
[task 2021-12-21T22:54:39.263Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | back focus with downloads panel open document matches - 
[task 2021-12-21T22:54:39.263Z] 22:54:39     INFO - Buffered messages finished
[task 2021-12-21T22:54:39.265Z] 22:54:39     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_documentnavigation.js | back focus with downloads panel open element matches (wanted:  got: downloadsHistory) - Got [object XULElement], expected [object XULFrameElement]
[task 2021-12-21T22:54:39.265Z] 22:54:39     INFO - Stack trace:
[task 2021-12-21T22:54:39.265Z] 22:54:39     INFO - chrome://mochikit/content/browser-test.js:test_is:1403
[task 2021-12-21T22:54:39.265Z] 22:54:39     INFO - chrome://mochitests/content/browser/browser/base/content/test/general/browser_documentnavigation.js:expectFocusOnF6:106
[task 2021-12-21T22:54:39.266Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | back focus with downloads panel open document matches - 
[task 2021-12-21T22:54:39.267Z] 22:54:39     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-12-21T22:54:39.268Z] 22:54:39     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_documentnavigation.js | back focus with downloads panel open element matches (wanted: downloadsHistory got: urlbar-input) - Got [object HTMLInputElement], expected [object XULElement]
[task 2021-12-21T22:54:39.268Z] 22:54:39     INFO - Stack trace:
[task 2021-12-21T22:54:39.268Z] 22:54:39     INFO - chrome://mochikit/content/browser-test.js:test_is:1403
[task 2021-12-21T22:54:39.268Z] 22:54:39     INFO - chrome://mochitests/content/browser/browser/base/content/test/general/browser_documentnavigation.js:expectFocusOnF6:106
[task 2021-12-21T22:54:39.269Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | back focus downloads panel open urlbar document matches - 
[task 2021-12-21T22:54:39.270Z] 22:54:39     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-12-21T22:54:39.271Z] 22:54:39     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_documentnavigation.js | back focus downloads panel open urlbar element matches (wanted: urlbar-input got: ) - Got [object XULFrameElement], expected [object HTMLInputElement]
[task 2021-12-21T22:54:39.271Z] 22:54:39     INFO - Stack trace:
[task 2021-12-21T22:54:39.271Z] 22:54:39     INFO - chrome://mochikit/content/browser-test.js:test_is:1403
[task 2021-12-21T22:54:39.271Z] 22:54:39     INFO - chrome://mochitests/content/browser/browser/base/content/test/general/browser_documentnavigation.js:expectFocusOnF6:106
[task 2021-12-21T22:54:39.272Z] 22:54:39     INFO - Leaving test bound test_download_focus
[task 2021-12-21T22:54:39.272Z] 22:54:39     INFO - Entering test bound 
[task 2021-12-21T22:54:39.273Z] 22:54:39     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 7f0291b07400 == 1 [pid = 2891] [id = 66]
[task 2021-12-21T22:54:39.274Z] 22:54:39     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 4 (7f0291585040) [pid = 2891] [serial = 169] [outer = 0]
[task 2021-12-21T22:54:39.275Z] 22:54:39     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 5 (7f0291b07800) [pid = 2891] [serial = 170] [outer = 7f0291585040]
[task 2021-12-21T22:54:39.276Z] 22:54:39     INFO - GECKO(2695) | [Parent 2695, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x804B0050 (NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS): file /builds/worker/checkouts/gecko/toolkit/components/antitracking/URLQueryStringStripper.cpp:129
[task 2021-12-21T22:54:39.277Z] 22:54:39     INFO - GECKO(2695) | [Child 2891, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, false) failed with result 0x804B0050 (NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS): file /builds/worker/checkouts/gecko/toolkit/components/antitracking/URLQueryStringStripper.cpp:129
[task 2021-12-21T22:54:39.292Z] 22:54:39     INFO - GECKO(2695) | [Child 2891: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 6 (7f0291b06c00) [pid = 2891] [serial = 171] [outer = 7f0291585040]
[task 2021-12-21T22:54:39.312Z] 22:54:39     INFO - GECKO(2695) | [Child 2891, Main Thread] WARNING: '!aChild->IsContent()', file /builds/worker/workspace/obj-build/dist/include/mozilla/EditorDOMPoint.h:525
[task 2021-12-21T22:54:39.416Z] 22:54:39     INFO - Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”." {file: "data:text/html,<html id='html3'><body id='body3' contenteditable='true'><button id='button3'>Tab 3</button></body></html>" line: 0}]
[task 2021-12-21T22:54:39.477Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | expected element body3 was found - 
[task 2021-12-21T22:54:39.642Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | focus with contenteditable body child focus matches - 
[task 2021-12-21T22:54:39.643Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | focus with contenteditable body document matches - 
[task 2021-12-21T22:54:39.646Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | focus with contenteditable body element matches (wanted:  got: ) - 
[task 2021-12-21T22:54:39.673Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | focus with contenteditable body urlbar document matches - 
[task 2021-12-21T22:54:39.674Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | focus with contenteditable body urlbar element matches (wanted: urlbar-input got: urlbar-input) - 
[task 2021-12-21T22:54:39.681Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | expected element body3 was found - 
[task 2021-12-21T22:54:39.796Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | back focus with contenteditable body child focus matches - 
[task 2021-12-21T22:54:39.797Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | back focus with contenteditable body document matches - 
[task 2021-12-21T22:54:39.798Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | back focus with contenteditable body element matches (wanted:  got: ) - 
[task 2021-12-21T22:54:39.836Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | back focus with contenteditable body urlbar document matches - 
[task 2021-12-21T22:54:39.837Z] 22:54:39     INFO - TEST-PASS | browser/base/content/test/general/browser_documentnavigation.js | back focus with contenteditable body urlbar element matches (wanted: urlbar-input got: urlbar-input) - 
[task 2021-12-21T22:54:39.897Z] 22:54:39     INFO - Leaving test bound 
```