head_urlformatter.js File Reference

Go to the source code of this file.


function EM_NS (property)
function CHROME_NS (property)
function EM_R (property)
function EM_L (literal)
function EM_I (integer)
function EM_D (integer)
function stringData (literalOrResource)
function intData (literal)
function getResourceForID (id)
function getManifestProperty (id, property)
function do_get_addon (name)
function createAppInfo (id, name, version, platformVersion)
function startupEM ()
function shutdownEM ()
function restartEM ()
gTestRoot append ("_tests")
 if (gProfD.exists()) gProfD.remove(true)
gProfD create (Components.interfaces.nsIFile.DIRECTORY_TYPE, 0755)
gDirSvc QueryInterface (Components.interfaces.nsIDirectoryService).registerProvider(dirProvider)
gPrefs setBoolPref ("extensions.logging.enabled", true)


const PREFIX_NS_EM_RDF = "http://www.mozilla.org/2004/em-rdf#"
const PREFIX_NS_CHROME = "http://www.mozilla.org/rdf/chrome#"
const PREFIX_ITEM_URI = "urn:mozilla:item:"
const NS_APP_USER_PROFILE_50_DIR = "ProfD"
const NS_OS_TEMP_DIR = "TmpD"
const XULAPPINFO_CONTRACTID = "@mozilla.org/xre/app-info;1"
const XULAPPINFO_CID = Components.ID("{c763b610-9d49-455a-bbd2-ede71682a1ac}")
const XULRUNTIME_CONTRACTID = "@mozilla.org/xre/runtime;1"
const XULRUNTIME_CID = Components.ID("{b96e56dc-1dd1-11b2-91a1-96a45c3e4adf}")
var gEM = null
var gRDF
var gDirSvc
var gTestRoot = gDirSvc.get("CurProcD", Components.interfaces.nsILocalFile)
var gProfD = gTestRoot.clone()
var dirProvider
var gPrefs

Function Documentation

gProfD append ( "_tests"  )

Here is the caller graph for this function:

function CHROME_NS (   property)

Definition at line 71 of file head_urlformatter.js.

gProfD create ( Components.interfaces.nsIFile.  DIRECTORY_TYPE,
function createAppInfo (   id,

Creates an nsIXULAppInfo

idThe ID of the test application
nameA name for the test application
versionThe version of the application
platformVersionThe gecko version of the application

Definition at line 171 of file head_urlformatter.js.

Here is the call graph for this function:

function do_get_addon (   name)

Returns a testcase xpi

nameThe name of the testcase (without extension)
an nsILocalFile pointing to the testcase xpi

Definition at line 148 of file head_urlformatter.js.

function EM_D (   integer)

Definition at line 87 of file head_urlformatter.js.

function EM_I (   integer)

Definition at line 83 of file head_urlformatter.js.

function EM_L (   literal)

Definition at line 79 of file head_urlformatter.js.

function EM_NS (   property)

Utility functions

Definition at line 67 of file head_urlformatter.js.

Here is the caller graph for this function:

function EM_R (   property)

Definition at line 75 of file head_urlformatter.js.

Here is the call graph for this function:

Here is the caller graph for this function:

function getManifestProperty (   id,

Extract a string property for an add-on

idID of the add-on to retrieve a property for
propertyThe localname of the property
String value of the property or undefined if the property does not exist

Definition at line 138 of file head_urlformatter.js.

Here is the call graph for this function:

function getResourceForID (   id)

Gets a RDF Resource for item with the given ID

idThe GUID of the item to construct a RDF resource to the active item for
The RDF Resource to the Active item.

Definition at line 125 of file head_urlformatter.js.

Here is the caller graph for this function:

if ( gProfD.  exists())
function intData (   literal)

Extract the integer value of a RDF Literal

literalnsIRDFInt literal
integer value of the literal

Definition at line 112 of file head_urlformatter.js.

gDirSvc QueryInterface ( Components.interfaces.  nsIDirectoryService)

Here is the caller graph for this function:

function restartEM ( )

Many operations require restarts to take effect. This function should perform all that is necessary for this to happen.

Definition at line 257 of file head_urlformatter.js.

gPrefs setBoolPref ( "extensions.logging.enabled"  ,
function shutdownEM ( )

Simple function to simulate the termination of an app to the EM. This harness does not support creating a new EM after calling this.

Definition at line 246 of file head_urlformatter.js.

function startupEM ( )

This simulates an application startup. Since we will be starting from an empty profile we follow that path.

Definition at line 214 of file head_urlformatter.js.

function stringData (   literalOrResource)

Extract the string value from a RDF Literal or Resource

literalOrResourceRDF String Literal or Resource
String value of the literal or resource, or undefined if the object supplied is not a RDF string literal or resource.

Definition at line 98 of file head_urlformatter.js.

Here is the caller graph for this function:

Variable Documentation

var dirProvider
Initial value:
= {
getFile: function(prop, persistent) {
persistent.value = true;
return gProfD.clone();
return null;
QueryInterface: function(iid) {
if (iid.equals(Components.interfaces.nsIDirectoryServiceProvider) ||
iid.equals(Components.interfaces.nsISupports)) {
return this;
throw Components.results.NS_ERROR_NO_INTERFACE;
gDirSvc QueryInterface(Components.interfaces.nsIDirectoryService).registerProvider(dirProvider)
function getFile(fileName)
return null
Definition: FeedWriter.js:1143
var gProfD

Definition at line 298 of file head_urlformatter.js.

var gDirSvc
Initial value:
= Components.classes["@mozilla.org/file/directory_service;1"]

Definition at line 283 of file head_urlformatter.js.

var gEM = null

Definition at line 60 of file head_urlformatter.js.

var gPrefs
Initial value:
= Components.classes["@mozilla.org/preferences;1"]

Definition at line 317 of file head_urlformatter.js.

var gProfD = gTestRoot.clone()

Definition at line 292 of file head_urlformatter.js.

var gRDF
Initial value:
= Components.classes["@mozilla.org/rdf/rdf-service;1"]

Definition at line 61 of file head_urlformatter.js.

gTestRoot = gDirSvc.get("CurProcD", Components.interfaces.nsILocalFile)

Definition at line 285 of file head_urlformatter.js.


Definition at line 49 of file head_urlformatter.js.

const NS_APP_USER_PROFILE_50_DIR = "ProfD"

Definition at line 48 of file head_urlformatter.js.


Definition at line 52 of file head_urlformatter.js.

const NS_OS_TEMP_DIR = "TmpD"

Definition at line 50 of file head_urlformatter.js.

const PREFIX_ITEM_URI = "urn:mozilla:item:"

Definition at line 46 of file head_urlformatter.js.

const PREFIX_NS_CHROME = "http://www.mozilla.org/rdf/chrome#"

Definition at line 45 of file head_urlformatter.js.

const PREFIX_NS_EM_RDF = "http://www.mozilla.org/2004/em-rdf#"

Definition at line 44 of file head_urlformatter.js.

const XULAPPINFO_CID = Components.ID("{c763b610-9d49-455a-bbd2-ede71682a1ac}")

Definition at line 55 of file head_urlformatter.js.

const XULAPPINFO_CONTRACTID = "@mozilla.org/xre/app-info;1"

Definition at line 54 of file head_urlformatter.js.

const XULRUNTIME_CID = Components.ID("{b96e56dc-1dd1-11b2-91a1-96a45c3e4adf}")

Definition at line 58 of file head_urlformatter.js.

const XULRUNTIME_CONTRACTID = "@mozilla.org/xre/runtime;1"

Definition at line 57 of file head_urlformatter.js.