|
|
DescriptionFix CrSettingsLanguagesPageTest dialog flake
BUG=641400
R=dpapad@chromium.org
Review-Url: https://codereview.chromium.org/2867213002
Cr-Commit-Position: refs/heads/master@{#472682}
Committed: https://chromium.googlesource.com/chromium/src/+/12ddbd73d25fefda658eb70e10bf94418ee9b51d
Patch Set 1 #
Total comments: 2
Patch Set 2 : Use MutationObserver #
Total comments: 4
Patch Set 3 : parens #
Messages
Total messages: 23 (12 generated)
LGTM https://codereview.chromium.org/2867213002/diff/1/chrome/test/data/webui/sett... File chrome/test/data/webui/settings/languages_page_tests.js (right): https://codereview.chromium.org/2867213002/diff/1/chrome/test/data/webui/sett... chrome/test/data/webui/settings/languages_page_tests.js:114: setTimeout(function() { Nit (optional): Perhaps it would be more robust to listen for a dom-change event on the dom-if element itself.
PTAnotherL at MutationObserver. If this looks good it may be something we should use in more places in the future. https://codereview.chromium.org/2867213002/diff/1/chrome/test/data/webui/sett... File chrome/test/data/webui/settings/languages_page_tests.js (right): https://codereview.chromium.org/2867213002/diff/1/chrome/test/data/webui/sett... chrome/test/data/webui/settings/languages_page_tests.js:114: setTimeout(function() { On 2017/05/09 01:14:29, dpapad wrote: > Nit (optional): Perhaps it would be more robust to listen for a dom-change event > on the dom-if element itself. The MutationObserver you suggested in the bug works on the language page's shadow root - LGTY?
The CQ bit was checked by michaelpg@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
LGTM https://codereview.chromium.org/2867213002/diff/20001/chrome/test/data/webui/... File chrome/test/data/webui/settings/languages_page_tests.js (right): https://codereview.chromium.org/2867213002/diff/20001/chrome/test/data/webui/... chrome/test/data/webui/settings/languages_page_tests.js:87: var onMutation = function(mutations, observer) { Is this actually called with multiple mutations? Can we simplify as follows and remove the call to Array#some()? assertEquals(1, mutations.length); assertEquals('childList', mutations[0].type); ... https://codereview.chromium.org/2867213002/diff/20001/chrome/test/data/webui/... chrome/test/data/webui/settings/languages_page_tests.js:113: dialogClosedResolver = new PromiseResolver; Nit (optional): new PromiseResolver()? It seems that always using the parentheses is more prevalent in our code (https://cs.chromium.org/search/?q=%22new+PromiseResolver%22+lang:js&type=cs). I guess we can add an ESLint check for this if we care, once ESLint is in the toolchain (hopefully soon).
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
https://codereview.chromium.org/2867213002/diff/20001/chrome/test/data/webui/... File chrome/test/data/webui/settings/languages_page_tests.js (right): https://codereview.chromium.org/2867213002/diff/20001/chrome/test/data/webui/... chrome/test/data/webui/settings/languages_page_tests.js:87: var onMutation = function(mutations, observer) { On 2017/05/16 00:19:43, dpapad wrote: > Is this actually called with multiple mutations? Can we simplify as follows and > remove the call to Array#some()? > > assertEquals(1, mutations.length); > assertEquals('childList', mutations[0].type); > ... It's called a number of times, sometimes with several removed #text Nodes, sometimes with the dialog. It's probably not feasible to hard-code the exact sequence of changes to expect, and if we did I'd expect our tests to break over time. https://codereview.chromium.org/2867213002/diff/20001/chrome/test/data/webui/... chrome/test/data/webui/settings/languages_page_tests.js:113: dialogClosedResolver = new PromiseResolver; On 2017/05/16 00:19:43, dpapad wrote: > Nit (optional): new PromiseResolver()? It seems that always using the > parentheses is more prevalent in our code > (https://cs.chromium.org/search/?q=%22new+PromiseResolver%22+lang:js&type=cs). I > guess we can add an ESLint check for this if we care, once ESLint is in the > toolchain (hopefully soon). Done. but I'm wary of forcing style opinions with ESLint that aren't part of our official style guidelines :)
The CQ bit was checked by michaelpg@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dpapad@chromium.org Link to the patchset: https://codereview.chromium.org/2867213002/#ps40001 (title: "parens")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2017/05/16 at 19:57:39, michaelpg wrote: > https://codereview.chromium.org/2867213002/diff/20001/chrome/test/data/webui/... > File chrome/test/data/webui/settings/languages_page_tests.js (right): > > https://codereview.chromium.org/2867213002/diff/20001/chrome/test/data/webui/... > chrome/test/data/webui/settings/languages_page_tests.js:87: var onMutation = function(mutations, observer) { > On 2017/05/16 00:19:43, dpapad wrote: > > Is this actually called with multiple mutations? Can we simplify as follows and > > remove the call to Array#some()? > > > > assertEquals(1, mutations.length); > > assertEquals('childList', mutations[0].type); > > ... > > It's called a number of times, sometimes with several removed #text Nodes, sometimes with the dialog. It's probably not feasible to hard-code the exact sequence of changes to expect, and if we did I'd expect our tests to break over time. > > https://codereview.chromium.org/2867213002/diff/20001/chrome/test/data/webui/... > chrome/test/data/webui/settings/languages_page_tests.js:113: dialogClosedResolver = new PromiseResolver; > On 2017/05/16 00:19:43, dpapad wrote: > > Nit (optional): new PromiseResolver()? It seems that always using the > > parentheses is more prevalent in our code > > (https://cs.chromium.org/search/?q=%22new+PromiseResolver%22+lang:js&type=cs). I > > guess we can add an ESLint check for this if we care, once ESLint is in the > > toolchain (hopefully soon). > > Done. but I'm wary of forcing style opinions with ESLint that aren't part of our official style guidelines :) I mentioned "if we care", which I should have clarified. "If we care" means that there would be a discussion about it among WebUI team first and a consensus, before we add something like this (or any other restriction that is not part of the Google JS styleguide).
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by michaelpg@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by michaelpg@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1495064630954360, "parent_rev": "5a89721d814b1dcb82de46a779b13e8e43209f23", "commit_rev": "12ddbd73d25fefda658eb70e10bf94418ee9b51d"}
Message was sent while issue was closed.
Description was changed from ========== Fix CrSettingsLanguagesPageTest dialog flake BUG=641400 R=dpapad@chromium.org ========== to ========== Fix CrSettingsLanguagesPageTest dialog flake BUG=641400 R=dpapad@chromium.org Review-Url: https://codereview.chromium.org/2867213002 Cr-Commit-Position: refs/heads/master@{#472682} Committed: https://chromium.googlesource.com/chromium/src/+/12ddbd73d25fefda658eb70e10bf... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/12ddbd73d25fefda658eb70e10bf... |