Skip to content
Permalink
Browse files
2010-10-25 Chang Shu <chang.shu@nokia.com>
        Reviewed by Antonio Gomes.

        Should use eventSender for simulating keyboard events instead of using js
        event.initKeyboardEvent. Otherwise, inside WebCore, the keyboardevent
        object does not have a "PlatformKeyboardEvent" associated with it and this
        results different behavior as the real key press.
        This code change unveils that test snav-multiple-select.html is broken. It
        alos causes snav-single-select.html hangs on Mac. These will be fixed in
        seperate patches.
        https://bugs.webkit.org/show_bug.cgi?id=48134

        * fast/events/spatial-navigation/resources/spatial-navigation-utils.js:
        (doMove):
        * fast/events/spatial-navigation/snav-multiple-select-expected.txt:
        * platform/mac/Skipped:

Canonical link: https://commits.webkit.org/61015@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@70481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Chang Shu committed Oct 25, 2010
1 parent 8dd24e0 commit 184f7976a081f6f5a1431f8db653b0345dcc4ffc
Showing 4 changed files with 44 additions and 5 deletions.
@@ -1,3 +1,21 @@
2010-10-25 Chang Shu <chang.shu@nokia.com>

Reviewed by Antonio Gomes.

Should use eventSender for simulating keyboard events instead of using js
event.initKeyboardEvent. Otherwise, inside WebCore, the keyboardevent
object does not have a "PlatformKeyboardEvent" associated with it and this
results different behavior as the real key press.
This code change unveils that test snav-multiple-select.html is broken. It
alos causes snav-single-select.html hangs on Mac. These will be fixed in
seperate patches.
https://bugs.webkit.org/show_bug.cgi?id=48134

* fast/events/spatial-navigation/resources/spatial-navigation-utils.js:
(doMove):
* fast/events/spatial-navigation/snav-multiple-select-expected.txt:
* platform/mac/Skipped:

2010-10-25 Mihai Parparita <mihaip@chromium.org>

Unreviewed checksum rebaseline for Snow Leopard.
@@ -38,9 +38,27 @@ function prepareMove()

function doMove()
{
var event = document.createEvent('KeyboardEvents');
event.initKeyboardEvent('keydown', true, true, document.defaultView, gExpectedResults[gIndex][0], 0, false, false, false, false, false);
document.dispatchEvent(event);
var direction;

switch (gExpectedResults[gIndex][0]) {
case "Up":
direction = "upArrow";
break;
case "Right":
direction = "rightArrow";
break;
case "Down":
direction = "downArrow";
break;
case "Left":
direction = "leftArrow";
break;
default:
return;
}

if (window.layoutTestController)
eventSender.keyDown(direction);

setTimeout(verifyAndAdvance, 15);
}
@@ -1,9 +1,9 @@
2
4 6
8
PASS gFocusedDocument.activeElement.getAttribute("id") is "8"
FAIL gFocusedDocument.activeElement.getAttribute("id") should be 8. Was start.
PASS gFocusedDocument.activeElement.getAttribute("id") is "start"
PASS gFocusedDocument.activeElement.getAttribute("id") is "2"
FAIL gFocusedDocument.activeElement.getAttribute("id") should be 2. Was start.
PASS gFocusedDocument.activeElement.getAttribute("id") is "start"
PASS gFocusedDocument.activeElement.getAttribute("id") is "6"
PASS gFocusedDocument.activeElement.getAttribute("id") is "start"
@@ -317,6 +317,9 @@ fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html
# https://bugs.webkit.org/show_bug.cgi?id=47449
fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction.html

# https://bugs.webkit.org/show_bug.cgi?id=48150
fast/events/spatial-navigation/snav-single-select.html

# Requires WebP support.
fast/images/webp-image-decoding.html

0 comments on commit 184f797

Please sign in to comment.