Private Browsing & Session Store Unit Tests

Private Browsing aims to help you make sure that your web browsing activities don’t leave any trace on your own computer.  It is very important to note that Private Browsing is not a tool to keep you anonymous from websites or your ISP, or for example protect you from all kinds of spyware applications which use sophisticated techniques to intercept your online traffic.  Private Browsing is only about making sure that Firefox doesn’t store any data which can be used to trace your online activities, no more, no less.

In my second testing area, the act of not storing any data was meticulously reviewed.The second testing area, session store, is a second testing area I have focused on for my DPS909 project. The following is a visual representation of the testing that follows the testing plan I followed for the first unit test (A):

* The second unit may be found here, browser_248970_b.js alongside the sample test HTML file used may be found here

The following plan, follows the first unit test I wrote for session store, it is as follows (following the landed unit test: browser_248970_a.js)

  1. Open a tab (a)
  2. Remove the sessionstore.js file to guarantee that it is recreated when entering private browsing mode (session store)
  3. Enter private browsing mode
  4. Record the time stamp of the new sessionstore.js file – session store
  5. Add a new tab (b) and new tab (c)
  6. Close all three tabs (a, b, c)
  7. Record the time stamp of sesionstore.js – session store
  8. Exit private browsing mode
  9. Compare session store timestamps or pre and post browsing mode

Essentially,

  • On entry:
    • Save session, close all tabs, open a blank tab.
  • During:
    • Do not save any session data to disk, keep undo close tab data in memory.
  • On exit:
    • Clear all session data in memory, load saved session from disk.

The following plan, follows the second test I wrote for session store, it is as follows (following the landed unit test: browser_248970_b.js )

The plan makes sure that the session store remains functional during the private browsing mode. The “Browser Tests” part in the test plan is about ensuring this. I tested to ensure that that the private mode does not break functionality of the session store API. which is used elsewhere in the code (for example, that of duplicateTab method).

  1. Get the closed tab count of the current browser session
  2. Set up a state for Tab (A) and open new tab (A)
  3. Populate Tab (A) with form data
  4. Close Tab (A)
  5. Verify that the closed tab count has increased
  6. Verify that tab is in the undo list
  7. Enter private browsing mode
  8. Setup a state for Tab (B) and open new tab (B)
  9. Duplicate tab (B) to new Tab (C)
  10. Verify that it was duplicated properly
  11. Close tab (C) and (B)

Visual Representation of the first unit test

Step 1: I Open a new tab and removed my current sessionstore.js file in my profile.
At this point, I have made note of the current time stamp.

Step 2: I am presented with the *current* visual representation of entering Private Browsing Mode.

Step 3: Here I made some alternations to my Private Browsing session by opening two other tabs.
The time stamp must not change or be written to on disk.

Step 4: Exiting private browsing mode

Step 5: Back to my regular browsing session

The time stamps should be exactly the same as no changes to disk have been made. Private Browsing mode works.

In the case of the visual representation.  I opened the sessionstore.js properties in windows and took notice of their timestamps. Believe me when I say that there were no changes written to disk:

Pre Private Browsing Mode November 8, 2008, 12:17:55 PM
Post Private Browsing Mode November 8, 2008, 12:17:55 PM

Hope this visual representation of my projects second testing area provides you with some insight and knowledge into the private browsing functionality that recently landed.

Cheers,

– AaronMT

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: