From 3e753c8bc3a28b7f8154559d41c4c300547cb9a2 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Sun, 9 Aug 2009 12:33:51 +0430 Subject: [PATCH] Bug 507046 - browser_passwordmgrdlg.js test intermittent failure; r=dolske --- .../components/passwordmgr/test/browser/browser_passwordmgrdlg.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toolkit/components/passwordmgr/test/browser/browser_passwordmgrdlg.js b/toolkit/components/passwordmgr/test/browser/browser_passwordmgrdlg.js index 8741d7fbea..4f49f82d93 100644 --- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgrdlg.js +++ b/toolkit/components/passwordmgr/test/browser/browser_passwordmgrdlg.js @@ -173,11 +173,11 @@ function test() { let testCounter = 0; function setFilter(string) { - // make sure that the the window is focused first - filter.ownerDocument.defaultView.focus(); - filter.focus(); filter.value = string; - EventUtils.synthesizeKey("VK_RETURN", {}, win); + // dispatch the command event to the filter textbox + let event = doc.createEvent("Events"); + event.initEvent("command", true, true); + filter.dispatchEvent(event); } function runOneTest(test) { -- 2.11.4.GIT