From d488b0cc79f6785520c9daa2f6ce4bc271e722bc Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Mon, 20 Feb 2012 05:25:17 +0100 Subject: [PATCH] Bug 718237. (Bv2) test_focus_autocomplete.xul: Skip this test on SeaMonkey ftb. r=surkov.alexander. --- accessible/tests/mochitest/common.js | 15 +++++++++++---- .../mochitest/events/test_focus_autocomplete.xul | 6 ++++++ .../tests/mochitest/tree/test_tabbrowser.xul | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/accessible/tests/mochitest/common.js b/accessible/tests/mochitest/common.js index 51676067426f..d17b8c1721d2 100644 --- a/accessible/tests/mochitest/common.js +++ b/accessible/tests/mochitest/common.js @@ -52,10 +52,17 @@ const nsIPropertyElement = Components.interfaces.nsIPropertyElement; //////////////////////////////////////////////////////////////////////////////// // OS detect -const MAC = (navigator.platform.indexOf("Mac") != -1)? true : false; -const LINUX = (navigator.platform.indexOf("Linux") != -1)? true : false; -const SOLARIS = (navigator.platform.indexOf("SunOS") != -1)? true : false; -const WIN = (navigator.platform.indexOf("Win") != -1)? true : false; + +const MAC = (navigator.platform.indexOf("Mac") != -1); +const LINUX = (navigator.platform.indexOf("Linux") != -1); +const SOLARIS = (navigator.platform.indexOf("SunOS") != -1); +const WIN = (navigator.platform.indexOf("Win") != -1); + +//////////////////////////////////////////////////////////////////////////////// +// Application detect +// Firefox is assumed by default. + +const SEAMONKEY = navigator.userAgent.match(/ SeaMonkey\//); //////////////////////////////////////////////////////////////////////////////// // Accessible general diff --git a/accessible/tests/mochitest/events/test_focus_autocomplete.xul b/accessible/tests/mochitest/events/test_focus_autocomplete.xul index d6ca72882b6e..280893e76f76 100644 --- a/accessible/tests/mochitest/events/test_focus_autocomplete.xul +++ b/accessible/tests/mochitest/events/test_focus_autocomplete.xul @@ -382,6 +382,12 @@ var gInitQueue = null; function initTests() { + if (SEAMONKEY) { + todo(false, "Skipping this test on SeaMonkey ftb. (Bug 718237)"); + SimpleTest.finish(); + return; + } + // register 'test-a11y-search' autocomplete search initAutoComplete([ "hello", "hi" ], [ "Beep beep'm beep beep yeah", "Baby you can drive my car" ]); diff --git a/accessible/tests/mochitest/tree/test_tabbrowser.xul b/accessible/tests/mochitest/tree/test_tabbrowser.xul index 82d2b55485a1..38386628b611 100644 --- a/accessible/tests/mochitest/tree/test_tabbrowser.xul +++ b/accessible/tests/mochitest/tree/test_tabbrowser.xul @@ -52,7 +52,7 @@ }; // SeaMonkey and Firefox tabbrowser UIs differ. - if ("restoreTab" in tabBrowser) { + if (SEAMONKEY) { SimpleTest.ok(true, "Testing SeaMonkey tabbrowser UI."); tabsAccTree.children.splice(0, 0,