From a568b085813610aff81aa9f6ae74832ac52d572b Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Tue, 17 Sep 2013 17:45:47 -0400 Subject: [PATCH] Bug 874502 part 3. Fix a11y tests to not assume synchronous window closing. r=tbsaunde --- accessible/tests/mochitest/events/test_docload.html | 7 +++++-- .../tests/mochitest/relations/test_ui_modalprompt.html | 6 ------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/accessible/tests/mochitest/events/test_docload.html b/accessible/tests/mochitest/events/test_docload.html index 3d43327a887..7d3d515430b 100644 --- a/accessible/tests/mochitest/events/test_docload.html +++ b/accessible/tests/mochitest/events/test_docload.html @@ -216,8 +216,11 @@ this.mDialog.close(); - ok(!isAccessibleInCache(dlgDoc), - "The document accessible for '" + aURL + "' is in cache still!"); + // close() is asynchronous. + SimpleTest.executeSoon(function() { + ok(!isAccessibleInCache(dlgDoc), + "The document accessible for '" + aURL + "' is in cache still!"); + }); } this.getID = function openDialogWnd_getID() diff --git a/accessible/tests/mochitest/relations/test_ui_modalprompt.html b/accessible/tests/mochitest/relations/test_ui_modalprompt.html index 028456ea5a8..21918b33ce4 100644 --- a/accessible/tests/mochitest/relations/test_ui_modalprompt.html +++ b/accessible/tests/mochitest/relations/test_ui_modalprompt.html @@ -22,12 +22,6 @@ src="../browser.js">