Changeset 21046 in webkit
- Timestamp:
- Apr 23, 2007 2:24:50 PM (17 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r21045 r21046 1 1 2007-04-23 Adele Peterson <adele@apple.com> 2 2 3 Reviewed by Adam. 4 5 Updating test from last checkin to include test case for select with and without a form element. 6 7 * fast/events/onchange-select-popup-expected.txt: 8 * fast/events/onchange-select-popup.html: 9 10 2007-04-23 Adele Peterson <adele@apple.com> 11 3 12 Reviewed by Hyatt & Adam. 4 13 5 14 Tests for <rdar://problem/4807799> REGRESSION: calling select() in onSearch handler doesn't work if you hit enter to trigger the event 15 and <rdar://problem/5153970> onChange doesn't fire when focusing a popup, using type-ahead to select, and leaving 6 16 7 17 * fast/events/onchange-passwordfield-expected.txt: -
trunk/LayoutTests/fast/events/onchange-select-popup-expected.txt
r21045 r21046 1 1 This test verifies that the ENTER key fires the change event for popups. 2 2 3 3 4 4 5 PASS: change event fired. 5 6 7 blur event fired. 6 8 9 -
trunk/LayoutTests/fast/events/onchange-select-popup.html
r21045 r21046 19 19 function test() 20 20 { 21 var menu = document.getElementById('menu'); 22 menu.focus(); 21 if (window.layoutTestController) 22 layoutTestController.dumpAsText(); 23 24 // Test for select that's not inside a form element 25 var menu1 = document.getElementById('menu1'); 26 menu1.focus(); 23 27 24 28 if (window.layoutTestController) { 25 layoutTestController.dumpAsText();26 27 29 // change the option selection 28 30 eventSender.keyDown('e'); 29 31 } 30 31 32 // hit enter 32 33 var enterEvent = document.createEvent("KeyboardEvents"); 33 34 enterEvent.initKeyboardEvent("keypress", true, false, window, "Enter", 0, false, false, false, false, false); 34 menu.dispatchEvent(enterEvent); 35 menu1.dispatchEvent(enterEvent); 36 37 // Test for select is inside a form element 38 var menu2 = document.getElementById('menu2'); 39 menu2.focus(); 40 41 if (window.layoutTestController) { 42 // change the option selection 43 eventSender.keyDown('e'); 44 } 45 // hit enter 46 menu2.dispatchEvent(enterEvent); 35 47 } 36 48 </script> … … 39 51 <p>This test verifies that the ENTER key fires the change event for popups.</p> 40 52 <hr> 41 <form> 42 <select id="menu" onchange="changeHandler()" onblur="blurHandler()"><option>abcd</option><option>efgh</option></select> 53 <select id="menu1" onchange="changeHandler()" onblur="blurHandler()"><option>abcd</option><option>efgh</option></select> 54 <form onsubmit="return false;"> 55 <select id="menu2" onchange="changeHandler()" onblur="blurHandler()"><option>abcd</option><option>efgh</option></select> 43 56 </form> 44 57 <pre id="console"></pre>
Note: See TracChangeset
for help on using the changeset viewer.