Closed Bug 1244892 Opened 8 years ago Closed 8 years ago

Unhandled promise rejection in browser_dbg_scripts-switching-03.js

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
Firefox 47
Tracking Status
firefox47 --- fixed

People

(Reporter: jlong, Assigned: jlong)

References

Details

Attachments

(1 file)

Fixed promise rejection tracking and now need to fix the following test taht is throwing an unhandled error:

devtools/client/debugger/test/mochitest/browser_dbg_scripts-switching-03.js
Attached patch 1244892.patchSplinter Review
Would be good to get you to review these if you want to get more familiar with the UI.

This shows a nice property: we can manually fire changes to the UI to test what we want, without actually going through any server. Here, I'm fixing an unhandled rejection by not making it happen in the first place. I don't have a reference to the promise that is throwing it so I can't suppress it in the test. In normal code we *want* it to throw.
Attachment #8714508 - Flags: review?(ejpbruel)
Blocks: 1244223
Assignee: nobody → jlong
Comment on attachment 8714508 [details] [diff] [review]
1244892.patch

Review of attachment 8714508 [details] [diff] [review]:
-----------------------------------------------------------------

Right, I remember talking to you about this. One of the nice things about React is that you can emulate the actions that would have been dispatched if you had actually gone through the server. Since the unhandled promise rejection results from going through the server, this allows you to avoid it in the test, but still trigger it in normal operation.

Assuming that that's all correct, this patch looks good to me.

Thank you very much for assigning these to me, by the way. You're right, this is a great way for me to learn more about the UI. Please keep patches like this coming!
Attachment #8714508 - Flags: review?(ejpbruel) → review+
https://hg.mozilla.org/mozilla-central/rev/6826dfd0e85b
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: