mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 15:27:32 +09:00
(from Waterfox Classic) Refactor addonId access in BasePrincipal and related files
This commit is contained in:
parent
ef314d225f
commit
203d58a5cd
6 changed files with 26 additions and 13 deletions
|
|
@ -93,7 +93,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1161831
|
|||
is(stripTrailingSlash(prin.URI.spec), url, 'Principal uri is correct: ' + url);
|
||||
function stripPath(s) { return s.replace(/(.*\/\/.+)\/.*/, '$1'); };
|
||||
is(prin.originNoSuffix, stripPath(url), 'Principal origin is correct: ' + prin.originNoSuffix);
|
||||
is(prin.originAttributes.addonId, 'imaginaryaddon-' + url[url.indexOf('/') + 2], 'addonId is correct');
|
||||
is(prin.addonId, 'imaginaryaddon-' + url[url.indexOf('/') + 2], 'addonId is correct');
|
||||
if (/_blank/.test(url)) {
|
||||
is(SpecialPowers.wrap(ifr.contentWindow).document.documentElement.innerHTML,
|
||||
'<head></head><body></body>', 'blank document looks right');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue