Bug 178053

Summary: usemap-casing.html test passes in browser, fails in LayoutTests because it is taller than 600px
Product: WebKit Reporter: Darin Adler <darin>
Component: Tools / TestsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, cdumez, commit-queue, dbates, lforschler, rniwa, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/w3c/web-platform-tests/pull/7644
Attachments:
Description Flags
Patch none

Description Darin Adler 2017-10-07 16:31:23 PDT
To reproduce:

% open-layout-test LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/usemap-casing.html

Note that all 8 tests pass. Same thing if you just open <http://w3c-test.org/html/semantics/embedded-content/the-img-element/usemap-casing.html>.

% run-webkit-tests imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/usemap-casing.html

It says "The test ran as expected."

But "as expected" means 4 tests passing and 4 tests failing. You can see that in the expected results file LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/usemap-casing-expected.txt and can see that the failure is because element.parentElement is null. To me seems to indicate that the images did not load.
Comment 1 youenn fablet 2017-10-07 16:39:18 PDT
Testing on Chrome and Firefox, the last 4 tests are also failing.

Testing on Safari, the test seems flaky when opening the same test on different tabs.
Last two tests sometimes fail with the same error message.

Since Chrome, Firefox and Safari all exhibit different behaviors, we might want to look at the test and see what is causing this issue.
Maybe an issue with the way the test is written and/or some interop issue.
Comment 2 Chris Dumez 2017-10-07 16:53:17 PDT
Oh, this is because of our 800x600 restriction in layout tests. elementFromPoint() returns null because the element is outside the viewport.
Comment 3 Chris Dumez 2017-10-07 16:54:20 PDT
(In reply to Chris Dumez from comment #2)
> Oh, this is because of our 800x600 restriction in layout tests.
> elementFromPoint() returns null because the element is outside the viewport.

I guess we could make the test behave nicely with DRT / WKTR by using something smaller than 300x300 for each element.
Comment 4 youenn fablet 2017-10-07 17:53:56 PDT
I think wpt ref tests expect 800x600 viewport so changing the test should be fine.
Comment 5 Ryosuke Niwa 2017-10-07 19:08:54 PDT
WPT tests are supposed to fit within a smaller viewport than 800x600 so this is just a bug that needs to be fixed upstream.
Comment 6 Chris Dumez 2017-10-09 12:28:08 PDT
Upstream PR: https://github.com/w3c/web-platform-tests/pull/7644
Comment 7 Chris Dumez 2017-10-09 14:42:49 PDT
Created attachment 323225 [details]
Patch
Comment 8 WebKit Commit Bot 2017-10-09 16:36:55 PDT
The commit-queue encountered the following flaky tests while processing attachment 323225 [details]:

media/modern-media-controls/seek-backward-support/seek-backward-support.html bug 174916 (authors: graouts@apple.com, mcatanzaro@igalia.com, and ryanhaddad@apple.com)
The commit-queue is continuing to process your patch.
Comment 9 WebKit Commit Bot 2017-10-09 16:36:56 PDT
The commit-queue encountered the following flaky tests while processing attachment 323225 [details]:

The commit-queue is continuing to process your patch.
Comment 10 WebKit Commit Bot 2017-10-09 17:05:27 PDT
Comment on attachment 323225 [details]
Patch

Clearing flags on attachment: 323225

Committed r223087: <http://trac.webkit.org/changeset/223087>
Comment 11 WebKit Commit Bot 2017-10-09 17:05:28 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Radar WebKit Bug Importer 2017-10-09 17:06:22 PDT
<rdar://problem/34898968>