Changeset 21046 in webkit


Ignore:
Timestamp:
Apr 23, 2007 2:24:50 PM (17 years ago)
Author:
adele
Message:

Reviewed by Adam.

Updating test from last checkin to include test case for select with and without a form element.

  • fast/events/onchange-select-popup-expected.txt:
  • fast/events/onchange-select-popup.html:
Location:
trunk/LayoutTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r21045 r21046  
    112007-04-23  Adele Peterson  <adele@apple.com>
    22
     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
     102007-04-23  Adele Peterson  <adele@apple.com>
     11
    312        Reviewed by Hyatt & Adam.
    413
    514        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
    616
    717        * fast/events/onchange-passwordfield-expected.txt:
  • trunk/LayoutTests/fast/events/onchange-select-popup-expected.txt

    r21045 r21046  
    11This test verifies that the ENTER key fires the change event for popups.
     2
    23
    34
    45PASS: change event fired.
    56
     7blur event fired.
    68
     9
  • trunk/LayoutTests/fast/events/onchange-select-popup.html

    r21045 r21046  
    1919    function test()
    2020    {
    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();
    2327
    2428        if (window.layoutTestController) {
    25             layoutTestController.dumpAsText();
    26 
    2729            // change the option selection
    2830            eventSender.keyDown('e');
    2931        }
    30 
    3132        // hit enter
    3233        var enterEvent = document.createEvent("KeyboardEvents");
    3334        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);
    3547    }
    3648    </script>
     
    3951    <p>This test verifies that the ENTER key fires the change event for popups.</p>
    4052    <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>
    4356    </form>
    4457    <pre id="console"></pre>
Note: See TracChangeset for help on using the changeset viewer.