Merge mozilla-central to mozilla-inbound
authorEd Morley <bmo@edmorley.co.uk>
Mon, 20 Feb 2012 12:19:49 +0000
changeset 87226 81c166bac966d0b225b78220264cbef5256266c5
parent 87225 4ad3d672bf460cac00b2c30b9d94b0444a6c43df (current diff)
parent 87196 b8e7474374d533d84d5dbac3e9afa426b93ac945 (diff)
child 87227 0dbfda1a8f0c4f9d4f352bf02ecdc530f6e6bc82
push id22103
push userbmo@edmorley.co.uk
push dateTue, 21 Feb 2012 12:01:45 +0000
treeherdermozilla-central@4038ffaa5d82 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-central to mozilla-inbound
--- a/accessible/tests/mochitest/common.js
+++ b/accessible/tests/mochitest/common.js
@@ -47,20 +47,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
@@ -47,17 +47,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: []
             },
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -32,31 +32,16 @@ XPCOMUtils.defineLazyGetter(Services, 'i
            .getService(Ci.nsIIdleService);
 });
 
 XPCOMUtils.defineLazyServiceGetter(Services, 'fm', function(){
   return Cc['@mozilla.org/focus-managr;1']
            .getService(Ci.nsFocusManager);
 });
 
-
-// In order to use http:// scheme instead of file:// scheme
-// (that is much more restricted) the following code kick-off
-// a local http server listening on http://127.0.0.1:7777 and
-// http://localhost:7777.
-function startupHttpd(baseDir, port) {
-  const httpdURL = 'chrome://browser/content/httpd.js';
-  let httpd = {};
-  Services.scriptloader.loadSubScript(httpdURL, httpd);
-  let server = new httpd.nsHttpServer();
-  server.registerDirectory('/', new LocalFile(baseDir));
-  server.registerContentType('appcache', 'text/cache-manifest');
-  server.start(port);
-}
-
 // FIXME Bug 707625
 // until we have a proper security model, add some rights to
 // the pre-installed web applications
 // XXX never grant 'content-camera' to non-gaia apps
 function addPermissions(urls) {
   let permissions = [
     'indexedDB', 'indexedDB-unlimited', 'webapps-manage', 'offline-app', 'content-camera'
   ];
@@ -65,17 +50,16 @@ function addPermissions(urls) {
     let allow = Ci.nsIPermissionManager.ALLOW_ACTION;
 
     permissions.forEach(function(permission) {
       Services.perms.add(uri, permission, allow);
     });
   });
 }
 
-
 var shell = {
   // FIXME/bug 678695: this should be a system setting
   preferredScreenBrightness: 1.0,
   
   isDebug: false,
 
   get contentBrowser() {
     delete this.contentBrowser;
@@ -116,40 +100,30 @@ var shell = {
     window.addEventListener('mozfullscreenchange', this);
     this.contentBrowser.addEventListener('load', this, true);
 
     try {
       Services.io.offline = false;
 
       let fileScheme = 'file://';
       if (homeURL.substring(0, fileScheme.length) == fileScheme) {
-        homeURL = homeURL.replace(fileScheme, '');
-
-        let baseDir = homeURL.split('/');
-        baseDir.pop();
-        baseDir = baseDir.join('/');
-
-        const SERVER_PORT = 6666;
-        startupHttpd(baseDir, SERVER_PORT);
-
-        let baseHost = 'http://localhost';
-        homeURL = homeURL.replace(baseDir, baseHost + ':' + SERVER_PORT);
+        homeURL = 'http://localhost:7777' + homeURL.replace(fileScheme, '');
       }
       addPermissions([homeURL]);
     } catch (e) {
       let msg = 'Fatal error during startup: [' + e + '[' + homeURL + ']';
       return alert(msg);
     }
 
-    // Load webapi+apps.js as a frame script
+    // Load webapi.js as a frame script
     let frameScriptUrl = 'chrome://browser/content/webapi.js';
     try {
       messageManager.loadFrameScript(frameScriptUrl, true);
     } catch (e) {
-      dump('Error when loading ' + frameScriptUrl + ' as a frame script: ' + e + '\n');
+      dump('Error loading ' + frameScriptUrl + ' as a frame script: ' + e + '\n');
     }
 
     let browser = this.contentBrowser;
     browser.homePage = homeURL;
     browser.goHome();
   },
 
   stop: function shell_stop() {
--- a/browser/app/blocklist.xml
+++ b/browser/app/blocklist.xml
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
-<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1328822681000">
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1329176667000">
   <emItems>
       <emItem  blockID="i58" id="webmaster@buzzzzvideos.info">
                         <versionRange  minVersion="0" maxVersion="*">
                     </versionRange>
                   </emItem>
       <emItem  blockID="i41" id="{99079a25-328f-4bd4-be04-00955acaa0a7}">
                         <versionRange  minVersion="0.1" maxVersion="4.3.1.00" severity="1">
                     </versionRange>
@@ -22,18 +22,22 @@
                           </targetApplication>
                     </versionRange>
                                 <versionRange  minVersion="3.3.1" maxVersion="*">
                       <targetApplication  id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
                               <versionRange  minVersion="5.0a1" maxVersion="*" />
                           </targetApplication>
                     </versionRange>
                   </emItem>
-      <emItem  blockID="i19" id="{46551EC9-40F0-4e47-8E18-8E5CF550CFB8}">
-                        <versionRange  minVersion="1.1b1" maxVersion="1.1b1">
+      <emItem  blockID="i65" id="activity@facebook.com">
+                        <versionRange  minVersion="0" maxVersion="*">
+                    </versionRange>
+                  </emItem>
+      <emItem  blockID="i66" id="youtubeer@youtuber.com">
+                        <versionRange  minVersion="0" maxVersion="*">
                     </versionRange>
                   </emItem>
       <emItem  blockID="i54" id="applebeegifts@mozilla.doslash.org">
                         <versionRange  minVersion="0" maxVersion="*">
                     </versionRange>
                   </emItem>
       <emItem  blockID="i16" id="{27182e60-b5f3-411c-b545-b44205977502}">
                         <versionRange  minVersion="1.0" maxVersion="1.0">
@@ -117,18 +121,21 @@
                               <versionRange  minVersion="9.0a1" maxVersion="9.0" />
                           </targetApplication>
                     </versionRange>
                   </emItem>
       <emItem  blockID="i60" id="youtb3@youtb3.com">
                         <versionRange  minVersion="0" maxVersion="*">
                     </versionRange>
                   </emItem>
-      <emItem  blockID="i56" id="flash@adobe.com">
-                        <versionRange  minVersion="0" maxVersion="*">
+      <emItem  blockID="i23" id="firefox@bandoo.com">
+                        <versionRange  minVersion="5.0" maxVersion="5.0" severity="1">
+                      <targetApplication  id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
+                              <versionRange  minVersion="3.7a1pre" maxVersion="*" />
+                          </targetApplication>
                     </versionRange>
                   </emItem>
       <emItem  blockID="i55" id="youtube@youtube7.com">
                         <versionRange  minVersion="0" maxVersion="*">
                     </versionRange>
                   </emItem>
       <emItem  blockID="i11" id="yslow@yahoo-inc.com">
                         <versionRange  minVersion="2.0.5" maxVersion="2.0.5">
@@ -173,30 +180,31 @@
       <emItem  blockID="i62" id="jid0-EcdqvFOgWLKHNJPuqAnawlykCGZ@jetpack">
                         <versionRange  minVersion="0" maxVersion="*">
                     </versionRange>
                   </emItem>
       <emItem  blockID="i17" id="{3252b9ae-c69a-4eaf-9502-dc9c1f6c009e}">
                         <versionRange  minVersion="2.2" maxVersion="2.2">
                     </versionRange>
                   </emItem>
-      <emItem  blockID="i23" id="firefox@bandoo.com">
-                        <versionRange  minVersion="5.0" maxVersion="5.0" severity="1">
-                      <targetApplication  id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
-                              <versionRange  minVersion="3.7a1pre" maxVersion="*" />
-                          </targetApplication>
+      <emItem  blockID="i56" id="flash@adobe.com">
+                        <versionRange  minVersion="0" maxVersion="*">
                     </versionRange>
                   </emItem>
       <emItem  blockID="i45" id="{22119944-ED35-4ab1-910B-E619EA06A115}">
                         <versionRange  minVersion="0.1" maxVersion="7.6.1">
                       <targetApplication  id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
                               <versionRange  minVersion="8.0a1" maxVersion="*" />
                           </targetApplication>
                     </versionRange>
                   </emItem>
+      <emItem  blockID="i19" id="{46551EC9-40F0-4e47-8E18-8E5CF550CFB8}">
+                        <versionRange  minVersion="1.1b1" maxVersion="1.1b1">
+                    </versionRange>
+                  </emItem>
       <emItem  blockID="i3" id="langpack-vi-VN@firefox.mozilla.org">
                         <versionRange  minVersion="2.0" maxVersion="2.0">
                     </versionRange>
                   </emItem>
       <emItem  blockID="i7" id="{2224e955-00e9-4613-a844-ce69fccaae91}">
                         </emItem>
       <emItem  blockID="i52" id="ff-ext@youtube">
                         <versionRange  minVersion="0" maxVersion="*">
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -135,19 +135,19 @@ static PRLogModuleInfo* gJSDiagnostics;
 // doing the first GC.
 #define NS_FIRST_GC_DELAY           10000 // ms
 
 // Maximum amount of time that should elapse between incremental GC slices
 #define NS_INTERSLICE_GC_DELAY      100 // ms
 
 // The amount of time we wait between a request to CC (after GC ran)
 // and doing the actual CC.
-#define NS_CC_DELAY                 5000 // ms
-
-#define NS_CC_SKIPPABLE_DELAY       250 // ms
+#define NS_CC_DELAY                 6000 // ms
+
+#define NS_CC_SKIPPABLE_DELAY       400 // ms
 
 #define NS_CC_FORCED                (5 * 60 * PR_USEC_PER_SEC) // 5 min
 
 #define JAVASCRIPT nsIProgrammingLanguage::JAVASCRIPT
 
 // if you add statics here, add them to the list in nsJSRuntime::Startup
 
 static nsITimer *sGCTimer;
--- a/dom/tests/browser/browser_ConsoleStorageAPITests.js
+++ b/dom/tests/browser/browser_ConsoleStorageAPITests.js
@@ -19,82 +19,76 @@ var ConsoleObserver = {
     apiCallCount = 0;
   },
 
   observe: function CO_observe(aSubject, aTopic, aData)
   {
     if (aTopic == "console-storage-cache-event") {
       apiCallCount ++;
       if (apiCallCount == 4) {
+        // remove the observer so we don't trigger this test again
+        Services.obs.removeObserver(this, "console-storage-cache-event");
+
         try {
-                  var tab = gBrowser.selectedTab;
+        let tab = gBrowser.selectedTab;
         let browser = gBrowser.selectedBrowser;
         let win = XPCNativeWrapper.unwrap(browser.contentWindow);
         let windowID = getWindowId(win);
         let messages = ConsoleAPIStorage.getEvents(windowID);
-
         ok(messages.length >= 4, "Some messages found in the storage service");
 
         ConsoleAPIStorage.clearEvents();
         messages = ConsoleAPIStorage.getEvents(windowID);
-        ok(messages.length == 0, "Cleared Storage, no events found");
-
-        // remove the observer so we don't trigger this test again
-        Services.obs.removeObserver(this, "console-storage-cache-event");
+        is(messages.length, 0, "Cleared Storage");
 
         // make sure a closed window's events are in fact removed from the
         // storage cache
         win.console.log("adding a new event");
 
         // close the window - the storage cache should now be empty
         gBrowser.removeTab(tab, {animate: false});
 
         window.QueryInterface(Ci.nsIInterfaceRequestor)
-          .getInterface(Ci.nsIDOMWindowUtils).garbageCollect();
-        executeSoon(function (){
+              .getInterface(Ci.nsIDOMWindowUtils).garbageCollect();
+        executeSoon(function () {
           // use the old windowID again to see if we have any stray cached messages
           messages = ConsoleAPIStorage.getEvents(windowID);
-          ok(messages.length == 0, "0 events found, tab close is clearing the cache");
+          is(messages.length, 0, "tab close is clearing the cache");
           finish();
         });
         } catch (ex) {
           dump(ex + "\n\n\n");
           dump(ex.stack + "\n\n\n");
         }
-        }
-
+      }
     }
   }
 };
 
 function tearDown()
 {
-   while (gBrowser.tabs.length > 1) {
+  while (gBrowser.tabs.length > 1)
     gBrowser.removeCurrentTab();
-  }
 }
 
 function test()
 {
   registerCleanupFunction(tearDown);
 
   ConsoleObserver.init();
 
   waitForExplicitFinish();
 
   var tab = gBrowser.addTab(TEST_URI);
   gBrowser.selectedTab = tab;
   var browser = gBrowser.selectedBrowser;
   browser.addEventListener("DOMContentLoaded", function onLoad(event) {
     browser.removeEventListener("DOMContentLoaded", onLoad, false);
     executeSoon(function test_executeSoon() {
-      var contentWin = browser.contentWindow;
-
-      let win = XPCNativeWrapper.unwrap(contentWin);
-
+      let win = XPCNativeWrapper.unwrap(browser.contentWindow);
       win.console.log("this", "is", "a", "log message");
       win.console.info("this", "is", "a", "info message");
       win.console.warn("this", "is", "a", "warn message");
       win.console.error("this", "is", "a", "error message");
     });
   }, false);
 }
 
--- a/layout/xul/test/browser_bug703210.js
+++ b/layout/xul/test/browser_bug703210.js
@@ -1,10 +1,11 @@
 function test() {
   waitForExplicitFinish();
+
   gBrowser.selectedTab = gBrowser.addTab();
 
   SpecialPowers.setIntPref("ui.tooltipDelay", 0);
 
   let doStopPropagation = function (aEvent)
   {
     aEvent.stopPropagation();
   }
@@ -55,15 +56,17 @@ function test() {
     doc.addEventListener("mouseover", doStopPropagation, true);
     doc.addEventListener("mouseout", doStopPropagation, true);
     document.addEventListener("popupshown", onPopupShown, true);
     document.addEventListener("popuphiding", onPopupHiding, true);
 
     EventUtils.synthesizeMouseAtCenter(p1, { type: "mousemove" }, win);
   }
 
-  gBrowser.selectedBrowser.addEventListener("load",
-    function () { setTimeout(onLoad, 0); }, true);
+  gBrowser.selectedBrowser.addEventListener("load", function loadListener() {
+    gBrowser.selectedBrowser.removeEventListener("load", loadListener, true);
+    setTimeout(onLoad, 0);
+  }, true);
 
   content.location = "data:text/html," +
     "<p id=\"p1\" title=\"tooltip is here\">This paragraph has a tooltip.</p>" +
     "<p id=\"p2\">This paragraph doesn't have tooltip.</p>";
 }
--- a/netwerk/protocol/device/GonkCaptureProvider.cpp
+++ b/netwerk/protocol/device/GonkCaptureProvider.cpp
@@ -270,17 +270,17 @@ GonkCameraInputStream::Init(nsACString& 
   if (XRE_GetProcessType() != GeckoProcessType_Default)
     return NS_ERROR_NOT_IMPLEMENTED;
 
   mContentType = aContentType;
   mWidth = aParams->width;
   mHeight = aParams->height;
   mCamera = aParams->camera;
 
-  PRUint32 maxNumCameras = 2;//getNumberOfCameras();
+  PRUint32 maxNumCameras = getNumberOfCameras();
 
   if (maxNumCameras == 0)
     return NS_ERROR_FAILURE;
 
   if (mCamera >= maxNumCameras)
     mCamera = 0;
 
   mHardware = CameraHardwareInterface::openCamera(mCamera);