Bug: Intermittent browser/components/search/test/browser/browser_contextmenu.js | single tracking bug
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2022-09-23 11:36:57+00:00
Resolved: 2022-11-22 17:05:45+00:00

**Filed by:** nfay [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=391280940&repo=mozilla-beta
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/J4L4emYXQcS5Cow4pYdyVw/runs/0/artifacts/public/logs/live_backing.log

---
```
[task 2022-09-23T11:23:53.388Z] 11:23:53     INFO - TEST-START | browser/components/search/test/browser/browser_contextmenu.js
[task 2022-09-23T11:23:54.020Z] 11:23:54     INFO - GECKO(3996) | 1663932234028	Marionette	TRACE	Received observer notification browser-delayed-startup-finished
[task 2022-09-23T11:23:54.050Z] 11:23:54     INFO - GECKO(3996) | JavaScript error: resource://gre/modules/XULStore.jsm, line 58: Error: Can't find profile directory.
[task 2022-09-23T11:23:54.061Z] 11:23:54     INFO - GECKO(3996) | JavaScript error: resource://gre/modules/XULStore.jsm, line 58: Error: Can't find profile directory.
[task 2022-09-23T11:23:54.586Z] 11:23:54     INFO - GECKO(3996) | JavaScript error: resource:///actors/ContextMenuChild.jsm, line 571: TypeError: doc is null
[task 2022-09-23T11:24:38.403Z] 11:24:38     INFO - TEST-INFO | started process screenshot
[task 2022-09-23T11:24:38.499Z] 11:24:38     INFO - TEST-INFO | screenshot: exit 0
[task 2022-09-23T11:24:38.503Z] 11:24:38     INFO - Buffered messages logged at 11:23:53
[task 2022-09-23T11:24:38.504Z] 11:24:38     INFO - Entering setup bound 
[task 2022-09-23T11:24:38.504Z] 11:24:38     INFO - Extension loaded
[task 2022-09-23T11:24:38.505Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Search provider extension should be running - "running" == "running" - 
[task 2022-09-23T11:24:38.505Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Extension ID of search provider should be set - "{a0d127fb-56b6-4c27-b135-4c50d1a2275b}" == true - 
[task 2022-09-23T11:24:38.506Z] 11:24:38     INFO - Extension loaded
[task 2022-09-23T11:24:38.506Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Search provider extension should be running - "running" == "running" - 
[task 2022-09-23T11:24:38.507Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Extension ID of search provider should be set - "{9577c30d-c74a-46a3-a108-8f347eccf796}" == true - 
[task 2022-09-23T11:24:38.509Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Got a search engine - {"QueryInterface":"function QueryInterface() {\n    [native code]\n}","name":"mozSearch","getSubmission":"function getSubmission() {\n    [native code]\n}","searchUrlQueryParamName":"test","searchUrlPublicSuffix":"com","supportsResponseType":"function supportsResponseType() {\n    [native code]\n}","getIconURLBySize":"function getIconURLBySize() {\n    [native code]\n}","getIcons":"function getIcons() {\n    [native code]\n}","speculativeConnect":"function speculativeConnect() {\n    [native code]\n}","alias":"","aliases":[],"description":null,"hidden":false,"iconURI":null,"searchForm":"https://example.com","sendAttributionRequest":false,"telemetryId":"other-mozSearch","identifier":null,"isAppProvided":false,"isGeneralPurposeEngine":false,"getResultDomain":"function getResultDomain() {\n    [native code]\n}"} == true - 
[task 2022-09-23T11:24:38.510Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Got a search engine - {"QueryInterface":"function QueryInterface() {\n    [native code]\n}","name":"mozPrivateSearch","getSubmission":"function getSubmission() {\n    [native code]\n}","searchUrlQueryParamName":"test","searchUrlPublicSuffix":"com","supportsResponseType":"function supportsResponseType() {\n    [native code]\n}","getIconURLBySize":"function getIconURLBySize() {\n    [native code]\n}","getIcons":"function getIcons() {\n    [native code]\n}","speculativeConnect":"function speculativeConnect() {\n    [native code]\n}","alias":"","aliases":[],"description":null,"hidden":false,"iconURI":null,"searchForm":"https://example.com","sendAttributionRequest":false,"telemetryId":"other-mozPrivateSearch","identifier":null,"isAppProvided":false,"isGeneralPurposeEngine":false,"getResultDomain":"function getResultDomain() {\n    [native code]\n}"} == true - 
[task 2022-09-23T11:24:38.510Z] 11:24:38     INFO - Leaving setup bound 
[task 2022-09-23T11:24:38.511Z] 11:24:38     INFO - Entering test bound test_normalWindow
[task 2022-09-23T11:24:38.511Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Got context menu XUL - [object XULPopupElement] == true - 
[task 2022-09-23T11:24:38.512Z] 11:24:38     INFO - Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use �<!DOCTYPE html>�." {file: "https://example.com/browser/browser/components/search/test/browser/test_search.html" line: 0}]
[task 2022-09-23T11:24:38.512Z] 11:24:38     INFO - checkContextMenu
[task 2022-09-23T11:24:38.513Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Got search context menu item - {"renderedOnce":true,"_accelTextIsDerived":true,"_ignoreAccelTextChange":true,"_inheritedElements":{".menu-iconic-text":null,".menu-text":{"_lastFormattedAccessKey":null},".menu-iconic-highlightable-text":null},"initializedAttributeInheritance":true,"searchTerms":"test%20search","principal":{},"csp":"{\"csp-policies\":[]}","usePrivate":false} == true - 
[task 2022-09-23T11:24:38.514Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Check context menu label - "Search mozSearch for �test%20search�" == "Search mozSearch for �test%20search�" - 
[task 2022-09-23T11:24:38.514Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Check that search context menu item is enabled - false == false - 
[task 2022-09-23T11:24:38.516Z] 11:24:38     INFO - Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use �<!DOCTYPE html>�." {file: "https://example.com/browser/browser/components/search/test/browser/mozsearch.sjs?test=test%2520search" line: 0}]
[task 2022-09-23T11:24:38.516Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Ensure there were no errors loading the search page - true == true - 
[task 2022-09-23T11:24:38.517Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Got search in private window context menu item - {"renderedOnce":true,"_accelTextIsDerived":true,"_ignoreAccelTextChange":true,"_inheritedElements":{".menu-iconic-text":null,".menu-text":{"_lastFormattedAccessKey":null},".menu-iconic-highlightable-text":null},"initializedAttributeInheritance":true,"searchTerms":"test%20search","principal":{},"csp":"{\"csp-policies\":[]}"} == true - 
[task 2022-09-23T11:24:38.518Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Check context menu label - "Search with mozPrivateSearch in a Private Window" == "Search with mozPrivateSearch in a Private Window" - 
[task 2022-09-23T11:24:38.518Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Check that search context menu item is enabled - false == false - 
[task 2022-09-23T11:24:38.519Z] 11:24:38     INFO - Leaving test bound test_normalWindow
[task 2022-09-23T11:24:38.519Z] 11:24:38     INFO - Entering test bound test_privateWindow
[task 2022-09-23T11:24:38.520Z] 11:24:38     INFO - Buffered messages logged at 11:23:54
[task 2022-09-23T11:24:38.520Z] 11:24:38     INFO - Console message: [JavaScript Error: "Error: Can't find profile directory." {file: "resource://gre/modules/XULStore.jsm" line: 58}]
[task 2022-09-23T11:24:38.520Z] 11:24:38     INFO - load@resource://gre/modules/XULStore.jsm:58:15
[task 2022-09-23T11:24:38.520Z] 11:24:38     INFO - XULStore@resource://gre/modules/XULStore.jsm:17:10
[task 2022-09-23T11:24:38.521Z] 11:24:38     INFO - 
[task 2022-09-23T11:24:38.522Z] 11:24:38     INFO - Console message: [JavaScript Error: "Error: Can't find profile directory." {file: "resource://gre/modules/XULStore.jsm" line: 58}]
[task 2022-09-23T11:24:38.522Z] 11:24:38     INFO - load@resource://gre/modules/XULStore.jsm:58:15
[task 2022-09-23T11:24:38.522Z] 11:24:38     INFO - XULStore@resource://gre/modules/XULStore.jsm:17:10
[task 2022-09-23T11:24:38.522Z] 11:24:38     INFO - 
[task 2022-09-23T11:24:38.523Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Got context menu XUL - {"AUTOSCROLL_INTERVAL":25,"NOT_DRAGGING":0,"DRAG_OVER_BUTTON":-1,"DRAG_OVER_POPUP":1,"_draggingState":0,"_scrollTimer":0,"isRunningDelayedConnectedCallback":false,"hasConnected":true} == true - 
[task 2022-09-23T11:24:38.524Z] 11:24:38     INFO - Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use �<!DOCTYPE html>�." {file: "https://example.com/browser/browser/components/search/test/browser/test_search.html" line: 0}]
[task 2022-09-23T11:24:38.525Z] 11:24:38     INFO - checkContextMenu
[task 2022-09-23T11:24:38.526Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Got search context menu item - {"renderedOnce":true,"_accelTextIsDerived":true,"_ignoreAccelTextChange":true,"_inheritedElements":{".menu-iconic-text":null,".menu-text":{"_lastFormattedAccessKey":null},".menu-iconic-highlightable-text":null},"initializedAttributeInheritance":true,"searchTerms":"test%20search","principal":{},"csp":"{\"csp-policies\":[]}","usePrivate":true} == true - 
[task 2022-09-23T11:24:38.527Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Check context menu label - "Search mozPrivateSearch for �test%20search�" == "Search mozPrivateSearch for �test%20search�" - 
[task 2022-09-23T11:24:38.528Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Check that search context menu item is enabled - false == false - 
[task 2022-09-23T11:24:38.528Z] 11:24:38     INFO - Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use �<!DOCTYPE html>�." {file: "https://example.com/browser/?test=test%2520search" line: 0}]
[task 2022-09-23T11:24:38.529Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Ensure there were no errors loading the search page - true == true - 
[task 2022-09-23T11:24:38.530Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Got search in private window context menu item - {"renderedOnce":true,"_accelTextIsDerived":true,"_ignoreAccelTextChange":true,"_inheritedElements":null,"initializedAttributeInheritance":true,"searchTerms":"test%20search","principal":{},"csp":"{\"csp-policies\":[]}"} == true - 
[task 2022-09-23T11:24:38.530Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Search in private window should be hidden - true == true - 
[task 2022-09-23T11:24:38.531Z] 11:24:38     INFO - Leaving test bound test_privateWindow
[task 2022-09-23T11:24:38.531Z] 11:24:38     INFO - Entering test bound test_normalWindow_sameDefaults
[task 2022-09-23T11:24:38.531Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Got context menu XUL - [object XULPopupElement] == true - 
[task 2022-09-23T11:24:38.533Z] 11:24:38     INFO - Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use �<!DOCTYPE html>�." {file: "https://example.com/browser/browser/components/search/test/browser/test_search.html" line: 0}]
[task 2022-09-23T11:24:38.533Z] 11:24:38     INFO - Console message: [JavaScript Error: "TypeError: doc is null" {file: "resource:///actors/ContextMenuChild.jsm" line: 571}]
[task 2022-09-23T11:24:38.533Z] 11:24:38     INFO - Buffered messages finished
[task 2022-09-23T11:24:38.534Z] 11:24:38     INFO - TEST-UNEXPECTED-FAIL | browser/components/search/test/browser/browser_contextmenu.js | Test timed out - 
[task 2022-09-23T11:24:38.534Z] 11:24:38     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-09-23T11:24:38.534Z] 11:24:38     INFO - TEST-UNEXPECTED-FAIL | browser/components/search/test/browser/browser_contextmenu.js | Extension left running at test shutdown - 
[task 2022-09-23T11:24:38.534Z] 11:24:38     INFO - Stack trace:
[task 2022-09-23T11:24:38.534Z] 11:24:38     INFO - chrome://mochikit/content/browser-test.js:test_ok:1457
[task 2022-09-23T11:24:38.534Z] 11:24:38     INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:ExtensionTestUtils.loadExtension/<:132
[task 2022-09-23T11:24:38.534Z] 11:24:38     INFO - chrome://mochikit/content/browser-test.js:nextTest:616
[task 2022-09-23T11:24:38.535Z] 11:24:38     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-09-23T11:24:38.536Z] 11:24:38     INFO - TEST-UNEXPECTED-FAIL | browser/components/search/test/browser/browser_contextmenu.js | Extension left running at test shutdown - 
[task 2022-09-23T11:24:38.536Z] 11:24:38     INFO - Stack trace:
[task 2022-09-23T11:24:38.536Z] 11:24:38     INFO - chrome://mochikit/content/browser-test.js:test_ok:1457
[task 2022-09-23T11:24:38.536Z] 11:24:38     INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:ExtensionTestUtils.loadExtension/<:132
[task 2022-09-23T11:24:38.536Z] 11:24:38     INFO - chrome://mochikit/content/browser-test.js:nextTest:616
[task 2022-09-23T11:24:38.537Z] 11:24:38     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-09-23T11:24:38.538Z] 11:24:38     INFO - TEST-UNEXPECTED-FAIL | browser/components/search/test/browser/browser_contextmenu.js | Uncaught exception received from previously timed out test - popupshown listener on #contentAreaContextMenu not removed before the end of test
[task 2022-09-23T11:24:38.538Z] 11:24:38     INFO - Entering test bound test_privateWindow_no_separate_engine
[task 2022-09-23T11:24:38.585Z] 11:24:38     INFO - GECKO(3996) | 1663932278596	Marionette	TRACE	Received observer notification browser-delayed-startup-finished
[task 2022-09-23T11:24:38.615Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Got context menu XUL - {"AUTOSCROLL_INTERVAL":25,"NOT_DRAGGING":0,"DRAG_OVER_BUTTON":-1,"DRAG_OVER_POPUP":1,"_draggingState":0,"_scrollTimer":0,"isRunningDelayedConnectedCallback":false,"hasConnected":true} == true - 
[task 2022-09-23T11:24:38.639Z] 11:24:38     INFO - GECKO(3996) | JavaScript error: resource://gre/modules/XULStore.jsm, line 58: Error: Can't find profile directory.
[task 2022-09-23T11:24:38.662Z] 11:24:38     INFO - Console message: [JavaScript Error: "Error: Can't find profile directory." {file: "resource://gre/modules/XULStore.jsm" line: 58}]
[task 2022-09-23T11:24:38.662Z] 11:24:38     INFO - load@resource://gre/modules/XULStore.jsm:58:15
[task 2022-09-23T11:24:38.662Z] 11:24:38     INFO - XULStore@resource://gre/modules/XULStore.jsm:17:10
[task 2022-09-23T11:24:38.662Z] 11:24:38     INFO - 
[task 2022-09-23T11:24:38.675Z] 11:24:38     INFO - Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use �<!DOCTYPE html>�." {file: "https://example.com/browser/browser/components/search/test/browser/test_search.html" line: 0}]
[task 2022-09-23T11:24:38.985Z] 11:24:38     INFO - checkContextMenu
[task 2022-09-23T11:24:38.988Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Got search context menu item - {"renderedOnce":true,"_accelTextIsDerived":true,"_ignoreAccelTextChange":true,"_inheritedElements":{".menu-iconic-text":null,".menu-text":{"_lastFormattedAccessKey":null},".menu-iconic-highlightable-text":null},"initializedAttributeInheritance":true,"searchTerms":"test%20search","principal":{},"csp":"{\"csp-policies\":[]}","usePrivate":true} == true - 
[task 2022-09-23T11:24:38.989Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Check context menu label - "Search mozSearch for �test%20search�" == "Search mozSearch for �test%20search�" - 
[task 2022-09-23T11:24:38.990Z] 11:24:38     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Check that search context menu item is enabled - false == false - 
[task 2022-09-23T11:24:39.022Z] 11:24:39     INFO - Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use �<!DOCTYPE html>�." {file: "https://example.com/browser/browser/components/search/test/browser/mozsearch.sjs?test=test%2520search" line: 0}]
[task 2022-09-23T11:24:39.045Z] 11:24:39     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Ensure there were no errors loading the search page - true == true - 
[task 2022-09-23T11:24:39.047Z] 11:24:39     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Got search in private window context menu item - {"renderedOnce":true,"_accelTextIsDerived":true,"_ignoreAccelTextChange":true,"_inheritedElements":null,"initializedAttributeInheritance":true,"searchTerms":"test%20search","principal":{},"csp":"{\"csp-policies\":[]}"} == true - 
[task 2022-09-23T11:24:39.048Z] 11:24:39     INFO - TEST-PASS | browser/components/search/test/browser/browser_contextmenu.js | Search in private window should be hidden - true == true - 
[task 2022-09-23T11:24:39.059Z] 11:24:39     INFO - Leaving test bound test_privateWindow_no_separate_engine
[task 2022-09-23T11:24:39.062Z] 11:24:39     INFO - Entering test bound cleanup
[task 2022-09-23T11:24:39.078Z] 11:24:39     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-09-23T11:24:39.092Z] 11:24:39     INFO - TEST-UNEXPECTED-FAIL | browser/components/search/test/browser/browser_contextmenu.js | Uncaught exception received from previously timed out test - at resource://specialpowers/SpecialPowersParent.jsm:1224 - TypeError: can't access property "shutdown", extension is undefined
[task 2022-09-23T11:24:39.092Z] 11:24:39     INFO - Stack trace:
[task 2022-09-23T11:24:39.092Z] 11:24:39     INFO - receiveMessage@resource://specialpowers/SpecialPowersParent.jsm:1224:11
[task 2022-09-23T11:24:39.563Z] 11:24:39     INFO - GECKO(3996) | MEMORY STAT | vsize 2112375MB | vsizeMaxContiguous 66229503MB | residentFast 265MB | heapAllocated 107MB
[task 2022-09-23T11:24:39.565Z] 11:24:39     INFO - TEST-OK | browser/components/search/test/browser/browser_contextmenu.js | took 46177ms
[task 2022-09-23T11:24:39.566Z] 11:24:39     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-09-23T11:24:39.567Z] 11:24:39     INFO - TEST-UNEXPECTED-FAIL | browser/components/search/test/browser/browser_contextmenu.js | Found a tab after previous test timed out: https://example.com/browser/browser/components/search/test/browser/test_search.html - 
[task 2022-09-23T11:24:39.578Z] 11:24:39     INFO - checking window state
[task 2022-09-23T11:24:39.579Z] 11:24:39     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-09-23T11:24:39.580Z] 11:24:39     INFO - TEST-UNEXPECTED-FAIL | browser/components/search/test/browser/browser_contextmenu.js | Found a browser window after previous test timed out - 
[task 2022-09-23T11:24:39.580Z] 11:24:39     INFO - GECKO(3996) | must wait for focus
[task 2022-09-23T11:24:39.607Z] 11:24:39     INFO - TEST-START | browser/components/search/test/browser/browser_contextmenu_whereToOpenLink.js
```