Bug 718237. (Bv2) test_focus_autocomplete.xul: Skip this test on SeaMonkey ftb. r=surkov.alexander a=akeybl.
authorSerge Gautherie <sgautherie.bz@free.fr>
Mon, 20 Feb 2012 05:25:17 +0100
changeset 87240 65f8a8f3283f23297e4b7cd86bbd6f17d86d25f0
parent 87239 0108145862071b8f372b4929e32881beee679a31
child 87241 aca232a7c04b5f99ee443d8876cf163dadb43673
push id898
push userjh@junetz.de
push dateThu, 23 Feb 2012 18:25:14 +0000
treeherdermozilla-aurora@65f8a8f3283f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov.alexander, akeybl
bugs718237
milestone12.0a2
Bug 718237. (Bv2) test_focus_autocomplete.xul: Skip this test on SeaMonkey ftb. r=surkov.alexander a=akeybl.
accessible/tests/mochitest/common.js
accessible/tests/mochitest/events/test_focus_autocomplete.xul
accessible/tests/mochitest/tree/test_tabbrowser.xul
--- a/accessible/tests/mochitest/common.js
+++ b/accessible/tests/mochitest/common.js
@@ -45,20 +45,27 @@ const nsIDOMNode = Components.interfaces
 const nsIDOMHTMLElement = Components.interfaces.nsIDOMHTMLElement;
 const nsIDOMWindow = Components.interfaces.nsIDOMWindow;
 const nsIDOMXULElement = Components.interfaces.nsIDOMXULElement;
 
 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
 
 const STATE_BUSY = nsIAccessibleStates.STATE_BUSY;
 
 const SCROLL_TYPE_ANYWHERE = nsIAccessibleScrollType.SCROLL_TYPE_ANYWHERE;
 
--- a/accessible/tests/mochitest/events/test_focus_autocomplete.xul
+++ b/accessible/tests/mochitest/events/test_focus_autocomplete.xul
@@ -377,16 +377,22 @@
     // Tests
 
     //gA11yEventDumpID = "eventdump"; // debug stuff
     //gA11yEventDumpToConsole = true; // debug stuff
 
     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" ]);
 
       gInitQueue = new eventQueue();
       gInitQueue.push(new loadFormAutoComplete("iframe"));
       gInitQueue.push(new initFormAutoCompleteBy("iframe", "hello"));
       gInitQueue.push(new initFormAutoCompleteBy("iframe", "hi"));
--- a/accessible/tests/mochitest/tree/test_tabbrowser.xul
+++ b/accessible/tests/mochitest/tree/test_tabbrowser.xul
@@ -87,17 +87,17 @@
         // xul:tabs
         role: ROLE_PAGETABLIST,
         children: [
           // Children depend on application (UI): see below.
         ]
       };
 
       // SeaMonkey and Firefox tabbrowser UIs differ.
-      if ("restoreTab" in tabBrowser) {
+      if (SEAMONKEY) {
         SimpleTest.ok(true, "Testing SeaMonkey tabbrowser UI.");
 
         tabsAccTree.children.splice(0, 0,
           {
             // xul:toolbarbutton ("Open a new tab")
             role: ROLE_PUSHBUTTON,
             children: []
           },