Closed Bug 762657 Opened 13 years ago Closed 12 years ago

Fix canvas tests to comply a bit more with the spec

Categories

(Core :: Graphics: Canvas2D, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: peterv, Assigned: peterv)

References

Details

(Keywords: addon-compat, dev-doc-complete)

Attachments

(1 file)

Attached patch v1 (deleted) — Splinter Review
No description provided.
Attachment #631111 - Flags: review?(Ms2ger)
Comment on attachment 631111 [details] [diff] [review] v1 Review of attachment 631111 [details] [diff] [review]: ----------------------------------------------------------------- r=me with these nits fixed. ::: content/canvas/src/CustomQS_Canvas.h @@ +37,5 @@ > xpc_qsSelfRef imageDataRef; > + nsresult rv = xpc_qsUnwrapArg<nsIDOMImageData>(cx, imageData, &domImageData, > + &imageDataRef.ptr, &imageData); > + if (NS_FAILED(rv)) { > + return xpc_qsThrow(cx, rv); Indentation @@ -50,5 @@ > - // TODO - bug 625804: Remove support for duck-typed ImageData. > - JSObject& dataObject = imageData.toObject(); > - > - if (!GetPositiveInt(cx, dataObject, "width", width) || > - !GetPositiveInt(cx, dataObject, "height", height)) { Remove GetPositiveInt; those are the only calls. ::: content/canvas/test/test_canvas.html @@ +3695,2 @@ > > netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); Remove this; it was necessary to get at Components.results.NS_ERROR_XPC_BAD_CONVERT_JS_ZERO_ISNOT_NULL. @@ +15970,5 @@ > var ctx = canvas.getContext('2d'); > > +var _thrown = undefined; try { > + ctx.createPattern(canvas, null); > +} catch (e) { _thrown = e }; ok(_thrown && _thrown.name == "SyntaxError" && _thrown.code == DOMException.SYNTAX_ERR, "should throw SyntaxError"); (Pushed this upstream: http://dvcs.w3.org/hg/html/rev/4e230b0f13dd)
Attachment #631111 - Flags: review?(Ms2ger) → review+
Keywords: dev-doc-needed
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
Depends on: 773545
Depends on: 784809
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: