Closed Bug 860952 Opened 12 years ago Closed 12 years ago

PeerConnection mochi test failures should indicate the calling site

Categories

(Core :: WebRTC: Signaling, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: abr, Assigned: abr)

Details

(Whiteboard: [WebRTC][blocking-webrtc-][tests][qa-])

Attachments

(1 file)

Although most tests are pretty good about indicating what is about to happen, it is still possible for the shared failure callback to be ambiguous about exactly what failed. Ideally, such failures would be tagged with the filename and line number from which the callback originated.
This patch turns unexpectedCallbackAndFinish into a function that generates a callback function with the calling site embedded in it. It does so by passing in a new Error object, from which the source filename and line number can be read.
Attachment #736523 - Flags: review?(jsmith)
Severity: normal → enhancement
Priority: -- → P4
Comment on attachment 736523 [details] [diff] [review] Add error site information to unexpectedCallbackAndFinish callback Review of attachment 736523 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/tests/mochitest/head.js @@ +157,5 @@ > + if (aObj && aObj.name && aObj.message) { > + ok(false, "Unexpected error callback from " + where + " with name = '" + > + aObj.name + "', message = '" + aObj.message + "'"); > + } else { > + ok(false, "Unexpected error callback from " + where + " with " + aObj); Nit - indentation is off here
Attachment #736523 - Flags: review?(jsmith) → review+
Whiteboard: [WebRTC][blocking-webrtc-][tests]
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Whiteboard: [WebRTC][blocking-webrtc-][tests] → [WebRTC][blocking-webrtc-][tests][qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: