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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 326 |
327 // Window | 327 // Window |
328 | 328 |
329 shouldBe("nonNumericPolicy('window.scrollBy(x, 0)')", "'any type allowed'"); | 329 shouldBe("nonNumericPolicy('window.scrollBy(x, 0)')", "'any type allowed'"); |
330 shouldBe("nonNumericPolicy('window.scrollBy(0, x)')", "'any type allowed (but no
t omitted)'"); | 330 shouldBe("nonNumericPolicy('window.scrollBy(0, x)')", "'any type allowed (but no
t omitted)'"); |
331 shouldBe("nonNumericPolicy('window.scrollTo(x, 0)')", "'any type allowed'"); | 331 shouldBe("nonNumericPolicy('window.scrollTo(x, 0)')", "'any type allowed'"); |
332 shouldBe("nonNumericPolicy('window.scrollTo(0, x)')", "'any type allowed (but no
t omitted)'"); | 332 shouldBe("nonNumericPolicy('window.scrollTo(0, x)')", "'any type allowed (but no
t omitted)'"); |
333 shouldBe("nonNumericPolicy('window.scroll(x, 0)')", "'any type allowed'"); | 333 shouldBe("nonNumericPolicy('window.scroll(x, 0)')", "'any type allowed'"); |
334 shouldBe("nonNumericPolicy('window.scroll(0, x)')", "'any type allowed (but not
omitted)'"); | 334 shouldBe("nonNumericPolicy('window.scroll(0, x)')", "'any type allowed (but not
omitted)'"); |
335 shouldBe("nonNumericPolicy('window.moveBy(x, 0)')", "'any type allowed'"); | 335 shouldBe("nonNumericPolicy('window.moveBy(x, 0)')", "'any type allowed'"); |
336 shouldBe("nonNumericPolicy('window.moveBy(0, x)')", "'any type allowed'"); | 336 shouldBe("nonNumericPolicy('window.moveBy(0, x)')", "'any type allowed (but not
omitted)'"); |
337 shouldBe("nonNumericPolicy('window.moveTo(x, 0)')", "'any type allowed'"); | 337 shouldBe("nonNumericPolicy('window.moveTo(x, 0)')", "'any type allowed'"); |
338 shouldBe("nonNumericPolicy('window.moveTo(0, x)')", "'any type allowed'"); | 338 shouldBe("nonNumericPolicy('window.moveTo(0, x)')", "'any type allowed (but not
omitted)'"); |
339 shouldBe("nonNumericPolicy('window.resizeBy(x, 0)')", "'any type allowed'"); | 339 shouldBe("nonNumericPolicy('window.resizeBy(x, 0)')", "'any type allowed'"); |
340 shouldBe("nonNumericPolicy('window.resizeBy(0, x)')", "'any type allowed'"); | 340 shouldBe("nonNumericPolicy('window.resizeBy(0, x)')", "'any type allowed (but no
t omitted)'"); |
341 shouldBe("nonNumericPolicy('window.resizeTo(x, 0)')", "'any type allowed'"); | 341 shouldBe("nonNumericPolicy('window.resizeTo(x, 0)')", "'any type allowed'"); |
342 shouldBe("nonNumericPolicy('window.resizeTo(0, x)')", "'any type allowed'"); | 342 shouldBe("nonNumericPolicy('window.resizeTo(0, x)')", "'any type allowed (but no
t omitted)'"); |
343 // Not tested: openDatabase. | 343 // Not tested: openDatabase. |
344 | 344 |
345 window.resizeTo(10000, 10000); | 345 window.resizeTo(10000, 10000); |
346 document.body.removeChild(testElementContainer); | 346 document.body.removeChild(testElementContainer); |
347 | 347 |
348 /* | 348 /* |
349 | 349 |
350 Here are other examples of numeric types in function parameters and settable att
ributes that we could test: | 350 Here are other examples of numeric types in function parameters and settable att
ributes that we could test: |
351 | 351 |
352 ../../../../WebCore/css/CSSPrimitiveValue.idl:
in float floatValue) | 352 ../../../../WebCore/css/CSSPrimitiveValue.idl:
in float floatValue) |
(...skipping 269 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 |