This commit is contained in:
Dan Witte 2009-10-16 16:17:43 -07:00
commit 1e72a4964a
4 changed files with 13 additions and 8 deletions

View File

@ -26,13 +26,14 @@ function run_test() {
// add a permission without expiration
pm.add(permURI, "test/expiration-perm-nexp", 1, pm.EXPIRE_NEVER, 0);
// check that the permission expired
do_check_eq(0, pm.testPermission(permURI, "test/expiration-perm-exp"));
// ... and that the others didn't
// check that the second two haven't expired yet
do_check_eq(1, pm.testPermission(permURI, "test/expiration-perm-exp3"));
do_check_eq(1, pm.testPermission(permURI, "test/expiration-perm-nexp"));
// ... and the first one has
do_test_pending();
do_timeout(10, "verifyFirstExpiration();");
// ... and that the short-term one will
do_test_pending();
do_timeout(200, "verifyExpiration();");
@ -42,6 +43,11 @@ function run_test() {
do_timeout(300, "end_test();");
}
function verifyFirstExpiration() {
do_check_eq(0, pm.testPermission(permURI, "test/expiration-perm-exp"));
do_test_finished();
}
function verifyExpiration() {
do_check_eq(0, pm.testPermission(permURI, "test/expiration-perm-exp2"));
do_test_finished();

View File

@ -6973,7 +6973,7 @@ DoDeletingFrameSubtree(nsFrameManager* aFrameManager,
// the out-of-flow frame will be destroyed by aRemovedFrame.
if (outOfFlowFrame->GetStyleDisplay()->mDisplay == NS_STYLE_DISPLAY_POPUP ||
!nsLayoutUtils::IsProperAncestorFrame(aRemovedFrame, outOfFlowFrame)) {
NS_ASSERTION(aDestroyQueue.IndexOf(outOfFlowFrame) == kNotFound,
NS_ASSERTION(!aDestroyQueue.Contains(outOfFlowFrame),
"out-of-flow is already in the destroy queue");
aDestroyQueue.AppendElement(outOfFlowFrame);
// Recurse into the out-of-flow, it is now the aRemovedFrame.

View File

@ -314,8 +314,7 @@ private:
NS_DECL_IMGIDECODEROBSERVER
void AddIconObserver(nsImageFrame *frame) {
NS_ABORT_IF_FALSE(mIconObservers.IndexOf(frame) ==
nsTArray<nsImageFrame*>::NoIndex,
NS_ABORT_IF_FALSE(!mIconObservers.Contains(frame),
"Observer shouldn't aleady be in array");
mIconObservers.AppendElement(frame);
}

View File

@ -1527,7 +1527,7 @@ nsMathMLChar::StretchEnumContext::EnumCallback(const nsString& aFamily,
nsGlyphTable* glyphTable = aGeneric ?
&gGlyphTableList->mUnicodeTable : gGlyphTableList->GetGlyphTableFor(aFamily);
if (context->mTablesTried.IndexOf(glyphTable) != context->mTablesTried.NoIndex)
if (context->mTablesTried.Contains(glyphTable))
return PR_TRUE; // already tried this one
context->mGlyphTable = glyphTable;