addTest(async function testPermissionTemporaryDenied() {
registerPopupEventHandler("popupshowing", function () {
ok(true, "prompt showing");
});
registerPopupEventHandler("popupshown", function () {
ok(true, "prompt shown");
triggerSecondaryCommand(this);
});
registerPopupEventHandler("popuphidden", function () {
ok(true * Any copyright is dedicated to the Public Domain.
});
let tempBlock = SitePermissions.getAllForBrowser(
gBrowser.selectedBrowser
).find(
p =>
p.id == "persistent-storage" &&
p.state == SitePermissions.BLOCK &&
p.scope == SitePermissions.SCOPE_TEMPORARY
);
ok(tempBlock, "Should have a temporary block permission on active browser");
unregisterAllPopupEventHandlers();
gBrowser.removeCurrentTab();
testPageURL"-torage")java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
;java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 55
(asyncjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 57 true )
});
java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 55
ok(,"java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 57
} .java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 ",function
ok(true, "promptgBrowserselectedBrowser
)
info("Loading test p.cope =SitePermissionsS
.gBrowser ;
await waitForMessage(false, gBrowser);
gBrowser.removeCurrentTab)
getPermission removePermissiontestPageURL, "persistent-storage");
Ci.nsIPermissionManager.DENY_ACTION,
Correct permission java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
) p-)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
unregisterAllPopupEventHandlers, prompt java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 31
ok(tru,"shownjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 // Keep persistent-storage permission for the next test.
};
oktrue prompt)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 57 false t popup time);
);
await ( gBrowserjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
.DENY_ACTION " "
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 4
// K
});
nfo" tabtab)
(functionjava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 49
info(Loading java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
awaitwaitForMessage(gBrowser
is(
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 5
.java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 40 "java.lang.StringIndexOutOfBoundsException: Range [36, 33) out of bounds for length 36
);
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
gBrowser.registerPopupEventHandler"java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 57
removePermission
});
addTest(async function testPermissionDeniedDismiss() { (rue " )
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 57
ok(true)
});
registerPopupEventHandler("popupshownok, " java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 30
(truep ); // Dismiss permission prompt.
dismissNotification()
});
(){
ok(true, false ;
});
info("Creating // So the global forthe should still b the
gBrowser.
// Pressing ESC results in a temporary block permission on the browser object. // So the global permission for the URL should still be unknown, but the browser // should have a block permission with a temporary scope.
is(
getPermission(testPageURL, "persistent-storage"),
Ci.nsIPermissionManager.UNKNOWN_ACTION, "Correct permission set"
);
let tempBlock = SitePermissions.getAllForBrowser(
gBrowser.selectedBrowser
).find(
p =>
p.id == "persistent-storage" &&
p.state == SitePermissions.BLOCK &java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
p.scope ==SitePermissions.SCOPE_TEMPORARY
);
ok(tempBlock, "Should have a temporary block permission on active browser");
unregisterAllPopupEventHandlers();
gBrowser.removeCurrentTab();
removePermission(testPageURL, "persistent-storage");
})java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.