Closed Bug 1498183 Opened 6 years ago Closed 6 years ago

Replace generator/yield in test_constraint_error_messages.js to async/await

Categories

(Core :: Storage: IndexedDB, defect, P2)

64 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: dpino, Assigned: tt)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Steps to reproduce: Follow-up bug of https://bugzilla.mozilla.org/show_bug.cgi?id=1357561. See comments: https://bugzilla.mozilla.org/show_bug.cgi?id=1357561#c21 and https://bugzilla.mozilla.org/show_bug.cgi?id=1357561#c30
Depends on: 1357561
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: IndexedDB
Ever confirmed: true
Product: Firefox → Core
Tom, can you take a look?
Flags: needinfo?(shes050117)
Priority: -- → P2
Assignee: nobody → shes050117
Status: NEW → ASSIGNED
Flags: needinfo?(shes050117)
Work in progress, and should provide a patch after a day or two.
This patch mainly uses add_task while running async/await scripts. To support that in workers, it also changes testHarness logic for worker from "yield" to promise.
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=0432c2843e78aaac569e8e2233390196f3603325 I test all idb tests locally, but I should also see if they work on try

Andrew, although you've granted the review, could you take one more look before I landing this patch? Thanks!
I think the way I use for notifying the main thread from the worker thread that the test has finished should work, but it'd be better to check by others. I didn't rebase the patch so that you could check the inter-diff directly.

I removed the call for finishTest() and adding assertion on every finishTest() functions to prevent from misusing. Also, I placed expectingSuccess() and expectingUpgrade() to both helper.js and xpcshell-head-parent.js

Flags: needinfo?(bugmail)

Looks good! Thanks for the proactive improvements!

Flags: needinfo?(bugmail)
Pushed by shes050117@gmail.com: https://hg.mozilla.org/integration/autoland/rev/4a74ab74ff7a Supporting async/await for mochitest and xpcshell test in indexedDB; r=asuth

(In reply to Andrew Sutherland [:asuth] from comment #6)

Thanks for the review!

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: