Go to the source code of this file.
Functions | |
function | WindowHelper (aWin) |
function | addDownloadWithMinutesAgo (aMinutesAgo) |
function | addFormEntryWithMinutesAgo (aMinutesAgo) |
function | addHistoryWithMinutesAgo (aMinutesAgo) |
function | blankSlate () |
function | downloadExists (aID) |
function | doNextTest () |
function | ensureDownloadsClearedState (aDownloadIDs, aShouldBeCleared) |
function | ensureFormEntriesClearedState (aFormEntries, aShouldBeCleared) |
function | ensureHistoryClearedState (aURIs, aShouldBeCleared) |
function | openWindow (aOnloadCallback) |
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 446 of file browser_sanitizeDialog_treeView.js.
function addFormEntryWithMinutesAgo | ( | aMinutesAgo | ) |
Adds a form entry to history.
aMinutesAgo | The entry will be added this many minutes ago |
Definition at line 488 of file browser_sanitizeDialog_treeView.js.
function addHistoryWithMinutesAgo | ( | aMinutesAgo | ) |
Adds a history visit to history.
aMinutesAgo | The visit will be visited this many minutes ago |
Definition at line 509 of file browser_sanitizeDialog_treeView.js.
function blankSlate | ( | ) |
Removes all history visits, downloads, and form entries.
Definition at line 523 of file browser_sanitizeDialog_treeView.js.
function doNextTest | ( | ) |
Runs the next test in the gAllTests array. If all tests have been run, finishes the entire suite.
Definition at line 554 of file browser_sanitizeDialog_treeView.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 536 of file browser_sanitizeDialog_treeView.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 574 of file browser_sanitizeDialog_treeView.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 590 of file browser_sanitizeDialog_treeView.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 606 of file browser_sanitizeDialog_treeView.js.
function openWindow | ( | aOnloadCallback | ) |
Opens the sanitize dialog and runs a callback once it's finished loading.
aOnloadCallback | A function that will be called once the dialog has loaded |
Definition at line 620 of file browser_sanitizeDialog_treeView.js.
function test | ( | ) |
Definition at line 655 of file browser_sanitizeDialog_treeView.js.
function WindowHelper | ( | aWin | ) |
This wraps the dialog and provides some convenience methods for interacting with it.
A warning: Before you call any function that uses the tree (or any function that calls a function that uses the tree), you must set a non-everything duration by calling selectDuration(). The dialog does not initialize the tree if it does not yet need to be shown.
aWin | The dialog's nsIDOMWindow |
Definition at line 264 of file browser_sanitizeDialog_treeView.js.
const bhist |
Definition at line 64 of file browser_sanitizeDialog_treeView.js.
const dm |
Definition at line 62 of file browser_sanitizeDialog_treeView.js.
const formhist |
Definition at line 66 of file browser_sanitizeDialog_treeView.js.
var gAllTests |
Definition at line 70 of file browser_sanitizeDialog_treeView.js.
var gCurrTest = 0 |
Definition at line 246 of file browser_sanitizeDialog_treeView.js.
var gDownloadId = 5555551 |
Definition at line 242 of file browser_sanitizeDialog_treeView.js.
var now_uSec = Date.now() * 1000 |
Definition at line 248 of file browser_sanitizeDialog_treeView.js.
WindowHelper prototype |
Definition at line 268 of file browser_sanitizeDialog_treeView.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 60 of file browser_sanitizeDialog_treeView.js.