Backed out changeset 16aa7041c009 (bug 1287107) for causing xpcshell and mac tests

This commit is contained in:
Carsten "Tomcat" Book 2016-07-22 11:30:23 +02:00
Родитель ed7f93d17e
Коммит c7846e126c
26 изменённых файлов: 190 добавлений и 359 удалений

Просмотреть файл

@ -38,6 +38,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "SystemAppProxy",
XPCOMUtils.defineLazyModuleGetter(this, "Screenshot", XPCOMUtils.defineLazyModuleGetter(this, "Screenshot",
"resource://gre/modules/Screenshot.jsm"); "resource://gre/modules/Screenshot.jsm");
Cu.import('resource://gre/modules/Webapps.jsm');
XPCOMUtils.defineLazyServiceGetter(Services, 'env', XPCOMUtils.defineLazyServiceGetter(Services, 'env',
'@mozilla.org/process/environment;1', '@mozilla.org/process/environment;1',
'nsIEnvironment'); 'nsIEnvironment');
@ -354,7 +356,6 @@ var shell = {
alert(msg); alert(msg);
return; return;
} }
let manifestURL = this.manifestURL; let manifestURL = this.manifestURL;
// <html:iframe id="systemapp" // <html:iframe id="systemapp"
// mozbrowser="true" allowfullscreen="true" // mozbrowser="true" allowfullscreen="true"
@ -421,11 +422,11 @@ var shell = {
this.contentBrowser.addEventListener('mozbrowsercaretstatechanged', this); this.contentBrowser.addEventListener('mozbrowsercaretstatechanged', this);
CustomEventManager.init(); CustomEventManager.init();
WebappsHelper.init();
UserAgentOverrides.init(); UserAgentOverrides.init();
CaptivePortalLoginHelper.init(); CaptivePortalLoginHelper.init();
this.contentBrowser.src = homeURL; this.contentBrowser.src = homeURL;
this._isEventListenerReady = false; this._isEventListenerReady = false;
window.performance.mark('gecko-shell-system-frame-set'); window.performance.mark('gecko-shell-system-frame-set');
@ -780,6 +781,15 @@ Services.obs.addObserver(function onFullscreenOriginChange(subject, topic, data)
fullscreenorigin: data }); fullscreenorigin: data });
}, "fullscreen-origin-change", false); }, "fullscreen-origin-change", false);
DOMApplicationRegistry.registryReady.then(function () {
// This event should be sent before System app returns with
// system-message-listener-ready mozContentEvent, because it's on
// the critical launch path of the app.
SystemAppProxy._sendCustomEvent('mozChromeEvent', {
type: 'webapps-registry-ready'
}, /* noPending */ true);
});
Services.obs.addObserver(function onBluetoothVolumeChange(subject, topic, data) { Services.obs.addObserver(function onBluetoothVolumeChange(subject, topic, data) {
shell.sendChromeEvent({ shell.sendChromeEvent({
type: "bluetooth-volumeset", type: "bluetooth-volumeset",
@ -816,6 +826,12 @@ var CustomEventManager = {
dump('XXX FIXME : Got a mozContentEvent: ' + detail.type + "\n"); dump('XXX FIXME : Got a mozContentEvent: ' + detail.type + "\n");
switch(detail.type) { switch(detail.type) {
case 'webapps-install-granted':
case 'webapps-install-denied':
case 'webapps-uninstall-granted':
case 'webapps-uninstall-denied':
WebappsHelper.handleEvent(detail);
break;
case 'system-message-listener-ready': case 'system-message-listener-ready':
Services.obs.notifyObservers(null, 'system-message-listener-ready', null); Services.obs.notifyObservers(null, 'system-message-listener-ready', null);
break; break;
@ -874,6 +890,92 @@ var CustomEventManager = {
} }
} }
var WebappsHelper = {
_installers: {},
_count: 0,
init: function webapps_init() {
Services.obs.addObserver(this, "webapps-launch", false);
Services.obs.addObserver(this, "webapps-ask-install", false);
Services.obs.addObserver(this, "webapps-ask-uninstall", false);
Services.obs.addObserver(this, "webapps-close", false);
},
registerInstaller: function webapps_registerInstaller(data) {
let id = "installer" + this._count++;
this._installers[id] = data;
return id;
},
handleEvent: function webapps_handleEvent(detail) {
if (!detail || !detail.id)
return;
let installer = this._installers[detail.id];
delete this._installers[detail.id];
switch (detail.type) {
case "webapps-install-granted":
DOMApplicationRegistry.confirmInstall(installer);
break;
case "webapps-install-denied":
DOMApplicationRegistry.denyInstall(installer);
break;
case "webapps-uninstall-granted":
DOMApplicationRegistry.confirmUninstall(installer);
break;
case "webapps-uninstall-denied":
DOMApplicationRegistry.denyUninstall(installer);
break;
}
},
observe: function webapps_observe(subject, topic, data) {
let json = JSON.parse(data);
json.mm = subject;
let id;
switch(topic) {
case "webapps-launch":
DOMApplicationRegistry.getManifestFor(json.manifestURL).then((aManifest) => {
if (!aManifest)
return;
let manifest = new ManifestHelper(aManifest, json.origin,
json.manifestURL);
let payload = {
timestamp: json.timestamp,
url: manifest.fullLaunchPath(json.startPoint),
manifestURL: json.manifestURL
};
shell.sendCustomEvent("webapps-launch", payload);
});
break;
case "webapps-ask-install":
id = this.registerInstaller(json);
shell.sendChromeEvent({
type: "webapps-ask-install",
id: id,
app: json.app
});
break;
case "webapps-ask-uninstall":
id = this.registerInstaller(json);
shell.sendChromeEvent({
type: "webapps-ask-uninstall",
id: id,
app: json.app
});
break;
case "webapps-close":
shell.sendCustomEvent("webapps-close", {
"manifestURL": json.manifestURL
});
break;
}
}
}
var KeyboardHelper = { var KeyboardHelper = {
handleEvent: function keyboard_handleEvent(detail) { handleEvent: function keyboard_handleEvent(detail) {
switch (detail.type) { switch (detail.type) {

Просмотреть файл

@ -12,6 +12,7 @@ const Cu = Components.utils;
const CC = Components.Constructor; const CC = Components.Constructor;
Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Webapps.jsm");
Cu.import("resource://gre/modules/AppsUtils.jsm"); Cu.import("resource://gre/modules/AppsUtils.jsm");
function debug(aMsg) { function debug(aMsg) {
@ -58,7 +59,7 @@ this.Bootstraper = {
isPackage: false isPackage: false
}; };
//DOMApplicationRegistry.confirmInstall(appData, null, aResolve); DOMApplicationRegistry.confirmInstall(appData, null, aResolve);
}); });
}, },
@ -101,9 +102,6 @@ this.Bootstraper = {
* cleanly replace it by the current one. * cleanly replace it by the current one.
*/ */
uninstallPreviousSystemApp: function() { uninstallPreviousSystemApp: function() {
// TODO: FIXME
return Promise.resolve();
let oldManifestURL; let oldManifestURL;
try{ try{
oldManifestURL = Services.prefs.getCharPref("b2g.system_manifest_url"); oldManifestURL = Services.prefs.getCharPref("b2g.system_manifest_url");
@ -145,7 +143,8 @@ this.Bootstraper = {
} }
return new Promise((aResolve, aReject) => { return new Promise((aResolve, aReject) => {
this.uninstallPreviousSystemApp.bind(this) DOMApplicationRegistry.registryReady
.then(this.uninstallPreviousSystemApp.bind(this))
.then(this.loadManifest.bind(this)) .then(this.loadManifest.bind(this))
.then(this.installSystemApp.bind(this)) .then(this.installSystemApp.bind(this))
.then(this.configure.bind(this)) .then(this.configure.bind(this))

Просмотреть файл

@ -1,188 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GaiaChrome.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsChromeRegistry.h"
#include "nsDirectoryServiceDefs.h"
#include "nsLocalFile.h"
#include "nsXULAppAPI.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/ModuleUtils.h"
#include "mozilla/Services.h"
#include "mozilla/FileLocation.h"
#define NS_GAIACHROME_CID \
{ 0x83f8f999, 0x6b87, 0x4dd8, { 0xa0, 0x93, 0x72, 0x0b, 0xfb, 0x67, 0x4d, 0x38 } }
using namespace mozilla;
StaticRefPtr<GaiaChrome> gGaiaChrome;
NS_IMPL_ISUPPORTS(GaiaChrome, nsIGaiaChrome)
GaiaChrome::GaiaChrome()
: mPackageName(NS_LITERAL_CSTRING("gaia"))
, mAppsDir(NS_LITERAL_STRING("apps"))
, mDataRoot(NS_LITERAL_STRING("/data/local"))
, mSystemRoot(NS_LITERAL_STRING("/system/b2g"))
{
MOZ_ASSERT(NS_IsMainThread());
GetProfileDir();
Register();
}
//virtual
GaiaChrome::~GaiaChrome()
{
}
nsresult
GaiaChrome::GetProfileDir()
{
nsCOMPtr<nsIFile> profDir;
nsresult rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
getter_AddRefs(profDir));
NS_ENSURE_SUCCESS(rv, rv);
rv = profDir->Clone(getter_AddRefs(mProfDir));
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}
nsresult
GaiaChrome::ComputeAppsPath(nsIFile* aPath)
{
#if defined(MOZ_MULET)
aPath->InitWithFile(mProfDir);
#elif defined(MOZ_WIDGET_GONK)
nsCOMPtr<nsIFile> locationDetection = new nsLocalFile();
locationDetection->InitWithPath(mSystemRoot);
locationDetection->Append(mAppsDir);
bool appsInSystem = EnsureIsDirectory(locationDetection);
locationDetection->InitWithPath(mDataRoot);
locationDetection->Append(mAppsDir);
bool appsInData = EnsureIsDirectory(locationDetection);
if (!appsInData && !appsInSystem) {
printf_stderr("!!! NO root directory with apps found\n");
MOZ_ASSERT(false);
return NS_ERROR_UNEXPECTED;
}
aPath->InitWithPath(appsInData ? mDataRoot : mSystemRoot);
#else
return NS_ERROR_UNEXPECTED;
#endif
aPath->Append(mAppsDir);
aPath->Append(NS_LITERAL_STRING("."));
nsresult rv = EnsureValidPath(aPath);
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}
bool
GaiaChrome::EnsureIsDirectory(nsIFile* aPath)
{
bool isDir = false;
aPath->IsDirectory(&isDir);
return isDir;
}
nsresult
GaiaChrome::EnsureValidPath(nsIFile* appsDir)
{
// Ensure there is a valid "apps/system" directory
nsCOMPtr<nsIFile> systemAppDir = new nsLocalFile();
systemAppDir->InitWithFile(appsDir);
systemAppDir->Append(NS_LITERAL_STRING("system"));
bool hasSystemAppDir = EnsureIsDirectory(systemAppDir);
if (!hasSystemAppDir) {
nsCString path; appsDir->GetNativePath(path);
// We don't want to continue if the apps path does not exists ...
printf_stderr("!!! Gaia chrome package is not a directory: %s\n", path.get());
return NS_ERROR_UNEXPECTED;
}
return NS_OK;
}
NS_IMETHODIMP
GaiaChrome::Register()
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(nsChromeRegistry::gChromeRegistry != nullptr);
nsCOMPtr<nsIFile> aPath = new nsLocalFile();
nsresult rv = ComputeAppsPath(aPath);
NS_ENSURE_SUCCESS(rv, rv);
FileLocation appsLocation(aPath);
nsCString uri;
appsLocation.GetURIString(uri);
char* argv[2];
argv[0] = (char*)mPackageName.get();
argv[1] = (char*)uri.get();
nsChromeRegistry::ManifestProcessingContext cx(NS_APP_LOCATION, appsLocation);
nsChromeRegistry::gChromeRegistry->ManifestContent(cx, 0, argv, 0);
return NS_OK;
}
already_AddRefed<GaiaChrome>
GaiaChrome::FactoryCreate()
{
if (!XRE_IsParentProcess()) {
return nullptr;
}
MOZ_ASSERT(NS_IsMainThread());
if (!gGaiaChrome) {
gGaiaChrome = new GaiaChrome();
ClearOnShutdown(&gGaiaChrome);
}
RefPtr<GaiaChrome> service = gGaiaChrome.get();
return service.forget();
}
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(GaiaChrome,
GaiaChrome::FactoryCreate)
NS_DEFINE_NAMED_CID(NS_GAIACHROME_CID);
static const mozilla::Module::CIDEntry kGaiaChromeCIDs[] = {
{ &kNS_GAIACHROME_CID, false, nullptr, GaiaChromeConstructor },
{ nullptr }
};
static const mozilla::Module::ContractIDEntry kGaiaChromeContracts[] = {
{ "@mozilla.org/b2g/gaia-chrome;1", &kNS_GAIACHROME_CID },
{ nullptr }
};
static const mozilla::Module::CategoryEntry kGaiaChromeCategories[] = {
{ "profile-after-change", "Gaia Chrome Registration", GAIACHROME_CONTRACTID },
{ nullptr }
};
static const mozilla::Module kGaiaChromeModule = {
mozilla::Module::kVersion,
kGaiaChromeCIDs,
kGaiaChromeContracts,
kGaiaChromeCategories
};
NSMODULE_DEFN(GaiaChromeModule) = &kGaiaChromeModule;

Просмотреть файл

@ -1,44 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef __GAIACHROME_H__
#define __GAIACHROME_H__
#include "nsIGaiaChrome.h"
#include "nsIFile.h"
#include "nsCOMPtr.h"
#include "nsString.h"
using namespace mozilla;
class GaiaChrome final : public nsIGaiaChrome
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIGAIACHROME
static already_AddRefed<GaiaChrome>
FactoryCreate();
private:
nsCString mPackageName;
nsAutoString mAppsDir;
nsAutoString mDataRoot;
nsAutoString mSystemRoot;
nsCOMPtr<nsIFile> mProfDir;
GaiaChrome();
~GaiaChrome();
nsresult ComputeAppsPath(nsIFile*);
bool EnsureIsDirectory(nsIFile*);
nsresult EnsureValidPath(nsIFile*);
nsresult GetProfileDir();
};
#endif // __GAIACHROME_H__

Просмотреть файл

@ -10,6 +10,7 @@ const Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/AppConstants.jsm"); Cu.import("resource://gre/modules/AppConstants.jsm");
Cu.import("resource://gre/modules/Webapps.jsm");
const kSafeModePref = "b2g.safe_mode"; const kSafeModePref = "b2g.safe_mode";
const kSafeModePage = "safe_mode.html"; const kSafeModePage = "safe_mode.html";
@ -67,70 +68,71 @@ this.SafeMode = {
// Load $system_app/safe_mode.html as a full screen iframe, and wait for // Load $system_app/safe_mode.html as a full screen iframe, and wait for
// the user to make a choice. // the user to make a choice.
let shell = SafeMode.window.shell; return DOMApplicationRegistry.registryReady.then(() => {
let document = SafeMode.window.document; let shell = SafeMode.window.shell;
SafeMode.window.screen.mozLockOrientation("portrait"); let document = SafeMode.window.document;
SafeMode.window.screen.mozLockOrientation("portrait");
let url = Services.io.newURI(shell.homeURL, null, null) let url = Services.io.newURI(shell.homeURL, null, null)
.resolve(kSafeModePage); .resolve(kSafeModePage);
debug("Registry is ready, loading " + url); debug("Registry is ready, loading " + url);
let frame = document.createElementNS("http://www.w3.org/1999/xhtml", "html:iframe"); let frame = document.createElementNS("http://www.w3.org/1999/xhtml", "html:iframe");
frame.setAttribute("mozbrowser", "true"); frame.setAttribute("mozbrowser", "true");
frame.setAttribute("mozapp", shell.manifestURL); frame.setAttribute("mozapp", shell.manifestURL);
frame.setAttribute("id", "systemapp"); // To keep screen.js happy. frame.setAttribute("id", "systemapp"); // To keep screen.js happy.
let contentBrowser = document.body.appendChild(frame); let contentBrowser = document.body.appendChild(frame);
return new Promise((aResolve, aReject) => { return new Promise((aResolve, aReject) => {
let content = contentBrowser.contentWindow; let content = contentBrowser.contentWindow;
// Stripped down version of the system app bootstrap. // Stripped down version of the system app bootstrap.
function handleEvent(e) { function handleEvent(e) {
switch(e.type) { switch(e.type) {
case "mozbrowserloadstart": case "mozbrowserloadstart":
if (content.document.location == "about:blank") { if (content.document.location == "about:blank") {
contentBrowser.addEventListener("mozbrowserlocationchange", handleEvent, true); contentBrowser.addEventListener("mozbrowserlocationchange", handleEvent, true);
contentBrowser.removeEventListener("mozbrowserloadstart", handleEvent, true); contentBrowser.removeEventListener("mozbrowserloadstart", handleEvent, true);
return; return;
} }
notifyContentStart(); notifyContentStart();
break; break;
case "mozbrowserlocationchange": case "mozbrowserlocationchange":
if (content.document.location == "about:blank") { if (content.document.location == "about:blank") {
return; return;
} }
contentBrowser.removeEventListener("mozbrowserlocationchange", handleEvent, true); contentBrowser.removeEventListener("mozbrowserlocationchange", handleEvent, true);
notifyContentStart(); notifyContentStart();
break; break;
case "mozContentEvent": case "mozContentEvent":
content.removeEventListener("mozContentEvent", handleEvent, true); content.removeEventListener("mozContentEvent", handleEvent, true);
contentBrowser.parentNode.removeChild(contentBrowser); contentBrowser.parentNode.removeChild(contentBrowser);
if (e.detail == "safemode-yes") { if (e.detail == "safemode-yes") {
// Really starting in safe mode, let's disable add-ons first. // Really starting in safe mode, let's disable add-ons first.
// TODO: disable add-ons DOMApplicationRegistry.disableAllAddons().then(aResolve);
aResolve(); } else {
} else { aResolve();
aResolve(); }
} break;
break; }
} }
}
function notifyContentStart() { function notifyContentStart() {
let window = SafeMode.window; let window = SafeMode.window;
window.shell.sendEvent(window, "SafeModeStart"); window.shell.sendEvent(window, "SafeModeStart");
contentBrowser.setVisible(true); contentBrowser.setVisible(true);
// browser-ui-startup-complete is used by the AppShell to stop the // browser-ui-startup-complete is used by the AppShell to stop the
// boot animation and start gecko rendering. // boot animation and start gecko rendering.
Services.obs.notifyObservers(null, "browser-ui-startup-complete", ""); Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");
content.addEventListener("mozContentEvent", handleEvent, true); content.addEventListener("mozContentEvent", handleEvent, true);
} }
contentBrowser.addEventListener("mozbrowserloadstart", handleEvent, true); contentBrowser.addEventListener("mozbrowserloadstart", handleEvent, true);
contentBrowser.src = url; contentBrowser.src = url;
});
}); });
}, },

Просмотреть файл

@ -79,18 +79,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
] ]
XPIDL_SOURCES += [ XPIDL_SOURCES += [
'nsIGaiaChrome.idl',
'nsISystemMessagesInternal.idl' 'nsISystemMessagesInternal.idl'
] ]
XPIDL_MODULE = 'gaia_chrome' XPIDL_MODULE = 'gaia_chrome'
UNIFIED_SOURCES += [
'GaiaChrome.cpp'
]
LOCAL_INCLUDES += [
'/chrome'
]
FINAL_LIBRARY = 'xul'

Просмотреть файл

@ -1,15 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
[scriptable, uuid(92a18a98-ab5d-4d02-a024-bdbb3bc89ce1)]
interface nsIGaiaChrome : nsISupports
{
void register();
};
%{ C++
#define GAIACHROME_CONTRACTID "@mozilla.org/b2g/gaia-chrome;1"
%}

Просмотреть файл

@ -231,7 +231,6 @@
#endif #endif
@RESPATH@/components/find.xpt @RESPATH@/components/find.xpt
@RESPATH@/components/gfx.xpt @RESPATH@/components/gfx.xpt
@RESPATH@/components/gaia_chrome.xpt
@RESPATH@/components/hal.xpt @RESPATH@/components/hal.xpt
@RESPATH@/components/html5.xpt @RESPATH@/components/html5.xpt
@RESPATH@/components/htmlparser.xpt @RESPATH@/components/htmlparser.xpt

Просмотреть файл

@ -9,4 +9,4 @@ support-files =
[test_disableScript.xul] [test_disableScript.xul]
[test_principal_jarprefix_origin_appid_appstatus.html] [test_principal_jarprefix_origin_appid_appstatus.html]
# jarPrefix test doesn't work on Windows, see bug 776296. # jarPrefix test doesn't work on Windows, see bug 776296.
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = os == "win"

Просмотреть файл

@ -1,5 +1,5 @@
[DEFAULT] [DEFAULT]
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = (buildapp != 'b2g' && buildapp != 'mulet')
support-files = support-files =
debugger-protocol-helper.js debugger-protocol-helper.js
redirect.sjs redirect.sjs

Просмотреть файл

@ -109,7 +109,7 @@ this.DOMApplicationRegistry = {
// We need to prime the cache with the list of apps. // We need to prime the cache with the list of apps.
let list = this.cpmm.sendSyncMessage("Webapps:GetList", { })[0]; let list = this.cpmm.sendSyncMessage("Webapps:GetList", { })[0];
this.webapps = list ? list.webapps : { }; this.webapps = list.webapps;
// We need a fast mapping from localId -> app, so we add an index. // We need a fast mapping from localId -> app, so we add an index.
// We also add the manifest to the app object. // We also add the manifest to the app object.
this.localIdIndex = { }; this.localIdIndex = { };

Просмотреть файл

@ -502,12 +502,6 @@ this.PermissionsTable = { geolocation: {
app: DENY_ACTION, app: DENY_ACTION,
privileged: DENY_ACTION, privileged: DENY_ACTION,
certified: ALLOW_ACTION certified: ALLOW_ACTION
},
"previously-certified-app": {
app: DENY_ACTION,
trusted: DENY_ACTION,
privileged: DENY_ACTION,
certified: ALLOW_ACTION
} }
}; };

Просмотреть файл

@ -4814,5 +4814,4 @@ AppcacheObserver.prototype = {
} }
}; };
// FIXME: Properly remove Cu.import(Webapps.jsm) from every place. DOMApplicationRegistry.init();
//DOMApplicationRegistry.init();

Просмотреть файл

@ -1,5 +1,5 @@
[DEFAULT] [DEFAULT]
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp != 'b2g' && buildapp != 'mulet'
support-files = support-files =
addons/application.zip addons/application.zip
addons/invalid.webapp addons/invalid.webapp

Просмотреть файл

@ -21,9 +21,9 @@ support-files =
[test_broadcastchannel_worker.html] [test_broadcastchannel_worker.html]
[test_broadcastchannel_worker_alive.html] [test_broadcastchannel_worker_alive.html]
[test_broadcastchannel_mozbrowser.html] [test_broadcastchannel_mozbrowser.html]
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp != 'mulet'
[test_broadcastchannel_mozbrowser2.html] [test_broadcastchannel_mozbrowser2.html]
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp != 'mulet'
[test_bfcache.html] [test_bfcache.html]
[test_invalidState.html] [test_invalidState.html]
[test_ordering.html] [test_ordering.html]

2
dom/cache/test/mochitest/mochitest.ini поставляемый
Просмотреть файл

@ -42,7 +42,7 @@ support-files =
[test_cache_restart.html] [test_cache_restart.html]
[test_cache_shrink.html] [test_cache_shrink.html]
[test_cache_clear_on_app_uninstall.html] [test_cache_clear_on_app_uninstall.html]
skip-if = true || e10s # bug 1178685 ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp != 'mulet' || e10s # bug 1178685
[test_cache_orphaned_cache.html] [test_cache_orphaned_cache.html]
[test_cache_orphaned_body.html] [test_cache_orphaned_body.html]
[test_cache_untrusted.html] [test_cache_untrusted.html]

Просмотреть файл

@ -384,14 +384,14 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') # Bug 931116
[test_webapp_clearBrowserData_inproc_inproc.html] [test_webapp_clearBrowserData_inproc_inproc.html]
# The clearBrowserData tests are only supposed to run in the main process. # The clearBrowserData tests are only supposed to run in the main process.
# They currently time out on android. # They currently time out on android.
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp == 'b2g' || e10s || toolkit == 'android'
[test_webapp_clearBrowserData_inproc_oop.html] [test_webapp_clearBrowserData_inproc_oop.html]
# The clearBrowserData tests are only supposed to run in the main process. # The clearBrowserData tests are only supposed to run in the main process.
# They currently time out on android. # They currently time out on android.
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp == 'b2g' || e10s || toolkit == 'android'
[test_webapp_clearBrowserData_oop_inproc.html] [test_webapp_clearBrowserData_oop_inproc.html]
# The clearBrowserData tests are only supposed to run in the main process. # The clearBrowserData tests are only supposed to run in the main process.
# They currently time out on android. # They currently time out on android.
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp == 'b2g' || e10s || toolkit == 'android'
[test_serviceworker.html] [test_serviceworker.html]
skip-if = buildapp == 'b2g' skip-if = buildapp == 'b2g'

Просмотреть файл

@ -22,11 +22,11 @@ skip-if = toolkit == 'cocoa' # disabled due to hangs, see changeset 6852e7c47edf
[test_CrashService_crash.html] [test_CrashService_crash.html]
skip-if = !(crashreporter && !e10s && (toolkit == 'gtk2' || toolkit == 'gtk3' || toolkit == 'cocoa' || toolkit == 'windows') && (buildapp != 'b2g' || toolkit == 'gonk') && (buildapp != 'mulet')) # TC: Bug 1144079 - Re-enable Mulet mochitests and reftests taskcluster-specific disables. skip-if = !(crashreporter && !e10s && (toolkit == 'gtk2' || toolkit == 'gtk3' || toolkit == 'cocoa' || toolkit == 'windows') && (buildapp != 'b2g' || toolkit == 'gonk') && (buildapp != 'mulet')) # TC: Bug 1144079 - Re-enable Mulet mochitests and reftests taskcluster-specific disables.
[test_permission_for_in_process_app.html] [test_permission_for_in_process_app.html]
skip-if = e10s || true || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app ### Bug 1255339: blacklist because no more mozApps skip-if = e10s || (buildapp != 'b2g' && buildapp != 'mulet') || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
support-files = support-files =
test_permission_helper.js test_permission_helper.js
[test_permission_for_oop_app.html] [test_permission_for_oop_app.html]
skip-if = true || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app ### Bug 1255339: blacklist because no more mozApps skip-if = (buildapp != 'b2g' && buildapp != 'mulet') || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
support-files = support-files =
file_app.sjs file_app.sjs
file_app.template.webapp file_app.template.webapp
@ -34,7 +34,7 @@ support-files =
test_permission_embed.html test_permission_embed.html
test_permission_framescript.js test_permission_framescript.js
[test_permission_for_nested_oop_app.html] [test_permission_for_nested_oop_app.html]
skip-if = true || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app ### Bug 1255339: blacklist because no more mozApps skip-if = (buildapp != 'b2g' && buildapp != 'mulet') || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
support-files = support-files =
file_app.sjs file_app.sjs
file_app.template.webapp file_app.template.webapp
@ -42,7 +42,7 @@ support-files =
test_permission_embed.html test_permission_embed.html
test_permission_framescript.js test_permission_framescript.js
[test_permission_for_two_oop_apps.html] [test_permission_for_two_oop_apps.html]
skip-if = true || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app ### Bug 1255339: blacklist because no more mozApps skip-if = (buildapp != 'b2g' && buildapp != 'mulet') || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
support-files = support-files =
file_app.sjs file_app.sjs
file_app.template.webapp file_app.template.webapp
@ -50,7 +50,7 @@ support-files =
test_permission_embed.html test_permission_embed.html
test_permission_framescript.js test_permission_framescript.js
[test_permission_when_oop_app_crashes.html] [test_permission_when_oop_app_crashes.html]
skip-if = true || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp != 'b2g' || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
support-files = support-files =
file_app.sjs file_app.sjs
file_app.template.webapp file_app.template.webapp

Просмотреть файл

@ -1,5 +1,5 @@
[DEFAULT] [DEFAULT]
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp == 'b2g' || os == 'android'
support-files = support-files =
!/dom/security/test/csp/file_bug768029.html !/dom/security/test/csp/file_bug768029.html

Просмотреть файл

@ -220,7 +220,7 @@ skip-if = buildapp == 'b2g' #no ssl support
[test_ignore_unsafe_inline.html] [test_ignore_unsafe_inline.html]
[test_self_none_as_hostname_confusion.html] [test_self_none_as_hostname_confusion.html]
[test_bug949549.html] [test_bug949549.html]
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp != 'b2g' && buildapp != 'mulet'
[test_path_matching.html] [test_path_matching.html]
[test_path_matching_redirect.html] [test_path_matching_redirect.html]
[test_report_uri_missing_in_report_only_header.html] [test_report_uri_missing_in_report_only_header.html]

Просмотреть файл

@ -35,7 +35,7 @@ support-files =
skip-if = buildapp == 'b2g' # Bug 1137683 skip-if = buildapp == 'b2g' # Bug 1137683
[test_headers_mainthread.html] [test_headers_mainthread.html]
[test_fetch_app_protocol.html] [test_fetch_app_protocol.html]
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = (buildapp != 'b2g' && buildapp != 'mulet')
[test_fetch_basic.html] [test_fetch_basic.html]
[test_fetch_basic_sw_reroute.html] [test_fetch_basic_sw_reroute.html]
skip-if = buildapp == 'b2g' # Bug 1137683 skip-if = buildapp == 'b2g' # Bug 1137683

Просмотреть файл

@ -19,7 +19,7 @@ support-files =
frameLocalStorageSessionOnly.html frameLocalStorageSessionOnly.html
[test_appIsolation.html] [test_appIsolation.html]
skip-if = true || buildapp == 'b2g' || buildapp == 'mulet' || toolkit == 'android' || e10s #bug 793211 # b2g(needs https to work) b2g-debug(needs https to work) b2g-desktop(needs https to work) ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #bug 793211 # b2g(needs https to work) b2g-debug(needs https to work) b2g-desktop(needs https to work)
[test_brokenUTF-16.html] [test_brokenUTF-16.html]
[test_bug600307-DBOps.html] [test_bug600307-DBOps.html]
[test_bug746272-1.html] [test_bug746272-1.html]

Просмотреть файл

@ -1,5 +1,5 @@
[DEFAULT] [DEFAULT]
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp == 'b2g' || os == 'android'
support-files = channel_utils.js support-files = channel_utils.js
[test_app_uninstall_cookies.html] [test_app_uninstall_cookies.html]

Просмотреть файл

@ -31,8 +31,8 @@
#include "nsIObjectInputStream.h" #include "nsIObjectInputStream.h"
#include "nsIObjectOutputStream.h" #include "nsIObjectOutputStream.h"
#include "nsScriptSecurityManager.h" #include "nsScriptSecurityManager.h"
#include "nsIPermissionManager.h"
#include "nsContentUtils.h" #include "nsContentUtils.h"
#include "jsfriendapi.h" #include "jsfriendapi.h"
using namespace mozilla; using namespace mozilla;
@ -442,13 +442,7 @@ InitGlobalObjectOptions(JS::CompartmentOptions& aOptions,
short status = aPrincipal->GetAppStatus(); short status = aPrincipal->GetAppStatus();
// Enable the ECMA-402 experimental formatToParts in certified apps. // Enable the ECMA-402 experimental formatToParts in certified apps.
uint32_t perm = nsIPermissionManager::DENY_ACTION; if (status == nsIPrincipal::APP_STATUS_CERTIFIED) {
nsCOMPtr<nsIPermissionManager> permissionManager = services::GetPermissionManager();
if (permissionManager) {
permissionManager->TestPermissionFromPrincipal(aPrincipal, "previously-certified-app", &perm);
}
if (perm == nsIPermissionManager::ALLOW_ACTION) {
aOptions.creationOptions() aOptions.creationOptions()
.setExperimentalDateTimeFormatFormatToPartsEnabled(true); .setExperimentalDateTimeFormatFormatToPartsEnabled(true);
} }

Просмотреть файл

@ -25,7 +25,7 @@ support-files =
[test_viewsource_unlinkable.html] [test_viewsource_unlinkable.html]
[test_xhr_method_case.html] [test_xhr_method_case.html]
[test_web_packaged_app.html] [test_web_packaged_app.html]
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp != 'mulet'
[test_loadinfo_redirectchain.html] [test_loadinfo_redirectchain.html]
skip-if = buildapp == 'b2g' #no ssl support skip-if = buildapp == 'b2g' #no ssl support
[test_idn_redirect.html] [test_idn_redirect.html]

Просмотреть файл

@ -22,7 +22,7 @@ support-files = file_SpecialPowersFrame1.html
support-files = support-files =
specialPowers_framescript.js specialPowers_framescript.js
[test_SpecialPowersPushAppPermissions.html] [test_SpecialPowersPushAppPermissions.html]
skip-if = true ### Bug 1255339: blacklist because no more mozApps skip-if = buildapp != 'mulet'
support-files = support-files =
file_app.sjs file_app.sjs
file_app.template.webapp file_app.template.webapp
@ -35,7 +35,7 @@ support-files = SpecialPowersLoadChromeScript.js
[test_SpecialPowersLoadPrivilegedScript.html] [test_SpecialPowersLoadPrivilegedScript.html]
[test_bug649012.html] [test_bug649012.html]
[test_bug816847.html] [test_bug816847.html]
skip-if = true || toolkit == 'android' || buildapp == 'b2g' || buildapp == 'mulet' || e10s #No test app installed ### Bug 1255339: blacklist because no more mozApps skip-if = toolkit == 'android' || e10s #No test app installed
[test_sanity_cleanup.html] [test_sanity_cleanup.html]
[test_sanity_cleanup2.html] [test_sanity_cleanup2.html]
[test_sanityEventUtils.html] [test_sanityEventUtils.html]