Skip to content

Commit

Permalink
Bug 1383299 - Fix test case error, r=jkt,mconley
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: JtSlnpaq5un
  • Loading branch information
evelynhung committed Aug 8, 2017
1 parent 7994392 commit 0e2cca0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion browser/components/originattributes/test/browser/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ let gFirstPartyBasicPage = TEST_URL_PATH + "file_firstPartyBasic.html";
* browser - The browser object of this tab.
*/
async function openTabInUserContext(aURL, aUserContextId) {
let originAttributes = {
userContextId: aUserContextId
};
let triggeringPrincipal = Services.scriptSecurityManager.createCodebasePrincipal(makeURI(aURL), originAttributes);
// Open the tab in the correct userContextId.
let tab = BrowserTestUtils.addTab(gBrowser, aURL, {userContextId: aUserContextId});
let tab = BrowserTestUtils.addTab(gBrowser, aURL, {userContextId: aUserContextId, triggeringPrincipal});

// Select tab and make sure its browser is focused.
gBrowser.selectedTab = tab;
Expand Down

0 comments on commit 0e2cca0

Please sign in to comment.