do_test_removeDataFromDomain.js File Reference

Go to the source code of this file.

Functions

function uri (aURIString)
 
function add_visit (aURI)
 
function check_visited (aURI, aIsVisited)
 
function add_cookie (aDomain)
 
function check_cookie_exists (aDomain, aExists)
 
function add_download (aURIString, aIsActive)
 
function check_downloaded (aURIString, aIsDownloaded)
 
function add_disabled_host (aHost)
 
function check_disabled_host (aHost, aIsDisabled)
 
function add_login (aHost)
 
function check_login_exists (aHost, aExists)
 
function add_permission (aURI)
 
function check_permission_exists (aURI, aExists)
 
function add_preference (aURI)
 
function check_preference_exists (aURI, aExists)
 
function test_history_cleared_with_direct_match ()
 
function test_history_cleared_with_subdomain ()
 
function test_history_not_cleared_with_uri_contains_domain ()
 
function test_cookie_cleared_with_direct_match ()
 
function test_cookie_cleared_with_subdomain ()
 
function test_cookie_not_cleared_with_uri_contains_domain ()
 
function test_download_history_cleared_with_direct_match ()
 
function test_download_history_cleared_with_subdomain ()
 
function test_download_history_not_cleared_with_active_direct_match ()
 
function test_login_manager_disabled_hosts_cleared_with_direct_match ()
 
function test_login_manager_disabled_hosts_cleared_with_subdomain ()
 
function test_login_manager_disabled_hosts_not_cleared_with_uri_contains_domain ()
 
function test_login_manager_logins_cleared_with_direct_match ()
 
function test_login_manager_logins_cleared_with_subdomain ()
 
function tets_login_manager_logins_not_cleared_with_uri_contains_domain ()
 
function test_permission_manager_cleared_with_direct_match ()
 
function test_permission_manager_cleared_with_subdomain ()
 
function test_permission_manager_not_cleared_with_uri_contains_domain ()
 
function test_content_preferences_cleared_with_direct_match ()
 
function test_content_preferences_cleared_with_subdomain ()
 
function test_content_preferecnes_not_cleared_with_uri_contains_domain ()
 
function test_cache_cleared ()
 
function do_test ()
 

Variables

let pb
 
const COOKIE_EXPIRY = Math.round(Date.now() / 1000) + 60
 
const COOKIE_NAME = "testcookie"
 
const COOKIE_PATH = "/"
 
const LOGIN_USERNAME = "username"
 
const LOGIN_PASSWORD = "password"
 
const LOGIN_USERNAME_FIELD = "username_field"
 
const LOGIN_PASSWORD_FIELD = "password_field"
 
const PERMISSION_TYPE = "test-perm"
 
const PERMISSION_VALUE = Ci.nsIPermissionManager.ALLOW_ACTION
 
const PREFERENCE_NAME = "test-pref"
 
let tests
 

Function Documentation

function add_cookie (   aDomain)

Add a cookie to the cookie service.

Parameters
aDomain

Definition at line 118 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function add_disabled_host (   aHost)

Adds a disabled host to the login manager.

Parameters
aHostThe host to add to the list of disabled hosts.

Definition at line 213 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function add_download (   aURIString,
  aIsActive 
)

Adds a download to download history.

Parameters
aURIStringThe string of the URI to add.
aIsActiveIf it should be set to an active state in the database. This does not make it show up in the list of active downloads however!

Definition at line 156 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function add_login (   aHost)

Adds a login for the specified host to the login manager.

Parameters
aHostThe host to add the login for.

Definition at line 244 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function add_permission (   aURI)

Adds a permission for the specified URI to the permission manager.

Parameters
aURIThe URI to add the test permission for.

Definition at line 280 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function add_preference (   aURI)

Adds a content preference for the specified URI.

Parameters
aURIThe URI to add a preference for.

Definition at line 312 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function add_visit (   aURI)

Adds a visit to history.

Parameters
aURIThe URI to add.

Definition at line 88 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function check_cookie_exists (   aDomain,
  aExists 
)

Checks to ensure that a cookie exists or not for a domain.

Parameters
aDomainThe domain to check for the cookie.
aExistsTrue if the cookie should exist, false otherwise.

Definition at line 135 of file do_test_removeDataFromDomain.js.

Here is the caller graph for this function:

function check_disabled_host (   aHost,
  aIsDisabled 
)

Checks to see if a host is disabled for storing logins or not.

Parameters
aHostThe host to check if it is disabled.
aIsDisabledTrue if the host should be disabled, false otherwise.

Definition at line 230 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function check_downloaded (   aURIString,
  aIsDownloaded 
)

Checks to ensure a URI string is in download history or not.

Parameters
aURIStringThe string of the URI to check.
aIsDownloadedTrue if the URI should be downloaded, false otherwise.

