You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



Regression Testing Find In Page (Browser)


Written by Akkana Peck


Basic Text Find

Test pattern:

Eerier Aardvarks   three spaces   Three spaces.

Instructions

  1. Load this page, and without clicking in the content area (i.e. don't make a selection), bring up the Find dialog.  Type "ar" and click Find.  Expected: first "ar" in "Aardvarks". (If it matches something in the sidebar, that's okay, click Find until it gets to Aardvarks.)
  2. Hit return.  Expected: second "ar" in "Aardvarks".
  3. Add two more r's (i.e. a r r r without the spaces).  Expected: Not found.
  4. Search for "s t" (type a single space between s and t).  Expected: the end of "aardvarks", the spaces, and the first character of the first "three".
  5. Add two more spaces (i.e. type s<space><space><space> t in the search field).  Search again.  Expected: from end of first "spaces" through "T".
  6. Find again.  Expected: Not found.
  7. Check Wrap around.  Find again.  Expected: end of "Aardvarks" to beginning of "three".
  8. Find again. Expected: from end of first "spaces" through "T".
  9. Check Match upper/lower case and find again.  Expected: end of "Aardvarks" to beginning of "three".
  10. Uncheck Wrap around and find again.  Expected: Not found.
  11. Add one more space (i.e. s<space><space> <space> <space>t).  Uncheck Match upper/lower. Search again.  Should return: Not found.
  12. Type "ee".  Check Search backwards, and find again.  Expected: Ee of Eerier.
  13. Highlight the last word in the sentence (second "spaces").  Find again.  Expected: ee of Three.
  14. Check match upper/lower case.  Find again.  Expected: "ee" of first "three".
  15. Find again.  Expected: Not found.
  16. Uncheck Search backwards and Match upper/lower.

Skipped nodes

Test pattern:

Here is a paragraph.

( Read More... |

(A nifty link)

Instructions

There are html comments, script tags, and noframes elements in the line above. This will test whether the find code skips the comments without skipping anything else.
  1. Select the phrase "test pattern" above.
  2. Search foreward repeatedly for: nifty
    Expected: should find only visible content, specifically the link text and the visible text generated by Javascript. If the selection disappears, that's an error and means that it found invisible content.
  3. Check Search backwards and repeat the test.

Partial matches:

Test pattern:

AAabc<a>
abcdefgabcdefgh

Instructions

  1. Select the phrase "Test pattern" above.
  2. Search forward for: abc
    Expected: should find the abc after AA, not jump to the one in the next line.
  3. Search forward for: abcdefgh (make sure you include the final 'h').
    Expected: Should find the second block in the test pattern.
  4. Find again. Expected: pattern string in the list item above this one.
  5. Enable Search backwards. Find again. Expected: second block in test pattern.
  6. Find again. Expected: Not found.
  7. Uncheck Search Backwards.

Spanning table cells

Test pattern:
P3P
P3P
P3P
P3P

Instructions

  1. Make a selection somewhere before the table.
  2. Search forward for "P3P". Expected: find the one in this line, not any of the text in the table.
  3. Click Search Backward.
  4. Click Find. Expected: Not Found.

Find in a More Complicated Page

Test pattern (select me now):

moz
zilla
moz zilla

moz

illa

mo
zi ll
a
mo zi
ll a
mozilla mozilla mozilla
mozilla mozilla mozilla mozilla
mozilla.

Instructions

  1. Highlight "select me now".
  2. Search repeatedly for "mozilla" (all checkboxes off). Expected: It should find the three "mozillas" after the small tables, and the four on the lines with the form elements, and the one at the end, but nothing else.
  3. Check Search backwards and find repeatedly. Expected: same ("not found" after last find).
  4. Uncheck Search backwards.

Editor Find/Replace

Leave the Find dialog up.  Click on this link and do the tests there:
http://www.mozilla.org/quality/browser/front-end/testcases/composer/composer-find-replace.html

Where's Mozilla?

Instructions

Highlight something in this line, then search repeatedly for "mozilla" and make sure the selections all look reasonable (it should not find the "mozilla" string inside form elements).  When you hit the end and get "Not found", enable Find backwards and search backward to this point, again making sure all selections seem reasonable.

mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla

moz
zilla
moz
zilla
moz zilla

moz

illa

moz

illa

moz

illa

m

o

z

i

l

l

a

mo
zi ll
a
mo zi
ll a

mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla mozilla
mozilla mozilla mozilla
mozilla mozilla mozilla