|
|
Chromium Code Reviews|
Created:
3 years, 11 months ago by Daniel Erat Modified:
3 years, 10 months ago Reviewers:
fukino CC:
chromium-reviews, oka+watch_chromium.org, rginda+watch_chromium.org, mtomasz+watch_chromium.org, yamaguchi+watch_chromium.org, fukino+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionFix promises in file manager device handler unit tests.
Several tests for chrome.fileManagerPrivate's DeviceHandler
class were failing to pass the correct promises to
reportPromise(), resulting in failed assertions being
ignored.
Switch to creating promises inline to make this less likely
in the future.
BUG=none
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Review-Url: https://codereview.chromium.org/2650403005
Cr-Commit-Position: refs/heads/master@{#446547}
Committed: https://chromium.googlesource.com/chromium/src/+/78326029c3f06738fd2169474282c2d354d5ea28
Patch Set 1 #
Total comments: 2
Patch Set 2 : update a call that i missed #Patch Set 3 : inline promise creation #Messages
Total messages: 27 (19 generated)
Description was changed from ========== Fix promises in file manager device handler unit tests. Several tests for chrome.fileManagerPrivate's DeviceHandler class were failing to pass the correct promises to reportPromise(), resulting in failed assertions being ignored. Also fix indenting in a few places. BUG=none ========== to ========== Fix promises in file manager device handler unit tests. Several tests for chrome.fileManagerPrivate's DeviceHandler class were failing to pass the correct promises to reportPromise(), resulting in failed assertions being ignored. Also fix indenting in a few places. BUG=none CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
derat@chromium.org changed reviewers: + fukino@chromium.org
i think that this fixes the problem i encountered in https://codereview.chromium.org/2645353005/. please let me know if you have suggestions for making the CL description clearer -- i'm still a beginner when it comes to JS promises. :-)
The CQ bit was checked by derat@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...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Thank you for the investigation and fixing the issue! lgtm assuming a comment is resolved. https://codereview.chromium.org/2650403005/diff/1/ui/file_manager/file_manage... File ui/file_manager/file_manager/background/js/device_handler_unittest.js (right): https://codereview.chromium.org/2650403005/diff/1/ui/file_manager/file_manage... ui/file_manager/file_manager/background/js/device_handler_unittest.js:153: reportPromise(resolver.promise, callback); resolver.promise should be promise here, too.
The CQ bit was checked by derat@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...
https://codereview.chromium.org/2650403005/diff/1/ui/file_manager/file_manage... File ui/file_manager/file_manager/background/js/device_handler_unittest.js (right): https://codereview.chromium.org/2650403005/diff/1/ui/file_manager/file_manage... ui/file_manager/file_manager/background/js/device_handler_unittest.js:153: reportPromise(resolver.promise, callback); On 2017/01/26 22:33:24, fukino wrote: > resolver.promise should be promise here, too. whoops. thanks for catching this! let me know if you think it'd be cleaner/safer to inline the .then calls that create the promise within the reportPromise calls, e.g. reportPromise( resolver.promise.then( function(event) { assertEquals('blabbity', event.volumeId); }), callback);
The CQ bit was checked by derat@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...
On 2017/01/26 22:37:53, Daniel Erat wrote: > https://codereview.chromium.org/2650403005/diff/1/ui/file_manager/file_manage... > File ui/file_manager/file_manager/background/js/device_handler_unittest.js > (right): > > https://codereview.chromium.org/2650403005/diff/1/ui/file_manager/file_manage... > ui/file_manager/file_manager/background/js/device_handler_unittest.js:153: > reportPromise(resolver.promise, callback); > On 2017/01/26 22:33:24, fukino wrote: > > resolver.promise should be promise here, too. > > whoops. thanks for catching this! > > let me know if you think it'd be cleaner/safer to inline the .then calls that > create the promise within the reportPromise calls, e.g. > > reportPromise( > resolver.promise.then( > function(event) { > assertEquals('blabbity', event.volumeId); > }), > callback); Both are OK, but the style you suggested looks a bit clearer to me.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Fix promises in file manager device handler unit tests. Several tests for chrome.fileManagerPrivate's DeviceHandler class were failing to pass the correct promises to reportPromise(), resulting in failed assertions being ignored. Also fix indenting in a few places. BUG=none CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Fix promises in file manager device handler unit tests. Several tests for chrome.fileManagerPrivate's DeviceHandler class were failing to pass the correct promises to reportPromise(), resulting in failed assertions being ignored. Switch to creating promises inline to make this less likely in the future. BUG=none CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
The CQ bit was checked by derat@chromium.org to run a CQ dry run
mind taking another look? i've moved all of the promise creation inline to hopefully make this less likely in the future. (i still feel like i don't fully understand javascript indenting; hopefully i didn't get it too wrong.)
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
LGTM. Indentation looks correct. Thank you for making them clearer & safer!
The CQ bit was unchecked by derat@chromium.org
The CQ bit was checked by derat@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": 1485476411905020,
"parent_rev": "11048b2f4c969c558eb594f4500b14d4c250d9e4", "commit_rev":
"78326029c3f06738fd2169474282c2d354d5ea28"}
Message was sent while issue was closed.
Description was changed from ========== Fix promises in file manager device handler unit tests. Several tests for chrome.fileManagerPrivate's DeviceHandler class were failing to pass the correct promises to reportPromise(), resulting in failed assertions being ignored. Switch to creating promises inline to make this less likely in the future. BUG=none CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Fix promises in file manager device handler unit tests. Several tests for chrome.fileManagerPrivate's DeviceHandler class were failing to pass the correct promises to reportPromise(), resulting in failed assertions being ignored. Switch to creating promises inline to make this less likely in the future. BUG=none CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2650403005 Cr-Commit-Position: refs/heads/master@{#446547} Committed: https://chromium.googlesource.com/chromium/src/+/78326029c3f06738fd2169474282... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/78326029c3f06738fd2169474282... |
