Bug 30816 - [GTK] Failing test fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll.html
Summary: [GTK] Failing test fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-27 06:24 PDT by Alejandro G. Castro
Modified: 2011-03-07 13:23 PST (History)
1 user (show)

See Also:


Attachments
layout test (12.42 KB, text/plain)
2011-03-04 15:15 PST, Xiaomei Ji
no flags Details
layout test (12.39 KB, patch)
2011-03-04 16:37 PST, Xiaomei Ji
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro G. Castro 2009-10-27 06:24:56 PDT
The result of this test added in the patch solving the bug 30689 does not work:

--- layout-test-results/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll-expected.txt	2009-10-27 03:22:05.414649015 -0700
+++ layout-test-results/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll-actual.txt	2009-10-27 03:22:05.414649015 -0700
@@ -10,8 +10,8 @@
 Success
 Success
 Success
+Failure, actual: 82; expected: 93
 Success
+Failure, actual: 15; expected: 19
 Success
-Success
-Success
-Success
+Failure, actual: 53; expected: 64
Comment 1 Xiaomei Ji 2011-03-04 15:15:28 PST
Created attachment 84811 [details]
layout test

The test fails in chromium and qt as well.
Patch to make the test cross-platform.
Comment 2 Xiaomei Ji 2011-03-04 15:34:40 PST
Comment on attachment 84811 [details]
layout test

Ah, I run it in Mac and chromium-mac. I should run in chromium-linux. Seems that the test for elementFromPoint() is not correct in chromium-linux.
Comment 3 Xiaomei Ji 2011-03-04 16:37:11 PST
Created attachment 84827 [details]
layout test
Comment 4 Martin Robinson 2011-03-07 11:30:08 PST
Comment on attachment 84827 [details]
layout test

View in context: https://bugs.webkit.org/attachment.cgi?id=84827&action=review

I tested this change locally and the test is now passing on GTK+. Thanks for the cleanup!

> LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll.html:13
> +    var expectedOffset = 29;

Might want to leave a comment here explaining where 29 comes from.

> LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll.html:16
> +    function check(message, event)

I recommend naming this function something a bit more descriptive.

> LayoutTests/fast/dom/Document/CaretRangeFromPoint/caretRangeFromPoint-in-zoom-and-scroll.html:18
> +        var range =document.caretRangeFromPoint(event.clientX, event.clientY);

Missing a space after the equal sign here.
Comment 5 Xiaomei Ji 2011-03-07 13:23:39 PST
Committed r80492: <http://trac.webkit.org/changeset/80492>