Go to the source code of this file.
Functions | |
function | WindowHelper (aWin) |
function | addDownloadWithMinutesAgo (aMinutesAgo) |
function | addFormEntryWithMinutesAgo (aMinutesAgo) |
function | addHistoryWithMinutesAgo (aMinutesAgo) |
function | blankSlate () |
function | boolPrefIs (aPrefName, aExpectedVal, aMsg) |
function | downloadExists (aID) |
function | doNextTest () |
function | ensureDownloadsClearedState (aDownloadIDs, aShouldBeCleared) |
function | ensureFormEntriesClearedState (aFormEntries, aShouldBeCleared) |
function | ensureHistoryClearedState (aURIs, aShouldBeCleared) |
function | intPrefIs (aPrefName, aExpectedVal, aMsg) |
function | test () |
Variables | |
Cc["@mozilla.org/moz/jssubscript-loader;1"] getService(Components.interfaces.mozIJSSubScriptLoader).loadSubScript("chrome const | winWatch |
const | dm |
const | bhist |
const | formhist |
var | gAllTests |
var | gDownloadId = 5555551 |
var | gCurrTest = 0 |
var | now_uSec = Date.now() * 1000 |
WindowHelper | prototype |
function addDownloadWithMinutesAgo | ( | aMinutesAgo | ) |
Adds a download to history.
aMinutesAgo | The download will be downloaded this many minutes ago |
Definition at line 642 of file browser_sanitizeDialog.js.
function addFormEntryWithMinutesAgo | ( | aMinutesAgo | ) |
Adds a form entry to history.
aMinutesAgo | The entry will be added this many minutes ago |
Definition at line 684 of file browser_sanitizeDialog.js.
function addHistoryWithMinutesAgo | ( | aMinutesAgo | ) |
Adds a history visit to history.
aMinutesAgo | The visit will be visited this many minutes ago |
Definition at line 705 of file browser_sanitizeDialog.js.
function blankSlate | ( | ) |
Removes all history visits, downloads, and form entries.
Definition at line 719 of file browser_sanitizeDialog.js.
function boolPrefIs | ( | aPrefName, | |
aExpectedVal, | |||
aMsg | |||
) |
Ensures that the given pref is the expected value.
aPrefName | The pref's sub-branch under the privacy branch |
aExpectedVal | The pref's expected value |
aMsg | Passed to is() |
Definition at line 735 of file browser_sanitizeDialog.js.
function doNextTest | ( | ) |
Runs the next test in the gAllTests array. If all tests have been run, finishes the entire suite.
Definition at line 764 of file browser_sanitizeDialog.js.
function downloadExists | ( | aID | ) |
Checks to see if the download with the specified ID exists.
aID | The ID of the download to check |
Definition at line 746 of file browser_sanitizeDialog.js.
function ensureDownloadsClearedState | ( | aDownloadIDs, | |
aShouldBeCleared | |||
) |
Ensures that the specified downloads are either cleared or not.
aDownloadIDs | Array of download database IDs |
aShouldBeCleared | True if each download should be cleared, false otherwise |
Definition at line 784 of file browser_sanitizeDialog.js.
function ensureFormEntriesClearedState | ( | aFormEntries, | |
aShouldBeCleared | |||
) |
Ensures that the specified form entries are either cleared or not.
aFormEntries | Array of form entry names |
aShouldBeCleared | True if each form entry should be cleared, false otherwise |
Definition at line 800 of file browser_sanitizeDialog.js.
function ensureHistoryClearedState | ( | aURIs, | |
aShouldBeCleared | |||
) |
Ensures that the specified URIs are either cleared or not.
aURIs | Array of page URIs |
aShouldBeCleared | True if each visit to the URI should be cleared, false otherwise |
Definition at line 816 of file browser_sanitizeDialog.js.
function intPrefIs | ( | aPrefName, | |
aExpectedVal, | |||
aMsg | |||
) |
Ensures that the given pref is the expected value.
aPrefName | The pref's sub-branch under the privacy branch |
aExpectedVal | The pref's expected value |
aMsg | Passed to is() |
Definition at line 834 of file browser_sanitizeDialog.js.
function test | ( | ) |
function WindowHelper | ( | aWin | ) |
This wraps the dialog and provides some convenience methods for interacting with it.
aWin | The dialog's nsIDOMWindow |
Definition at line 414 of file browser_sanitizeDialog.js.
const bhist |
Definition at line 65 of file browser_sanitizeDialog.js.
const dm |
Definition at line 63 of file browser_sanitizeDialog.js.
const formhist |
Definition at line 67 of file browser_sanitizeDialog.js.
var gAllTests |
Definition at line 71 of file browser_sanitizeDialog.js.
var gCurrTest = 0 |
Definition at line 401 of file browser_sanitizeDialog.js.
var gDownloadId = 5555551 |
Definition at line 397 of file browser_sanitizeDialog.js.
var now_uSec = Date.now() * 1000 |
Definition at line 403 of file browser_sanitizeDialog.js.
WindowHelper prototype |
Definition at line 418 of file browser_sanitizeDialog.js.
Cc ["@mozilla.org/moz/jssubscript-loader;1"] getService (Components.interfaces.mozIJSSubScriptLoader). loadSubScript("chrome const winWatch |
Tests the sanitize dialog (a.k.a. the clear recent history dialog). See bug 480169.
The purpose of this test is not to fully flex the sanitize timespan code; browser/base/content/test/browser_sanitize-timespans.js does that. This test checks the UI of the dialog and makes sure it's correctly connected to the sanitize timespan code.
Some of this code, especially the history creation parts, was taken from browser/base/content/test/browser_sanitize-timespans.js.
Definition at line 61 of file browser_sanitizeDialog.js.