diff --git a/accessible/tests/mochitest/relations/test_embeds.xul b/accessible/tests/mochitest/relations/test_embeds.xul index e40ce6da396f..f66b1f4daad2 100644 --- a/accessible/tests/mochitest/relations/test_embeds.xul +++ b/accessible/tests/mochitest/relations/test_embeds.xul @@ -58,12 +58,11 @@ this.match = function browserReorderChecker_match(aEvent) { - // Reorder event might be duped because of temporary document creation. - var browserAcc = getAccessible(currentBrowser()); - if (!browserAcc) - ok(false, "opa opa sralslasya"); + if (!isAccessible(currentBrowser())) + return false; - if (aEvent.accessible == browserAcc) { + // Reorder event might be duped because of temporary document creation. + if (aEvent.accessible == getAccessible(currentBrowser())) { this.cnt++; return this.cnt != 2; } @@ -87,11 +86,8 @@ this.finalCheck = function loadURI_finalCheck() { - var acc = getAccessible(currentTabDocument()); - if (!acc) - ok(false, "ahahahaha"); - - testRelation(browserDocument(), RELATION_EMBEDS, acc); + testRelation(browserDocument(), RELATION_EMBEDS, + getAccessible(currentTabDocument())); } this.getID = function loadOneTab_getID()