зеркало из https://github.com/mozilla/pjs.git
Bug 630271 - Throw a TYPE_MISMATCH_ERR on createPattern(null); r=smaug
This commit is contained in:
Родитель
d177ebf9c5
Коммит
36bb3cec59
|
@ -1677,6 +1677,9 @@ nsCanvasRenderingContext2D::CreatePattern(nsIDOMHTMLElement *image,
|
|||
const nsAString& repeat,
|
||||
nsIDOMCanvasPattern **_retval)
|
||||
{
|
||||
if (!image) {
|
||||
return NS_ERROR_DOM_TYPE_MISMATCH_ERR;
|
||||
}
|
||||
gfxPattern::GraphicsExtend extend;
|
||||
|
||||
if (repeat.IsEmpty() || repeat.EqualsLiteral("repeat")) {
|
||||
|
|
|
@ -14768,7 +14768,7 @@ var ctx = canvas.getContext('2d');
|
|||
|
||||
var _thrown = undefined; try {
|
||||
ctx.createPattern(null, 'repeat');
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
|
||||
|
||||
|
||||
}
|
||||
|
@ -14806,7 +14806,7 @@ var ctx = canvas.getContext('2d');
|
|||
|
||||
var _thrown = undefined; try {
|
||||
ctx.createPattern(undefined, 'repeat');
|
||||
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
|
||||
} catch (e) { _thrown = e }; ok(_thrown && _thrown.code == DOMException.TYPE_MISMATCH_ERR, "should throw TYPE_MISMATCH_ERR");
|
||||
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче