Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js

Issue 59863003: window.scroll() without params should be ignored or throw an error (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase test & test results of non-numeric-values-numeric-parameters test. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 332
333 shouldBe("nonNumericPolicy('document.createTreeWalker(document, x, null, false)' )", "'any type allowed'"); 333 shouldBe("nonNumericPolicy('document.createTreeWalker(document, x, null, false)' )", "'any type allowed'");
334 334
335 // UIEvent 335 // UIEvent
336 336
337 shouldBe("nonNumericPolicy('document.createEvent(\"UIEvent\").initUIEvent(\"a\", false, false, null, x)')", "'any type allowed'"); 337 shouldBe("nonNumericPolicy('document.createEvent(\"UIEvent\").initUIEvent(\"a\", false, false, null, x)')", "'any type allowed'");
338 338
339 // Window 339 // Window
340 340
341 shouldBe("nonNumericPolicy('window.scrollBy(x, 0)')", "'any type allowed'"); 341 shouldBe("nonNumericPolicy('window.scrollBy(x, 0)')", "'any type allowed'");
342 shouldBe("nonNumericPolicy('window.scrollBy(0, x)')", "'any type allowed'"); 342 shouldBe("nonNumericPolicy('window.scrollBy(0, x)')", "'any type allowed (but no t omitted)'");
343 shouldBe("nonNumericPolicy('window.scrollTo(x, 0)')", "'any type allowed'"); 343 shouldBe("nonNumericPolicy('window.scrollTo(x, 0)')", "'any type allowed'");
344 shouldBe("nonNumericPolicy('window.scrollTo(0, x)')", "'any type allowed'"); 344 shouldBe("nonNumericPolicy('window.scrollTo(0, x)')", "'any type allowed (but no t omitted)'");
345 shouldBe("nonNumericPolicy('window.scroll(x, 0)')", "'any type allowed'"); 345 shouldBe("nonNumericPolicy('window.scroll(x, 0)')", "'any type allowed'");
346 shouldBe("nonNumericPolicy('window.scroll(0, x)')", "'any type allowed'"); 346 shouldBe("nonNumericPolicy('window.scroll(0, x)')", "'any type allowed (but not omitted)'");
347 shouldBe("nonNumericPolicy('window.moveBy(x, 0)')", "'any type allowed'"); 347 shouldBe("nonNumericPolicy('window.moveBy(x, 0)')", "'any type allowed'");
348 shouldBe("nonNumericPolicy('window.moveBy(0, x)')", "'any type allowed'"); 348 shouldBe("nonNumericPolicy('window.moveBy(0, x)')", "'any type allowed'");
349 shouldBe("nonNumericPolicy('window.moveTo(x, 0)')", "'any type allowed'"); 349 shouldBe("nonNumericPolicy('window.moveTo(x, 0)')", "'any type allowed'");
350 shouldBe("nonNumericPolicy('window.moveTo(0, x)')", "'any type allowed'"); 350 shouldBe("nonNumericPolicy('window.moveTo(0, x)')", "'any type allowed'");
351 shouldBe("nonNumericPolicy('window.resizeBy(x, 0)')", "'any type allowed'"); 351 shouldBe("nonNumericPolicy('window.resizeBy(x, 0)')", "'any type allowed'");
352 shouldBe("nonNumericPolicy('window.resizeBy(0, x)')", "'any type allowed'"); 352 shouldBe("nonNumericPolicy('window.resizeBy(0, x)')", "'any type allowed'");
353 shouldBe("nonNumericPolicy('window.resizeTo(x, 0)')", "'any type allowed'"); 353 shouldBe("nonNumericPolicy('window.resizeTo(x, 0)')", "'any type allowed'");
354 shouldBe("nonNumericPolicy('window.resizeTo(0, x)')", "'any type allowed'"); 354 shouldBe("nonNumericPolicy('window.resizeTo(0, x)')", "'any type allowed'");
355 // Not tested: openDatabase. 355 // Not tested: openDatabase.
356 356
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 ../../../../WebCore/svg/SVGSVGElement.idl: attribute float curre ntScale 635 ../../../../WebCore/svg/SVGSVGElement.idl: attribute float curre ntScale
636 636
637 ../../../../WebCore/svg/SVGMatrix.idl: attribute double a; 637 ../../../../WebCore/svg/SVGMatrix.idl: attribute double a;
638 ../../../../WebCore/svg/SVGMatrix.idl: attribute double b; 638 ../../../../WebCore/svg/SVGMatrix.idl: attribute double b;
639 ../../../../WebCore/svg/SVGMatrix.idl: attribute double c; 639 ../../../../WebCore/svg/SVGMatrix.idl: attribute double c;
640 ../../../../WebCore/svg/SVGMatrix.idl: attribute double d; 640 ../../../../WebCore/svg/SVGMatrix.idl: attribute double d;
641 ../../../../WebCore/svg/SVGMatrix.idl: attribute double e; 641 ../../../../WebCore/svg/SVGMatrix.idl: attribute double e;
642 ../../../../WebCore/svg/SVGMatrix.idl: attribute double f; 642 ../../../../WebCore/svg/SVGMatrix.idl: attribute double f;
643 643
644 */ 644 */
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt ('k') | Source/core/frame/Window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698