OLD | NEW |
1 description( | 1 description( |
2 'This tests the behavior of non-numeric values in contexts where the DOM has a n
umeric parameter.' | 2 'This tests the behavior of non-numeric values in contexts where the DOM has a n
umeric parameter.' |
3 ); | 3 ); |
4 | 4 |
5 function nonNumericPolicy(template) | 5 function nonNumericPolicy(template) |
6 { | 6 { |
7 var x = 0; | 7 var x = 0; |
8 try { | 8 try { |
9 eval(template); | 9 eval(template); |
10 } catch (e) { | 10 } catch (e) { |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 211 |
212 shouldBe("nonNumericPolicy('document.body.scrollLeft = x')", "'any type allowed'
"); | 212 shouldBe("nonNumericPolicy('document.body.scrollLeft = x')", "'any type allowed'
"); |
213 shouldBe("nonNumericPolicy('document.body.scrollTop = x')", "'any type allowed'"
); | 213 shouldBe("nonNumericPolicy('document.body.scrollTop = x')", "'any type allowed'"
); |
214 | 214 |
215 // History | 215 // History |
216 | 216 |
217 // Not tested: go. | 217 // Not tested: go. |
218 | 218 |
219 // HTMLCollection | 219 // HTMLCollection |
220 | 220 |
221 shouldBe("nonNumericPolicy('document.images.item(x)')", "'any type allowed'"); | 221 shouldBe("nonNumericPolicy('document.images.item(x)')", "'any type allowed (but
not omitted)'"); |
222 | 222 |
223 // HTMLInputElement | 223 // HTMLInputElement |
224 | 224 |
225 shouldBe("nonNumericPolicy('document.createElement(\"input\").setSelectionRange(
x, 0)')", "'any type allowed'"); | 225 shouldBe("nonNumericPolicy('document.createElement(\"input\").setSelectionRange(
x, 0)')", "'any type allowed'"); |
226 shouldBe("nonNumericPolicy('document.createElement(\"input\").setSelectionRange(
0, x)')", "'any type allowed'"); | 226 shouldBe("nonNumericPolicy('document.createElement(\"input\").setSelectionRange(
0, x)')", "'any type allowed'"); |
227 | 227 |
228 // HTMLOptionsCollection | 228 // HTMLOptionsCollection |
229 | 229 |
230 shouldBe("nonNumericPolicy('createHTMLOptionsCollection().add(document.createEle
ment(\"option\"), x)')", "'any type allowed'"); | 230 shouldBe("nonNumericPolicy('createHTMLOptionsCollection().add(document.createEle
ment(\"option\"), x)')", "'any type allowed'"); |
231 shouldBe("nonNumericPolicy('createHTMLOptionsCollection().remove(x)')", "'any ty
pe allowed (but not omitted)'"); | 231 shouldBe("nonNumericPolicy('createHTMLOptionsCollection().remove(x)')", "'any ty
pe allowed (but not omitted)'"); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 // NamedNodeMap | 275 // NamedNodeMap |
276 | 276 |
277 shouldBe("nonNumericPolicy('document.body.attributes.item(x)')", "'any type allo
wed (but not omitted)'"); | 277 shouldBe("nonNumericPolicy('document.body.attributes.item(x)')", "'any type allo
wed (but not omitted)'"); |
278 | 278 |
279 // NodeIterator | 279 // NodeIterator |
280 | 280 |
281 shouldBe("nonNumericPolicy('document.createNodeIterator(document, x, null, false
)')", "'any type allowed'"); | 281 shouldBe("nonNumericPolicy('document.createNodeIterator(document, x, null, false
)')", "'any type allowed'"); |
282 | 282 |
283 // NodeList | 283 // NodeList |
284 | 284 |
285 shouldBe("nonNumericPolicy('document.getElementsByTagName(\"div\").item(x)')", "
'any type allowed'"); | 285 shouldBe("nonNumericPolicy('document.getElementsByTagName(\"div\").item(x)')", "
'any type allowed (but not omitted)'"); |
286 | 286 |
287 // Range | 287 // Range |
288 | 288 |
289 shouldBe("nonNumericPolicy('document.createRange().setStart(document, x)')", "'a
ny type allowed (but not omitted)'"); | 289 shouldBe("nonNumericPolicy('document.createRange().setStart(document, x)')", "'a
ny type allowed (but not omitted)'"); |
290 shouldBe("nonNumericPolicy('document.createRange().setEnd(document, x)')", "'any
type allowed (but not omitted)'"); | 290 shouldBe("nonNumericPolicy('document.createRange().setEnd(document, x)')", "'any
type allowed (but not omitted)'"); |
291 shouldBe("nonNumericPolicy('document.createRange().comparePoint(document, x)')",
"'any type allowed (but not omitted)'"); | 291 shouldBe("nonNumericPolicy('document.createRange().comparePoint(document, x)')",
"'any type allowed (but not omitted)'"); |
292 shouldBe("nonNumericPolicy('document.createRange().isPointInRange(document, x)')
", "'any type allowed (but not omitted)'"); | 292 shouldBe("nonNumericPolicy('document.createRange().isPointInRange(document, x)')
", "'any type allowed (but not omitted)'"); |
293 | 293 |
294 // Selection | 294 // Selection |
295 | 295 |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 ../../../../WebCore/svg/SVGSVGElement.idl: attribute float curre
ntScale | 622 ../../../../WebCore/svg/SVGSVGElement.idl: attribute float curre
ntScale |
623 | 623 |
624 ../../../../WebCore/svg/SVGMatrix.idl: attribute double a; | 624 ../../../../WebCore/svg/SVGMatrix.idl: attribute double a; |
625 ../../../../WebCore/svg/SVGMatrix.idl: attribute double b; | 625 ../../../../WebCore/svg/SVGMatrix.idl: attribute double b; |
626 ../../../../WebCore/svg/SVGMatrix.idl: attribute double c; | 626 ../../../../WebCore/svg/SVGMatrix.idl: attribute double c; |
627 ../../../../WebCore/svg/SVGMatrix.idl: attribute double d; | 627 ../../../../WebCore/svg/SVGMatrix.idl: attribute double d; |
628 ../../../../WebCore/svg/SVGMatrix.idl: attribute double e; | 628 ../../../../WebCore/svg/SVGMatrix.idl: attribute double e; |
629 ../../../../WebCore/svg/SVGMatrix.idl: attribute double f; | 629 ../../../../WebCore/svg/SVGMatrix.idl: attribute double f; |
630 | 630 |
631 */ | 631 */ |
OLD | NEW |