Make window.find not default the search string to undefined, instead use the null string. Before this change window.find() would find a hit in a page containing the text string "undefined".
Created attachment 407069 [details] Patch
Created attachment 407070 [details] Patch
Comment on attachment 407070 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=407070&action=review > LayoutTests/ChangeLog:10 > + Add tests to verify window.find() does not use "undefined" > + as text string. This also fixes the logic of the test to > + not always output PASS at the end. Downside to these changes is that now it will only report a single failure. The ideal version would report all the failures to help the person who broke things get an overview of what’s wrong.
Created attachment 407092 [details] Patch
Created attachment 407093 [details] Patch
Comment on attachment 407070 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=407070&action=review >> LayoutTests/ChangeLog:10 >> + not always output PASS at the end. > > Downside to these changes is that now it will only report a single failure. The ideal version would report all the failures to help the person who broke things get an overview of what’s wrong. You are right, my new version only reports the "success" message if there was no fail call at all.
Committed r266054: <https://trac.webkit.org/changeset/266054> All reviewed patches have been landed. Closing bug and clearing flags on attachment 407093 [details].
<rdar://problem/67674892>