Closed Bug 1704628 Opened 3 years ago Closed 3 years ago

Make devtools context menu tests work with macOS native context menus

Categories

(Core :: Widget: Cocoa, defect)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: bradwerth, Assigned: bradwerth)

References

Details

(Whiteboard: [proton-uplift])

Attachments

(4 files, 2 obsolete files)

Bug 1704572 will turn on native context menus for macOS. Many devtools tests that use context menus fail with that change. This bug will track efforts to make those tests pass.

Attachment #9215266 - Attachment description: WIP: Bug 1704628 Part 1: Make selectContextMenuItem use .click() semantics. → Bug 1704628 Part 1: Make selectContextMenuItem use .click() semantics.
Attachment #9215266 - Attachment description: Bug 1704628 Part 1: Make selectContextMenuItem use .click() semantics. → Bug 1704628 Part 1: Make selectContextMenuItem use .activateItem() semantics.

Marking as leave-open as I expect to be landing patches while adding more patches.

Keywords: leave-open
Attachment #9215935 - Attachment is obsolete: true
Attachment #9215936 - Attachment description: Bug 1704628 Part 4: Make test browser_menu_api.js use activateItem semantics. → Bug 1704628 Part 3: Make test browser_menu_api.js use activateItem semantics.
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c8093ead9bf2
Part 1: Make selectContextMenuItem use .activateItem() semantics. r=ochameau
https://hg.mozilla.org/integration/autoland/rev/5846eb066549
Part 2: Make a breakpoint context menu test await the correct number of dispatch events. r=ochameau
https://hg.mozilla.org/integration/autoland/rev/4fabf90e7df1
Part 3: Make test browser_menu_api.js use activateItem semantics. r=mac-reviewers,mstange
Attachment #9215936 - Attachment description: Bug 1704628 Part 3: Make test browser_menu_api.js use activateItem semantics. → Bug 1704628 Part 3: Disable test browser_menu_api.js on macOS.
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fea280db91be
Part 1: Make selectContextMenuItem use .activateItem() semantics. r=ochameau
https://hg.mozilla.org/integration/autoland/rev/e14dcb9ef407
Part 2: Make a breakpoint context menu test await the correct number of dispatch events. r=ochameau
Attachment #9215936 - Attachment description: Bug 1704628 Part 3: Disable test browser_menu_api.js on macOS. → Bug 1704628 Part 3: Disable part of test browser_menu_api.js on macOS.

Backed out for causing failures e.g. browser_dbg-blackbox-all.js

backout: https://hg.mozilla.org/integration/autoland/rev/c35cca23a6ea6f0879af36a99507da37c5d8cdb4

push: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=e14dcb9ef407141d2fffa216c7a2f1f700418b78&selectedTaskRun=RZ4ESR41R1mt25OWj6zv6Q.0

failure logs:

[task 2021-04-15T21:35:46.336Z] 21:35:46 INFO - TEST-PASS | devtools/client/debugger/test/mochitest/browser_dbg-blackbox-all.js | a new breakpoint was created -
[task 2021-04-15T21:35:46.336Z] 21:35:46 INFO - Expands the whole source tree.
[task 2021-04-15T21:35:46.337Z] 21:35:46 INFO - Blackbox files in this directory.
[task 2021-04-15T21:35:46.337Z] 21:35:46 INFO - Buffered messages finished
[task 2021-04-15T21:35:46.340Z] 21:35:46 INFO - TEST-UNEXPECTED-FAIL | devtools/client/debugger/test/mochitest/browser_dbg-blackbox-all.js | Uncaught exception - at chrome://mochitests/content/browser/devtools/client/shared/test/shared-head.js:707 - Error: Failed waitFor():
[task 2021-04-15T21:35:46.340Z] 21:35:46 INFO - Failed condition: () => findContextMenu(dbg, selector)
[task 2021-04-15T21:35:46.340Z] 21:35:46 INFO -
[task 2021-04-15T21:35:46.340Z] 21:35:46 INFO - Stack trace:
[task 2021-04-15T21:35:46.341Z] 21:35:46 INFO - waitFor@chrome://mochitests/content/browser/devtools/client/shared/test/shared-head.js:707:11
[task 2021-04-15T21:35:46.341Z] 21:35:46 INFO - asyncwaitForContextMenu@chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/helpers.js:1569:9
[task 2021-04-15T21:35:46.341Z] 21:35:46 INFO - assertContextMenuLabel@chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/helpers.js:1579:22
[task 2021-04-15T21:35:46.341Z] 21:35:46 INFO - @chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/browser_dbg-blackbox-all.js:43:9
[task 2021-04-15T21:35:46.342Z] 21:35:46 INFO - Async
Tester_execTest/<@chrome://mochikit/content/browser-test.js:1089:34
[task 2021-04-15T21:35:46.342Z] 21:35:46 INFO - Tester_execTest@chrome://mochikit/content/browser-test.js:1129:11
[task 2021-04-15T21:35:46.342Z] 21:35:46 INFO - nextTest/<@chrome://mochikit/content/browser-test.js:949:14
[task 2021-04-15T21:35:46.342Z] 21:35:46 INFO - SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1037:23
[task 2021-04-15T21:35:46.343Z] 21:35:46 INFO - Leaving test bound

