Closed Bug 1430441 Opened 6 years ago Closed 6 years ago

devtools/client/webconsole/test/browser_console_keyboard_accessibility.js fails after bug 1193394

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(firefox59 fixed)

RESOLVED FIXED
Firefox 59
Tracking Status
firefox59 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(2 files)

https://treeherder.mozilla.org/#/jobs?repo=try&revision=c7b7ba9086f5524823ea95f717f4bfbe0430313a&filter-searchStr=dt&selectedJob=154669321
> TEST-UNEXPECTED-FAIL | devtools/client/webconsole/test/browser_console_keyboard_accessibility.js | jsterm input is not focused -
> ...
> TEST-UNEXPECTED-FAIL | devtools/client/webconsole/test/browser_console_keyboard_accessibility.js | filter input is focused - Got , expected true
Before fixing, I converted task_generator to async function
Attachment #8942542 - Flags: review?(bgrinstead)
the test performs 2 keyboard shortcut in a row.
  1. webconsole.clear.keyOSX = Ctrl+L
     or
     webconsole.clear.key = Ctrl+Shift+L
  2. webconsole.find.key = CmdOrCtrl+F
https://searchfox.org/mozilla-central/rev/ab63c465d9f54d7608a3c01dad3eb84e433097f5/devtools/client/webconsole/test/browser_console_keyboard_accessibility.js#62
https://searchfox.org/mozilla-central/rev/ab63c465d9f54d7608a3c01dad3eb84e433097f5/devtools/client/webconsole/test/browser_console_keyboard_accessibility.js#71

After bug 1193394 change, the promise resolution handler is executed in
MicroTask checkpoint, that exists after event handler.
In that case, the 2nd one can be executed while the keydown for the 1st one is still effective, and then those shortcuts are mixed and becomes different one (for macOS, Ctrl+Cmd+F = enter fullscreen).
So, to avoid it, we need to wait for the next event tick to skip the MicroTask checkpoint.
Attachment #8942543 - Flags: review?(bgrinstead)
Attachment #8942542 - Flags: review?(bgrinstead) → review+
Attachment #8942543 - Flags: review?(bgrinstead) → review+
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/31673be5d440
Part 1: Use Async Function in devtools/client/webconsole/test/browser_console_keyboard_accessibility.js r=bgrins
https://hg.mozilla.org/integration/mozilla-inbound/rev/481c2b2164c7
Part 2: Wait for the next event tick to avoid mixing 2 shortcuts in devtools/client/webconsole/test/browser_console_keyboard_accessibility.js r=bgrins
https://hg.mozilla.org/integration/mozilla-inbound/rev/31673be5d440c809f554772ffde400d7c768907a
Bug 1430441 - Part 1: Use Async Function in devtools/client/webconsole/test/browser_console_keyboard_accessibility.js r=bgrins

https://hg.mozilla.org/integration/mozilla-inbound/rev/481c2b2164c70a6d3100107215a8f734babc0adb
Bug 1430441 - Part 2: Wait for the next event tick to avoid mixing 2 shortcuts in devtools/client/webconsole/test/browser_console_keyboard_accessibility.js r=bgrins
https://hg.mozilla.org/mozilla-central/rev/31673be5d440
https://hg.mozilla.org/mozilla-central/rev/481c2b2164c7
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: