Merge mozilla-central to mozilla-inbound

This commit is contained in:
Ed Morley 2012-02-20 12:19:49 +00:00
commit 36cdf1a7ea
9 changed files with 58 additions and 66 deletions

View File

@ -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

View File

@ -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" ]);

View File

@ -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,

View File

@ -37,21 +37,6 @@ XPCOMUtils.defineLazyServiceGetter(Services, 'fm', function(){
.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
@ -70,7 +55,6 @@ function addPermissions(urls) {
});
}
var shell = {
// FIXME/bug 678695: this should be a system setting
preferredScreenBrightness: 1.0,
@ -121,17 +105,7 @@ var shell = {
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) {
@ -139,12 +113,12 @@ var shell = {
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;

View File

@ -1,5 +1,5 @@
<?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="*">
@ -27,8 +27,12 @@
</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">
@ -122,8 +126,11 @@
<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">
@ -178,11 +185,8 @@
<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}">
@ -192,6 +196,10 @@
</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>

View File

@ -140,9 +140,9 @@ static PRLogModuleInfo* gJSDiagnostics;
// 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_DELAY 6000 // ms
#define NS_CC_SKIPPABLE_DELAY 250 // ms
#define NS_CC_SKIPPABLE_DELAY 400 // ms
#define NS_CC_FORCED (5 * 60 * PR_USEC_PER_SEC) // 5 min

View File

@ -24,21 +24,20 @@ var ConsoleObserver = {
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
@ -48,28 +47,26 @@ var ConsoleObserver = {
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()
@ -86,10 +83,7 @@ function test()
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");

View File

@ -1,5 +1,6 @@
function test() {
waitForExplicitFinish();
gBrowser.selectedTab = gBrowser.addTab();
SpecialPowers.setIntPref("ui.tooltipDelay", 0);
@ -60,8 +61,10 @@ function test() {
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>" +

View File

@ -275,7 +275,7 @@ GonkCameraInputStream::Init(nsACString& aContentType, nsCaptureParams* aParams)
mHeight = aParams->height;
mCamera = aParams->camera;
PRUint32 maxNumCameras = 2;//getNumberOfCameras();
PRUint32 maxNumCameras = getNumberOfCameras();
if (maxNumCameras == 0)
return NS_ERROR_FAILURE;