Firefox3.1/PrivateBrowsing/TestPlan

This is the test plan for the Private Browsing functionality, which is being implemented in 248970...

Make sure to check out the spec as well.

The items which currently do have tests written in 248970 have been marked with a star next to their titles.

Testing areas

Cookies

Unit Tests *

  • Create a cookie (Cookie-A) for a dummy site with specific details.
  • Check that the cookie is retrievable via normal means.
  • Enter private browsing mode
  • Check that Cookie-A is not retrievable via any of the APIs.
  • Check that there are no cookies accessible.
  • Set a new cookie (Cookie-B)
  • Check that Cookie-B is accessible.
  • Exit Private Browsing mode
  • Check that Cookie-B is gone
  • Check that Cookie-A still exists

History

Unit Tests

  • start with an empty history DB
  • create a handful of history items with various visit types
  • create a bookmark (Bookmark-A)
  • verify that IsVisited and other queries succesfully retrieve the history items
  • verify that the bookmark data is retrievable
  • enter private browsing mode
  • repeat the history verification step again via IsVisited only, should always return false.
  • try to get history data for the bookmark (Bookmark-A), should fail
  • Add another series of history items.
  • Check for the second set of history URLs, none should be stored or retrievable.
  • Check that Bookmark-A is accessible.
  • Add another bookmark (Bookmark-B)
  • Exit private browsing mode
  • Check that both bookmarks are still accessible.
  • Check that isVisited now works correctly for the original set of history items

Cache

Site Permissions

Unit Tests

No new unit tests for the component are required because we will not be making changes to the behaviour of the component.

Content prefs

Unit Tests *

  • Save a zoom setting for a sample site (Zoom-A)
  • Ensure that Zoom-A can be retrieved
  • Enter private browsing mode
  • Ensure that Zoom-A can be retrieved
  • Attempt to save a zoom setting for a different site (Zoom-B)
  • Ensure that Zoom-B can not be retrieved
  • Update the zoom setting for the site used for Zoom-A with a different value
  • Ensure that the new value of Zoom-A is returned
  • Exit private browsing mode
  • Ensure that the new value of Zoom-A is still persisted

Passwords

Unit Tests *

  • Save a login for a test page
  • Load test page, ensure that form is filled in
  • Enter private browsing mode
  • Load test page again, ensure that form is not filled in, but that autocomplete is enabled.
  • Exit private browsing mode
  • Load test page again, ensure that form is filled in.

Browser UI Tests *

  • Submit a form with a password. Verify that prompt appears to ask to save password.
  • Enter private
  • Submit a form with a password, Verify no prompt appears.
  • Exit private browsing
  • Submit a form with a password. Verify that prompt appears to ask to save password.
  • Submit a form which can change a password. Verify that prompt appears to ask to change the password.
  • Enter private
  • Submit a form which can change a password, Verify no prompt appears.
  • Exit private browsing
  • Submit a form which can change a password. Verify that prompt appears to ask to change the password.

Autocomplete

DOM Storage

Authenticated sessions

Unit Tests *

  • Log into a site via http auth.
  • Enter private browsing mode
  • Verify that site is no longer authenticated

Downloads

Session store

Unit Tests

  • On entry, record the timestamp of the session restore file.
  • On exit, before reopening the session, ensure that all current session data is gone. Also verify that the timestamp is unchanged.

Browser Tests

  • Ensure that the session before and after private browsing is restored correctly (normal session restore constraints apply)