[webkit-reviews] review granted: [Bug 96402] [Chromium] Fix cases where find-in-page doesn't send a final update : [Attachment 163653] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 12 12:32:48 PDT 2012
Adam Barth <abarth at webkit.org> has granted Leandro Graciá Gil
<leandrogracia at chromium.org>'s request for review:
Bug 96402: [Chromium] Fix cases where find-in-page doesn't send a final update
https://bugs.webkit.org/show_bug.cgi?id=96402
Attachment 163653: Patch
https://bugs.webkit.org/attachment.cgi?id=163653&action=review
------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=163653&action=review
>>> Source/WebKit/chromium/ChangeLog:8
>>> + when calling the stopFinding method.
>>
>> Can we add tests for these issues? Perhaps in webkit_unit_tests?
>
> I found this problem when using find-in-page with 0x0 views in test code.
However, since there's no reason this shouldn't work regardless of the size,
I'm removing the hasVisibleContent check. Consequently, if I write a test it
won't hit that condition any more.
>
> Still, if for some reason we have no frame or no view we still want to ensure
a reply back. Do you know how I could hit these conditions in a test?
Those cases occur with detached frames. I'm not sure how we can make a
detached frame in a unit test... We have trouble testing these cases because
we tend to only keep detached frames alive for a given call stack. In
LayoutTests, we typically do it by running inline script in a child frame that
removes its frame from its parent using a DOM API like removeChild. To get
that working in a unit test, you'd need to them call a function that let you
execute unit testing code synchronously.
I think its ok to land this patch without a test. It's going to be a pretty
fragile case to write a test for.
More information about the webkit-reviews
mailing list