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

Side by Side Diff: LayoutTests/fast/forms/setrangetext-expected.txt

Issue 596723002: Enabling selection API for input type=<file, color, date, email, number> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Enabling Selection API for input type email and number Created 6 years, 3 months 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 Test setRangeText() method on common input types. 1 Test setRangeText() method on common input types.
2 2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ". 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4 4
5 5
6 6
7 Running tests on input with attributes: {"type":"password"} 7 Running tests on input with attributes: {"type":"password"}
8 8
9 setRangeText() with only one parameter. 9 setRangeText() with only one parameter.
10 element.value = '0123456789' 10 element.value = '0123456789'
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 PASS element.selectionEnd is 11 617 PASS element.selectionEnd is 11
618 element.value = '0123456789' 618 element.value = '0123456789'
619 element.setSelectionRange(0, 0) 619 element.setSelectionRange(0, 0)
620 element.setRangeText('A', 8, 100, 'select') 620 element.setRangeText('A', 8, 100, 'select')
621 PASS element.value is "01234567A" 621 PASS element.value is "01234567A"
622 PASS element.selectionStart is 8 622 PASS element.selectionStart is 8
623 PASS element.selectionEnd is 9 623 PASS element.selectionEnd is 9
624 element.value = '0123456789' 624 element.value = '0123456789'
625 PASS element.setRangeText('A', 7, 3) threw exception IndexSizeError: Failed to e xecute 'setRangeText' on 'HTMLInputElement': The provided start value (7) is lar ger than the provided end value (3).. 625 PASS element.setRangeText('A', 7, 3) threw exception IndexSizeError: Failed to e xecute 'setRangeText' on 'HTMLInputElement': The provided start value (7) is lar ger than the provided end value (3)..
626 626
627 Running tests on input with attributes: {"type":"email"}
628
629 setRangeText() with only one parameter.
630 element.value = '0123456789'
631 element.setSelectionRange(2, 5)
632 element.setRangeText('ABC')
633 PASS element.value is "01ABC56789"
634 PASS element.selectionStart is 2
635 PASS element.selectionEnd is 5
636 element.setRangeText('ABCD')
637 PASS element.value is "01ABCD56789"
638 PASS element.selectionStart is 2
639 PASS element.selectionEnd is 6
640 element.setRangeText('AB')
641 PASS element.value is "01AB56789"
642 PASS element.selectionStart is 2
643 PASS element.selectionEnd is 4
644 element.setRangeText('')
645 PASS element.value is "0156789"
646 PASS element.selectionStart is 2
647 PASS element.selectionEnd is 2
648
649 setRangeText() with 'select' as the selectMode.
650 element.value = '0123456789'
651 element.setSelectionRange(0, 0)
652 element.setRangeText('ABC', 2, 5, 'select')
653 PASS element.value is "01ABC56789"
654 PASS element.selectionStart is 2
655 PASS element.selectionEnd is 5
656 element.value = '0123456789'
657 element.setSelectionRange(0, 0)
658 element.setRangeText('ABC', 5, 10, 'select')
659 PASS element.value is "01234ABC"
660 PASS element.selectionStart is 5
661 PASS element.selectionEnd is 8
662 element.value = '0123456789'
663 element.setSelectionRange(0, 0)
664 element.setRangeText('ABC', 1, 2, 'select')
665 PASS element.value is "0ABC23456789"
666 PASS element.selectionStart is 1
667 PASS element.selectionEnd is 4
668 element.value = '0123456789'
669 element.setSelectionRange(0, 0)
670 element.setRangeText('', 1, 9, 'select')
671 PASS element.value is "09"
672 PASS element.selectionStart is 1
673 PASS element.selectionEnd is 1
674
675 setRangeText() with 'start' as the selectMode.
676 element.value = '0123456789'
677 element.setSelectionRange(0, 0)
678 element.setRangeText('ABC', 2, 6, 'start')
679 PASS element.value is "01ABC6789"
680 PASS element.selectionStart is 2
681 PASS element.selectionEnd is 2
682
683 setRangeText() with 'end' as the selectMode.
684 element.value = '0123456789'
685 element.setSelectionRange(0, 0)
686 element.setRangeText('ABC', 10, 10, 'end')
687 PASS element.value is "0123456789ABC"
688 PASS element.selectionStart is 13
689 PASS element.selectionEnd is 13
690
691 setRangeText() with 'preserve' as the selectMode.
692 element.value = '0123456789'
693 element.setSelectionRange(6, 9)
694 element.setRangeText('A', 1, 2)
695 PASS element.value is "0A23456789"
696 PASS element.selectionStart is 6
697 PASS element.selectionEnd is 9
698 element.value = '0123456789'
699 element.setSelectionRange(6, 9)
700 element.setRangeText('AB', 1, 1, 'invalid')
701 PASS element.value is "0AB123456789"
702 PASS element.selectionStart is 8
703 PASS element.selectionEnd is 11
704 element.value = '0123456789'
705 element.setSelectionRange(6, 9)
706 element.setRangeText('AB', 1, 1, undefined)
707 PASS element.value is "0AB123456789"
708 PASS element.selectionStart is 8
709 PASS element.selectionEnd is 11
710 element.value = '0123456789'
711 element.setSelectionRange(6, 9)
712 element.setRangeText('A', 1, 3, 'preserve')
713 PASS element.value is "0A3456789"
714 PASS element.selectionStart is 5
715 PASS element.selectionEnd is 8
716 element.value = '0123456789'
717 element.setSelectionRange(2, 6)
718 element.setRangeText('A', 1, 4, 'preserve')
719 PASS element.value is "0A456789"
720 PASS element.selectionStart is 1
721 PASS element.selectionEnd is 4
722 element.value = '0123456789'
723 element.setSelectionRange(2, 6)
724 element.setRangeText('A', 4, 6, 'preserve')
725 PASS element.value is "0123A6789"
726 PASS element.selectionStart is 2
727 PASS element.selectionEnd is 5
728 element.value = '0123456789'
729 element.setSelectionRange(2, 6)
730 element.setRangeText('ABCDEF', 4, 7, 'preserve')
731 PASS element.value is "0123ABCDEF789"
732 PASS element.selectionStart is 2
733 PASS element.selectionEnd is 10
734
735 setRangeText() with various start/end values.
736 element.value = '0123456789'
737 element.setSelectionRange(0, 0)
738 element.setRangeText('A', 100, 100, 'select')
739 PASS element.value is "0123456789A"
740 PASS element.selectionStart is 10
741 PASS element.selectionEnd is 11
742 element.value = '0123456789'
743 element.setSelectionRange(0, 0)
744 element.setRangeText('A', 8, 100, 'select')
745 PASS element.value is "01234567A"
746 PASS element.selectionStart is 8
747 PASS element.selectionEnd is 9
748 element.value = '0123456789'
749 PASS element.setRangeText('A', 7, 3) threw exception IndexSizeError: Failed to e xecute 'setRangeText' on 'HTMLInputElement': The provided start value (7) is lar ger than the provided end value (3)..
750
627 Check that setRangeText() on disconnected elements doesn't crash and has proper values. 751 Check that setRangeText() on disconnected elements doesn't crash and has proper values.
628 element.value = '0123456789' 752 element.value = '0123456789'
629 element.setRangeText('ABC', 0, 0, 'select') 753 element.setRangeText('ABC', 0, 0, 'select')
630 FAIL element.value should be ABC0123456789. Was 0123456789. 754 FAIL element.value should be ABC0123456789. Was 0123456789.
631 755
632 Running tests on input with attributes: {"type":"button"} 756 Running tests on input with attributes: {"type":"button"}
633 757
634 element.value = '0123456789XYZ' 758 element.value = '0123456789XYZ'
635 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('but ton') does not support selection.. 759 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('but ton') does not support selection..
636 PASS element.value is "0123456789XYZ" 760 PASS element.value is "0123456789XYZ"
637 761
638 Running tests on input with attributes: {"type":"checkbox"} 762 Running tests on input with attributes: {"type":"checkbox"}
639 763
640 element.value = '0123456789XYZ' 764 element.value = '0123456789XYZ'
641 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('che ckbox') does not support selection.. 765 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('che ckbox') does not support selection..
642 PASS element.value is "0123456789XYZ" 766 PASS element.value is "0123456789XYZ"
643 767
644 Running tests on input with attributes: {"type":"email"}
645
646 element.value = '0123456789XYZ'
647 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('ema il') does not support selection..
648 PASS element.value is "0123456789XYZ"
649
650 Running tests on input with attributes: {"type":"radio"} 768 Running tests on input with attributes: {"type":"radio"}
651 769
652 element.value = '0123456789XYZ' 770 element.value = '0123456789XYZ'
653 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('rad io') does not support selection.. 771 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('rad io') does not support selection..
654 PASS element.value is "0123456789XYZ" 772 PASS element.value is "0123456789XYZ"
655 773
656 Running tests on input with attributes: {"type":"reset"} 774 Running tests on input with attributes: {"type":"reset"}
657 775
658 element.value = '0123456789XYZ' 776 element.value = '0123456789XYZ'
659 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('res et') does not support selection.. 777 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('res et') does not support selection..
660 PASS element.value is "0123456789XYZ" 778 PASS element.value is "0123456789XYZ"
661 779
662 Running tests on input with attributes: {"type":"submit"} 780 Running tests on input with attributes: {"type":"submit"}
663 781
664 element.value = '0123456789XYZ' 782 element.value = '0123456789XYZ'
665 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('sub mit') does not support selection.. 783 PASS element.setRangeText('ABC', 0, 0) threw exception InvalidStateError: Failed to execute 'setRangeText' on 'HTMLInputElement': The input element's type ('sub mit') does not support selection..
666 PASS element.value is "0123456789XYZ" 784 PASS element.value is "0123456789XYZ"
667 PASS successfullyParsed is true 785 PASS successfullyParsed is true
668 786
669 TEST COMPLETE 787 TEST COMPLETE
670 788
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/setrangetext.html ('k') | LayoutTests/fast/forms/time/time-setrangetext.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698