mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1158551 - calling valueAsString on a length with an invalid string should throw. r=dholbert
This commit is contained in:
parent
be55160c4e
commit
02e303f6e8
@ -371,7 +371,7 @@ DOMSVGLength::SetValueAsString(const nsAString& aValue, ErrorResult& aRv)
|
||||
}
|
||||
|
||||
if (mVal) {
|
||||
mVal->SetBaseValueString(aValue, mSVGElement, true);
|
||||
aRv = mVal->SetBaseValueString(aValue, mSVGElement, true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=539697
|
||||
-->
|
||||
<head>
|
||||
<title>Test SVGTransform behavior</title>
|
||||
<title>Test valueAsString behavior</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
@ -35,6 +35,7 @@ function run()
|
||||
|
||||
try {
|
||||
c.r.baseVal.valueAsString = 'rubbish';
|
||||
ok(false, 'setting a length to rubbish should fail');
|
||||
} catch (e) {
|
||||
is(e.name, 'SyntaxError', 'syntax error expected');
|
||||
is(e.code, DOMException.SYNTAX_ERR, 'syntax error expected');
|
||||
@ -46,6 +47,7 @@ function run()
|
||||
|
||||
try {
|
||||
m.orientAngle.baseVal.valueAsString = 'rubbish';
|
||||
ok(false, 'setting an angle to rubbish should fail');
|
||||
} catch (e) {
|
||||
is(e.name, 'SyntaxError', 'syntax error expected');
|
||||
is(e.code, DOMException.SYNTAX_ERR, 'syntax error expected');
|
||||
|
Loading…
Reference in New Issue
Block a user