Definition at line 186 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function check_login_exists (   aHost,
  aExists 
)

Checks to see if a login exists for a host.

Parameters
aHostThe host to check for the test login.
aExistsTrue if the login should exist, false otherwise.

Definition at line 265 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function check_permission_exists (   aURI,
  aExists 
)

Checks to see if a permission exists for the given URI.

Parameters
aURIThe URI to check if a permission exists.
aExistsTrue if the permission should exist, false otherwise.

Definition at line 297 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function check_preference_exists (   aURI,
  aExists 
)

Checks to see if a preference exists for the given URI.

Parameters
aURIThe URI to check if a preference exists.
aExistsTrue if the permission should exist, false otherwise.

Definition at line 329 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function check_visited (   aURI,
  aIsVisited 
)

Checks to ensure a URI string is visited or not.

Parameters
aURIThe URI to check.
aIsVisitedTrue if the URI should be visited, false otherwise.

Definition at line 105 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function do_test ( )

Definition at line 615 of file do_test_removeDataFromDomain.js.

function test_cache_cleared ( )

Definition at line 551 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_content_preferecnes_not_cleared_with_uri_contains_domain ( )

Definition at line 536 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_content_preferences_cleared_with_direct_match ( )

Definition at line 520 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_content_preferences_cleared_with_subdomain ( )

Definition at line 528 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_cookie_cleared_with_direct_match ( )

Definition at line 371 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_cookie_cleared_with_subdomain ( )

Definition at line 379 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_cookie_not_cleared_with_uri_contains_domain ( )

Definition at line 387 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_download_history_cleared_with_direct_match ( )

Definition at line 396 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_download_history_cleared_with_subdomain ( )

Definition at line 404 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_download_history_not_cleared_with_active_direct_match ( )

Definition at line 412 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_history_cleared_with_direct_match ( )

Definition at line 341 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_history_cleared_with_subdomain ( )

Definition at line 349 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_history_not_cleared_with_uri_contains_domain ( )

Definition at line 357 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_login_manager_disabled_hosts_cleared_with_direct_match ( )

Definition at line 429 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_login_manager_disabled_hosts_cleared_with_subdomain ( )

Definition at line 437 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_login_manager_disabled_hosts_not_cleared_with_uri_contains_domain ( )

Definition at line 445 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_login_manager_logins_cleared_with_direct_match ( )

Definition at line 459 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_login_manager_logins_cleared_with_subdomain ( )

Definition at line 467 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_permission_manager_cleared_with_direct_match ( )

Definition at line 489 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_permission_manager_cleared_with_subdomain ( )

Definition at line 497 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function test_permission_manager_not_cleared_with_uri_contains_domain ( )

Definition at line 505 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function tets_login_manager_logins_not_cleared_with_uri_contains_domain ( )

Definition at line 475 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

function uri (   aURIString)

Creates an nsIURI object for the given string representation of a URI.

Parameters
aURIStringThe spec of the URI to create.
Returns
an nsIURI representing aURIString.

Definition at line 75 of file do_test_removeDataFromDomain.js.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const COOKIE_EXPIRY = Math.round(Date.now() / 1000) + 60

Definition at line 51 of file do_test_removeDataFromDomain.js.

const COOKIE_NAME = "testcookie"

Definition at line 52 of file do_test_removeDataFromDomain.js.

const COOKIE_PATH = "/"

Definition at line 53 of file do_test_removeDataFromDomain.js.

const LOGIN_PASSWORD = "password"

Definition at line 56 of file do_test_removeDataFromDomain.js.

const LOGIN_PASSWORD_FIELD = "password_field"

Definition at line 58 of file do_test_removeDataFromDomain.js.

const LOGIN_USERNAME = "username"

Definition at line 55 of file do_test_removeDataFromDomain.js.

const LOGIN_USERNAME_FIELD = "username_field"

Definition at line 57 of file do_test_removeDataFromDomain.js.

let pb
Initial value:
getService(Ci.nsIPrivateBrowsingService)
const Cc
getService(Ci.sbIFaceplateManager)
const Ci
var PRIVATEBROWSING_CONTRACT_ID

Test added with bug 460086 to test the behavior of the new API that was added to remove all traces of visiting a site.

Definition at line 48 of file do_test_removeDataFromDomain.js.

const PERMISSION_TYPE = "test-perm"

Definition at line 60 of file do_test_removeDataFromDomain.js.

const PERMISSION_VALUE = Ci.nsIPermissionManager.ALLOW_ACTION

Definition at line 61 of file do_test_removeDataFromDomain.js.

const PREFERENCE_NAME = "test-pref"

Definition at line 63 of file do_test_removeDataFromDomain.js.

let tests

Definition at line 576 of file do_test_removeDataFromDomain.js.