Bug: Intermittent browser/components/downloads/test/browser/browser_pdfjs_preview.js | The 'Use system viewer' menu item was visible - Got true, expected false
Status: RESOLVED
Priority: P5
Resolution: DUPLICATE
Created: 2021-09-15 08:30:53+00:00
Resolved: 2022-08-24 22:00:18+00:00

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

---
```
[task 2021-09-15T07:34:21.440Z] 07:34:21     INFO - TEST-START | browser/components/downloads/test/browser/browser_pdfjs_preview.js
[task 2021-09-15T07:34:23.079Z] 07:34:23     INFO - TEST-INFO | started process screenshot
[task 2021-09-15T07:34:23.248Z] 07:34:23     INFO - TEST-INFO | screenshot: exit 0
[task 2021-09-15T07:34:23.254Z] 07:34:23     INFO - Buffered messages logged at 07:34:21
[task 2021-09-15T07:34:23.254Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | A valid string reason is expected - 
[task 2021-09-15T07:34:23.255Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | Reason cannot be empty - 
[task 2021-09-15T07:34:23.256Z] 07:34:23     INFO - Skipping test:Private download in about:downloads, opens in new private window
[task 2021-09-15T07:34:23.256Z] 07:34:23     INFO - Entering test bound Download panel, default click behavior
[task 2021-09-15T07:34:23.257Z] 07:34:23     INFO - Test case: Download panel, default click behavior
[task 2021-09-15T07:34:23.257Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | At the start of the test, there should be 0 downloads - 
[task 2021-09-15T07:34:23.258Z] 07:34:23     INFO - Created download directory: C:\Users\task_163168811693027\AppData\LocalLow\Mozilla\Temp-{55603d80-11f9-44c7-9821-d1f53fef66d5}\testsavedir514333940
[task 2021-09-15T07:34:23.258Z] 07:34:23     INFO - Adding download objects
[task 2021-09-15T07:34:23.259Z] 07:34:23     INFO - addPDFDownload with itemData: {
[task 2021-09-15T07:34:23.259Z] 07:34:23     INFO -   "targetFilename": "downloaded.pdf"
[task 2021-09-15T07:34:23.259Z] 07:34:23     INFO - }
[task 2021-09-15T07:34:23.260Z] 07:34:23     INFO - Creating saved download file at:C:\Users\task_163168811693027\AppData\LocalLow\Mozilla\Temp-{55603d80-11f9-44c7-9821-d1f53fef66d5}\testsavedir514333940\downloaded.pdf
[task 2021-09-15T07:34:23.261Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | Created C:\Users\task_163168811693027\AppData\LocalLow\Mozilla\Temp-{55603d80-11f9-44c7-9821-d1f53fef66d5}\testsavedir514333940\downloaded.pdf - 
[task 2021-09-15T07:34:23.261Z] 07:34:23     INFO - Created file at:C:\Users\task_163168811693027\AppData\LocalLow\Mozilla\Temp-{55603d80-11f9-44c7-9821-d1f53fef66d5}\testsavedir514333940\downloaded.pdf
[task 2021-09-15T07:34:23.262Z] 07:34:23     INFO - Got download pathname:C:\Users\task_163168811693027\AppData\LocalLow\Mozilla\Temp-{55603d80-11f9-44c7-9821-d1f53fef66d5}\testsavedir514333940\downloaded.pdf
[task 2021-09-15T07:34:23.262Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | Added download is not private as expected - 
[task 2021-09-15T07:34:23.263Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | Public list has expected 1 downloads - 
[task 2021-09-15T07:34:23.264Z] 07:34:23     INFO - pdfFileURI:file:///C:/Users/task_163168811693027/AppData/LocalLow/Mozilla/Temp-%7B55603d80-11f9-44c7-9821-d1f53fef66d5%7D/testsavedir514333940/downloaded.pdf
[task 2021-09-15T07:34:23.264Z] 07:34:23     INFO - previewHappened will wait for tab with URI:file:///C:/Users/task_163168811693027/AppData/LocalLow/Mozilla/Temp-%7B55603d80-11f9-44c7-9821-d1f53fef66d5%7D/testsavedir514333940/downloaded.pdf
[task 2021-09-15T07:34:23.265Z] 07:34:23     INFO - Opening download panel
[task 2021-09-15T07:34:23.265Z] 07:34:23     INFO - /Opening download panel
[task 2021-09-15T07:34:23.266Z] 07:34:23     INFO - trigger the contextmenu
[task 2021-09-15T07:34:23.266Z] 07:34:23     INFO - context menu should be open, verify its menu items
[task 2021-09-15T07:34:23.267Z] 07:34:23     INFO - verifyContextMenu with expected: {
[task 2021-09-15T07:34:23.267Z] 07:34:23     INFO -   "useSystemMenuItemDisabled": false,
[task 2021-09-15T07:34:23.267Z] 07:34:23     INFO -   "alwaysMenuItemDisabled": false,
[task 2021-09-15T07:34:23.267Z] 07:34:23     INFO -   "downloadCount": 1,
[task 2021-09-15T07:34:23.267Z] 07:34:23     INFO -   "newWindow": false,
[task 2021-09-15T07:34:23.267Z] 07:34:23     INFO -   "opensTab": true,
[task 2021-09-15T07:34:23.267Z] 07:34:23     INFO -   "tabSelected": true
[task 2021-09-15T07:34:23.267Z] 07:34:23     INFO - }
[task 2021-09-15T07:34:23.268Z] 07:34:23     INFO - Waiting for the context menu to show up
[task 2021-09-15T07:34:23.268Z] 07:34:23     INFO - Checking visibility of the system viewer menu items
[task 2021-09-15T07:34:23.269Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | The 'Use system viewer' menu item was visible - 
[task 2021-09-15T07:34:23.269Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | The 'Use system viewer' menu item was visible - 
[task 2021-09-15T07:34:23.270Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | The 'Always...' menu item not checked - 
[task 2021-09-15T07:34:23.270Z] 07:34:23     INFO - Executing user events
[task 2021-09-15T07:34:23.271Z] 07:34:23     INFO - Waiting for previewHappened
...
[task 2021-09-15T07:34:23.312Z] 07:34:23     INFO - previewHappened will wait for tab with URI:file:///C:/Users/task_163168811693027/AppData/LocalLow/Mozilla/Temp-%7B55603d80-11f9-44c7-9821-d1f53fef66d5%7D/testsavedir514333940/downloaded.pdf
[task 2021-09-15T07:34:23.313Z] 07:34:23     INFO - Opening download panel
[task 2021-09-15T07:34:23.313Z] 07:34:23     INFO - /Opening download panel
[task 2021-09-15T07:34:23.314Z] 07:34:23     INFO - trigger the contextmenu
[task 2021-09-15T07:34:23.314Z] 07:34:23     INFO - context menu should be open, verify its menu items
[task 2021-09-15T07:34:23.315Z] 07:34:23     INFO - verifyContextMenu with expected: {
[task 2021-09-15T07:34:23.315Z] 07:34:23     INFO -   "useSystemMenuItemDisabled": false,
[task 2021-09-15T07:34:23.316Z] 07:34:23     INFO -   "alwaysMenuItemDisabled": false,
[task 2021-09-15T07:34:23.316Z] 07:34:23     INFO -   "downloadCount": 1,
[task 2021-09-15T07:34:23.316Z] 07:34:23     INFO -   "newWindow": false,
[task 2021-09-15T07:34:23.316Z] 07:34:23     INFO -   "opensTab": true,
[task 2021-09-15T07:34:23.316Z] 07:34:23     INFO -   "tabSelected": true
[task 2021-09-15T07:34:23.316Z] 07:34:23     INFO - }
[task 2021-09-15T07:34:23.316Z] 07:34:23     INFO - Waiting for the context menu to show up
[task 2021-09-15T07:34:23.317Z] 07:34:23     INFO - Checking visibility of the system viewer menu items
[task 2021-09-15T07:34:23.317Z] 07:34:23     INFO - Buffered messages finished
[task 2021-09-15T07:34:23.319Z] 07:34:23     INFO - TEST-UNEXPECTED-FAIL | browser/components/downloads/test/browser/browser_pdfjs_preview.js | The 'Use system viewer' menu item was visible - Got true, expected false
[task 2021-09-15T07:34:23.319Z] 07:34:23     INFO - Stack trace:
[task 2021-09-15T07:34:23.319Z] 07:34:23     INFO - chrome://mochikit/content/browser-test.js:test_is:1364
[task 2021-09-15T07:34:23.319Z] 07:34:23     INFO - chrome://mochitests/content/browser/browser/components/downloads/test/browser/browser_pdfjs_preview.js:verifyContextMenu:388
[task 2021-09-15T07:34:23.320Z] 07:34:23     INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-09-15T07:34:23.320Z] 07:34:23     INFO - TEST-UNEXPECTED-FAIL | browser/components/downloads/test/browser/browser_pdfjs_preview.js | The 'Use system viewer' menu item was visible - Got true, expected false
[task 2021-09-15T07:34:23.320Z] 07:34:23     INFO - Stack trace:
[task 2021-09-15T07:34:23.321Z] 07:34:23     INFO - chrome://mochikit/content/browser-test.js:test_is:1364
[task 2021-09-15T07:34:23.321Z] 07:34:23     INFO - chrome://mochitests/content/browser/browser/components/downloads/test/browser/browser_pdfjs_preview.js:verifyContextMenu:395
[task 2021-09-15T07:34:23.321Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | The 'Always...' menu item not checked - 
[task 2021-09-15T07:34:23.322Z] 07:34:23     INFO - Executing user events
[task 2021-09-15T07:34:23.323Z] 07:34:23     INFO - Waiting for previewHappened
[task 2021-09-15T07:34:23.323Z] 07:34:23     INFO - Console message: [JavaScript Warning: "Key event not available on some keyboard layouts: key=�i� modifiers=�accel,alt,shift� id=�key_browserToolbox�" {file: "chrome://mochikit/content/tests/SimpleTest/EventUtils.js" line: 1361}]
[task 2021-09-15T07:34:23.324Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | Got preview tab - 
[task 2021-09-15T07:34:23.325Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | The preview tab was selected - 
[task 2021-09-15T07:34:23.325Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | previewTab has the expected currentURI - 
[task 2021-09-15T07:34:23.326Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | The preview tab was not private as expected - 
[task 2021-09-15T07:34:23.326Z] 07:34:23     INFO - cleaning up
[task 2021-09-15T07:34:23.327Z] 07:34:23     INFO - Test opened a new UI window? false
[task 2021-09-15T07:34:23.327Z] 07:34:23     INFO - Waiting for lastPBContextExitedPromise
[task 2021-09-15T07:34:23.330Z] 07:34:23     INFO - Leaving test bound Download panel, open from keyboard
[task 2021-09-15T07:34:23.330Z] 07:34:23     INFO - Entering test bound Download panel, open in new window
[task 2021-09-15T07:34:23.331Z] 07:34:23     INFO - Test case: Download panel, open in new window
[task 2021-09-15T07:34:23.332Z] 07:34:23     INFO - TEST-PASS | browser/components/downloads/test/browser/browser_pdfjs_preview.js | At the start of the test, there should be 0 downloads - 
[task 2021-09-15T07:34:23.333Z] 07:34:23     INFO - Created download directory: C:\Users\task_163168811693027\AppData\LocalLow\Mozilla\Temp-{55603d80-11f9-44c7-9821-d1f53fef66d5}\testsavedir514333940
[task 2021-09-15T07:34:23.334Z] 07:34:23     INFO - Adding download objects
[task 2021-09-15T07:34:23.334Z] 07:34:23     INFO - addPDFDownload with itemData: {
[task 2021-09-15T07:34:23.334Z] 07:34:23     INFO -   "targetFilename": "downloaded.pdf"
[task 2021-09-15T07:34:23.334Z] 07:34:23     INFO - }
```