[task 2021-04-15T21:08:07.385Z] 21:08:07 INFO - TEST-PASS | devtools/client/debugger/test/mochitest/browser_dbg-watchpoints.js | Frame paused at 19, but expected 19 -
[task 2021-04-15T21:08:07.386Z] 21:08:07 INFO - Remove the get watchpoint on b
[task 2021-04-15T21:08:07.386Z] 21:08:07 INFO - Buffered messages finished
[task 2021-04-15T21:08:07.386Z] 21:08:07 INFO - TEST-UNEXPECTED-FAIL | devtools/client/debugger/test/mochitest/browser_dbg-watchpoints.js | Test timed out -
[task 2021-04-15T21:08:07.386Z] 21:08:07 INFO - GECKO(1658) | JavaScript error: resource://devtools/server/actors/targets/browsing-context.js, line 102: TypeError: can't access property "browsingContext", parentDocShell is null
[task 2021-04-15T21:08:07.386Z] 21:08:07 INFO - GECKO(1658) | JavaScript error: resource://devtools/server/actors/highlighters/utils/markup.js, line 141: TypeError: can't access property "document", window is null
[task 2021-04-15T21:08:07.410Z] 21:08:07 INFO - Removing tab.
[task 2021-04-15T21:08:07.411Z] 21:08:07 INFO - Waiting for event: 'TabClose' on [object XULElement].
[task 2021-04-15T21:08:07.411Z] 21:08:07 INFO - Got event: 'TabClose' on [object XULElement].
[task 2021-04-15T21:08:07.428Z] 21:08:07 INFO - Tab removed and finished closing

Flags: needinfo?(bwerth)
Flags: needinfo?(bwerth)
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4df249cccd6e
Part 1: Make selectContextMenuItem use .activateItem() semantics. r=ochameau
https://hg.mozilla.org/integration/autoland/rev/d7c6bae278e0
Part 2: Make a breakpoint context menu test await the correct number of dispatch events. r=ochameau

Hmm... I didn't want to make changes to browser_dbg-blackbox-all.js because a better solution is in flight in Bug 1706127. I'll make this bug dependent on that bug.

Depends on: 1706127
Attachment #9215266 - Attachment description: Bug 1704628 Part 1: Make selectContextMenuItem use .activateItem() semantics. → Bug 1704628 Part 1: Make test browser_dbg-watchpoints.js work with macOS native context menus.
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/91e8a2bfe9a0
Part 1: Make test browser_dbg-watchpoints.js work with macOS native context menus. r=ochameau
https://hg.mozilla.org/integration/autoland/rev/cb69b22fcc12
Part 2: Make a breakpoint context menu test await the correct number of dispatch events. r=ochameau
Attachment #9215936 - Attachment description: Bug 1704628 Part 3: Disable part of test browser_menu_api.js on macOS. → Bug 1704628 Part 3: Rework part of test browser_menu_api.js on macOS.

This landing is not going well! Trying another try run to gain confidence that the patches are landable: https://treeherder.mozilla.org/#/jobs?repo=try&revision=718bc2a2c68e9f2bf4c0cf852ca0d81bcfabbd16

Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7c3a2d5241c4
Part 1: Make test browser_dbg-watchpoints.js work with macOS native context menus. r=ochameau
https://hg.mozilla.org/integration/autoland/rev/dea1a02f70c7
Part 2: Make a breakpoint context menu test await the correct number of dispatch events. r=ochameau
https://hg.mozilla.org/integration/autoland/rev/9f54a830d0ce
Part 3: Rework part of test browser_menu_api.js on macOS. r=mac-reviewers,mstange
https://hg.mozilla.org/integration/autoland/rev/465971c6b4b2
Part 4: Avoid use of ESC to close context menu in browser_toolbox_contentpage_contextmenu.js. r=mac-reviewers,mstange

Backed out 4 changesets (Bug 1704628) for causing dt failures in browser_dbg-watchpoints.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/e99e7e2c43c8ae2b91b85cdec5360811ca11cdd0
Push with failures, failure log.

I'll drop Part 1 and block on Bug 1706483 which has a working solution for browser_dbg-watchpoints.js.

Depends on: 1706483
Attachment #9215266 - Attachment is obsolete: true
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b8d4862aa713
Part 2: Make a breakpoint context menu test await the correct number of dispatch events. r=ochameau
https://hg.mozilla.org/integration/autoland/rev/542c2aa5bfd3
Part 3: Rework part of test browser_menu_api.js on macOS. r=mac-reviewers,mstange
https://hg.mozilla.org/integration/autoland/rev/9053398b763b
Part 4: Avoid use of ESC to close context menu in browser_toolbox_contentpage_contextmenu.js. r=mac-reviewers,mstange
https://hg.mozilla.org/integration/autoland/rev/cf81be099de0
Part 5: Avoid use of ESC to close context menu in browser_toolbox_textbox_context_menu.js. r=mac-reviewers,mstange
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(bwerth)
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Whiteboard: [proton-uplift]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: