Bug 1210459: Add originAttributes for tests that implement nsILoadContext. r=bholley

This commit is contained in:
Yoshi Huang 2015-09-30 18:14:12 -07:00
Родитель 3204290bef
Коммит 836f7732eb
6 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -151,6 +151,10 @@ this.AppsUtils = {
topWindow : null,
appId: aAppId,
isInBrowserElement: aIsBrowser,
originAttributes: {
appId: aAppId,
inBrowser: aIsBrowser
},
usePrivateBrowsing: false,
isContent: false,

Просмотреть файл

@ -3468,6 +3468,10 @@ this.DOMApplicationRegistry = {
// nsILoadContext
appId: aOldApp.installerAppId,
isInBrowserElement: aOldApp.installerIsBrowser,
originAttributes: {
appId: aOldApp.installerAppId,
inBrowser: aOldApp.installerIsBrowser
},
usePrivateBrowsing: false,
isContent: false,
associatedWindow: null,

Просмотреть файл

@ -171,6 +171,10 @@ function LoadContextCallback(appId, inBrowserElement, isPrivate, isContent) {
this.isInBrowserElement = inBrowserElement;
this.usePrivateBrowsing = isPrivate;
this.isContent = isContent;
this.originAttributes = {
appId: appId,
inBrowser: inBrowserElement
};
}
LoadContextCallback.prototype = {

Просмотреть файл

@ -19,6 +19,7 @@ function LoadContext(usePrivateBrowsing) {
this.usePrivateBrowsing = usePrivateBrowsing;
}
LoadContext.prototype = {
originAttributes: {},
QueryInterface: XPCOMUtils.generateQI([Ci.nsILoadContext, Ci.nsIInterfaceRequestor]),
getInterface: XPCOMUtils.generateQI([Ci.nsILoadContext])
};

Просмотреть файл

@ -20,6 +20,7 @@ function LoadContext(usePrivateBrowsing) {
}
LoadContext.prototype = {
originAttributes: {},
usePrivateBrowsing: false,
// don't bother defining rest of nsILoadContext fields: don't need 'em

Просмотреть файл

@ -97,7 +97,8 @@ this.DownloadLastDir = function DownloadLastDir(aWindow) {
// load context isn't of interest to the content pref service.
this.fakeContext = {
QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsILoadContext]),
usePrivateBrowsing: loadContext.usePrivateBrowsing
usePrivateBrowsing: loadContext.usePrivateBrowsing,
originAttributes: {},
};
}