New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 891658 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 801162



Sign in to add a comment

snav-testharness.js cannot assert elements outside the main frame

Reported by hu...@vewd.com, Oct 3

Issue description

When I tried to convert snav-iframe-nested.html to snav-testharness.js in the same mechanical way as we've been converting the other old spatnav layout tests (see Issue 803086), it became clear that element ids (see resultMap) must be in the main frame's document for assertFocusMoves() to be able to find them.

We need an updated assertFocusMoves()-helper to be able to test activeElement == an iframe and activeElement == some element inside an iframe.
 
Description: Show this description
Blocking: 801162
Owner: hu...@vewd.com
Status: Started (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a417a16cbf123394a09dc3ee985591da1b5301ed

commit a417a16cbf123394a09dc3ee985591da1b5301ed
Author: Hugo Holgersson <hugoh@vewd.com>
Date: Fri Nov 02 17:01:10 2018

Snav: Convert all snav*iframe*.html tests to snav-testharness.js

The changes to snav-testharness.js lets us assert navigations
in and out of iframes:

 1) To be able to test focus movements in and out of iframes,
    we need to listen for 'keyup'-events on the document where
    focus is _about_to_go_.

    'keyup' targets the currently focused document. When 'keyup'
    comes, 'keydown' has already changed focus to the new document.

 2) Previously each movement had its own async_test(). Now we use
    one async_test() with many "test steps": one for each movement.
    This helps us avoid tricky (mis)usage of testharness.js's
    fetch_tests_from_window().

The changes to the HTML files are mostly mechanical except that
I gave some elements new or renamed ids so they become easier
to distinguish when debugging.

Once we've fixed  Issue 801162 , the tests' expectations will change:
We want spatnav to first _focus_ the iframe (before scrolling it
or searching inside of it).

Bug: 803086,  891658 ,  801162 
Change-Id: Ib53bb224398510b5744927a5d892381870fa4690
Reviewed-on: https://chromium-review.googlesource.com/c/1314469
Commit-Queue: Hugo Holgersson <hugoh@vewd.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#604962}
[delete] https://crrev.com/4dea3aba8069abf0688bef434173cc620ce87139/third_party/WebKit/LayoutTests/fast/spatial-navigation/resources/iframe.html
[modify] https://crrev.com/a417a16cbf123394a09dc3ee985591da1b5301ed/third_party/WebKit/LayoutTests/fast/spatial-navigation/resources/snav-testharness.js
[delete] https://crrev.com/4dea3aba8069abf0688bef434173cc620ce87139/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-nested-expected.txt
[modify] https://crrev.com/a417a16cbf123394a09dc3ee985591da1b5301ed/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-nested.html
[delete] https://crrev.com/4dea3aba8069abf0688bef434173cc620ce87139/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-no-focusable-content-expected.txt
[modify] https://crrev.com/a417a16cbf123394a09dc3ee985591da1b5301ed/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-no-focusable-content.html
[delete] https://crrev.com/4dea3aba8069abf0688bef434173cc620ce87139/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-no-scrollable-content-expected.txt
[modify] https://crrev.com/a417a16cbf123394a09dc3ee985591da1b5301ed/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-no-scrollable-content.html
[delete] https://crrev.com/4dea3aba8069abf0688bef434173cc620ce87139/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-recursive-offset-parent-expected.txt
[modify] https://crrev.com/a417a16cbf123394a09dc3ee985591da1b5301ed/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-recursive-offset-parent.html
[delete] https://crrev.com/4dea3aba8069abf0688bef434173cc620ce87139/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-with-offscreen-focusable-element-expected.txt
[modify] https://crrev.com/a417a16cbf123394a09dc3ee985591da1b5301ed/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-with-offscreen-focusable-element.html
[delete] https://crrev.com/4dea3aba8069abf0688bef434173cc620ce87139/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-with-outside-focusable-element-expected.txt
[modify] https://crrev.com/a417a16cbf123394a09dc3ee985591da1b5301ed/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-iframe-with-outside-focusable-element.html

Status: Fixed (was: Started)

Sign in to add a comment