gecko-dev/devtools
Jason Orendorff 8fcb34f772 Bug 1525395 - Part 2: Rewrite a Scratchpad test to eliminate some race conditions. r=jimb
I don't understand how the test ever worked. I think the idea was that each
operation would result in changes to the prefs, because those prefs are the
source of truth for the recent-files list. However, I don't understand why some
tests would not trigger multiple observer callbacks, which should have been a
huge mess.

The new code doesn't observe the prefs at all. Where possible, it waits for an
appropriate promise; in other places it uses `setTimeout()` to wait for the
next tick, relying on the Scratchpad implementation to be done reacting by
then.

Since the original code was event-driven, most tests were split across two
functions. Each test function had the bottom half of one test and the top half
of the next test. The new code uses async/await and can therefore at least
group related functionality into single cohesive test functions. But those test
functions aren't as independent as they look -- most of them still depend on
previous tests to set up the expected starting state.

Differential Revision: https://phabricator.services.mozilla.com/D20759

--HG--
extra : moz-landing-system : lando
2019-03-06 23:04:01 +00:00
..
client Bug 1525395 - Part 2: Rewrite a Scratchpad test to eliminate some race conditions. r=jimb 2019-03-06 23:04:01 +00:00
docs Bug 1529247 - clean up frames methods on thread client; r=ochameau 2019-03-01 15:26:18 +00:00
platform Backout most of bug 1524687 for Windows PGO xpcshell selftest failures. r=backout 2019-02-14 17:17:36 -08:00
server Bug 717611 - Clear ConsoleService cached messages in webconsole actor's clearMessagesCache; r=Honza. 2019-03-06 13:40:47 +00:00
shared Bug 1532237 - Use a Debugger loaded in a distinct compartment when debugging chrome in the event collector codebase. r=miker 2019-03-05 14:58:05 +00:00
startup Bug 1528896 - Fix about:debugging-new unavailable in local & nightly builds;r=daisuke 2019-02-19 08:03:42 +00:00
.eslintrc.js Bug 1518283 - prohibit blank lines at the beginning and end of blocks (eslint padded-blocks) r=mossop,Standard8 2019-01-30 17:26:25 +00:00
.eslintrc.mochitests.js
.eslintrc.xpcshell.js
CODE_OF_CONDUCT.md Bug 1527826 - Reflect our github org name change in the m-c code; r=nchevobbe 2019-02-15 09:38:53 +00:00
moz.build
templates.mozbuild