зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to autoland. a=merge on a CLOSED TREE
This commit is contained in:
Коммит
13039e58a5
|
@ -14,7 +14,6 @@ unset MAKECAB
|
|||
# --enable-crashreporter
|
||||
# --enable-release
|
||||
# LLVM_CONFIG
|
||||
# MOZ_ADDON_SIGNING
|
||||
# MOZ_REQUIRE_SIGNING
|
||||
# --enable-js-shell
|
||||
# build/mozconfig.automation
|
||||
|
|
|
@ -67,8 +67,5 @@ fi
|
|||
|
||||
MOZ_PROFILE_MIGRATOR=1
|
||||
|
||||
# Enable checking that add-ons are signed by the trusted root
|
||||
MOZ_ADDON_SIGNING=1
|
||||
|
||||
# Include the DevTools client, not just the server (which is the default)
|
||||
MOZ_DEVTOOLS=all
|
||||
|
|
|
@ -14,8 +14,6 @@ mk_add_options AUTOCLOBBER=1
|
|||
|
||||
ac_add_options --enable-crashreporter
|
||||
|
||||
# Enable checking that add-ons are signed by the trusted root
|
||||
MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-1}
|
||||
# Disable enforcing that add-ons are signed by the trusted root
|
||||
MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}
|
||||
|
||||
|
|
|
@ -123,6 +123,9 @@ body {
|
|||
.treeTable > thead {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
/* Bug 1466806 - fix expander arrow for expanding treeview rows rendering over the
|
||||
thead */
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.split-box:not(.horz) .treeTable {
|
||||
|
|
|
@ -57,6 +57,10 @@
|
|||
overflow: hidden;
|
||||
padding-inline-start: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.treeTable .treeValueCell > [aria-labelledby],
|
||||
.treeTable .treeLabelCell > .treeLabel {
|
||||
unicode-bidi: plaintext;
|
||||
}
|
||||
|
||||
|
|
|
@ -981,6 +981,45 @@ CustomElementRegistry::SetElementCreationCallback(const nsAString& aName,
|
|||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
TryUpgrade(nsINode& aNode)
|
||||
{
|
||||
Element* element = aNode.IsElement() ? aNode.AsElement() : nullptr;
|
||||
if (element) {
|
||||
CustomElementData* ceData = element->GetCustomElementData();
|
||||
if (ceData) {
|
||||
NodeInfo* nodeInfo = element->NodeInfo();
|
||||
nsAtom* typeAtom = ceData->GetCustomElementType();
|
||||
CustomElementDefinition* definition =
|
||||
nsContentUtils::LookupCustomElementDefinition(nodeInfo->GetDocument(),
|
||||
nodeInfo->NameAtom(),
|
||||
nodeInfo->NamespaceID(),
|
||||
typeAtom);
|
||||
if (definition) {
|
||||
nsContentUtils::EnqueueUpgradeReaction(element, definition);
|
||||
}
|
||||
}
|
||||
|
||||
if (ShadowRoot* root = element->GetShadowRoot()) {
|
||||
for (Element* child = root->GetFirstElementChild(); child;
|
||||
child = child->GetNextElementSibling()) {
|
||||
TryUpgrade(*child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Element* child = aNode.GetFirstElementChild(); child;
|
||||
child = child->GetNextElementSibling()) {
|
||||
TryUpgrade(*child);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CustomElementRegistry::Upgrade(nsINode& aRoot)
|
||||
{
|
||||
TryUpgrade(aRoot);
|
||||
}
|
||||
|
||||
void
|
||||
CustomElementRegistry::Get(JSContext* aCx, const nsAString& aName,
|
||||
JS::MutableHandle<JS::Value> aRetVal)
|
||||
|
|
|
@ -554,6 +554,8 @@ public:
|
|||
// Chrome-only method that give JS an opportunity to only load the custom
|
||||
// element definition script when needed.
|
||||
void SetElementCreationCallback(const nsAString& aName, CustomElementCreationCallback& aCallback, ErrorResult& aRv);
|
||||
|
||||
void Upgrade(nsINode& aRoot);
|
||||
};
|
||||
|
||||
class MOZ_RAII AutoCEReaction final {
|
||||
|
|
|
@ -893,9 +893,7 @@ protected:
|
|||
|
||||
RefPtr<nsRange> mRange;
|
||||
|
||||
// these arrays all typically are used and have elements
|
||||
AutoTArray<nsIContent*, 8> mEndNodes;
|
||||
AutoTArray<int32_t, 8> mEndOffsets;
|
||||
};
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(nsContentSubtreeIterator, nsContentIterator)
|
||||
|
@ -1015,8 +1013,13 @@ nsContentSubtreeIterator::InitWithRange()
|
|||
}
|
||||
|
||||
// cache ancestors
|
||||
nsContentUtils::GetAncestorsAndOffsets(endContainer, endOffset,
|
||||
&mEndNodes, &mEndOffsets);
|
||||
mEndNodes.Clear();
|
||||
nsIContent* endNode =
|
||||
endContainer->IsContent() ? endContainer->AsContent() : nullptr;
|
||||
while (endNode) {
|
||||
mEndNodes.AppendElement(endNode);
|
||||
endNode = endNode->GetParent();
|
||||
}
|
||||
|
||||
nsIContent* firstCandidate = nullptr;
|
||||
nsIContent* lastCandidate = nullptr;
|
||||
|
@ -1029,7 +1032,8 @@ nsContentSubtreeIterator::InitWithRange()
|
|||
// no children, start at the node itself
|
||||
node = startContainer;
|
||||
} else {
|
||||
nsIContent* child = startContainer->GetChildAt_Deprecated(offset);
|
||||
nsIContent* child = mRange->GetChildAtStartOffset();
|
||||
MOZ_ASSERT(child == startContainer->GetChildAt_Deprecated(offset));
|
||||
if (!child) {
|
||||
// offset after last child
|
||||
node = startContainer;
|
||||
|
@ -1078,7 +1082,8 @@ nsContentSubtreeIterator::InitWithRange()
|
|||
if (!offset || !numChildren) {
|
||||
node = endContainer;
|
||||
} else {
|
||||
lastCandidate = endContainer->GetChildAt_Deprecated(--offset);
|
||||
lastCandidate = mRange->EndRef().Ref();
|
||||
MOZ_ASSERT(lastCandidate == endContainer->GetChildAt_Deprecated(--offset));
|
||||
NS_ASSERTION(lastCandidate,
|
||||
"tree traversal trouble in nsContentSubtreeIterator::Init");
|
||||
}
|
||||
|
|
|
@ -9884,11 +9884,11 @@ nsContentUtils::NewXULOrHTMLElement(Element** aResult, mozilla::dom::NodeInfo* a
|
|||
}
|
||||
}
|
||||
|
||||
RefPtr<nsAtom> tagAtom = nodeInfo->NameAtom();
|
||||
RefPtr<nsAtom> typeAtom;
|
||||
nsAtom* tagAtom = nodeInfo->NameAtom();
|
||||
nsAtom* typeAtom = nullptr;
|
||||
bool isCustomElement = isCustomElementName || aIsAtom;
|
||||
if (isCustomElement) {
|
||||
typeAtom = isCustomElementName ? tagAtom.get() : aIsAtom;
|
||||
typeAtom = isCustomElementName ? tagAtom : aIsAtom;
|
||||
}
|
||||
|
||||
MOZ_ASSERT_IF(aDefinition, isCustomElement);
|
||||
|
|
|
@ -3486,10 +3486,11 @@ nsFocusManager::GetNextTabbableContent(nsIPresShell* aPresShell,
|
|||
}
|
||||
}
|
||||
|
||||
// If aStartContent is not in scope owned by aRootContent
|
||||
// (e.g., aStartContent is already in shadow DOM),
|
||||
// If aStartContent is not in a scope owned by the root element
|
||||
// (i.e. aStartContent is already in shadow DOM),
|
||||
// search from scope including aStartContent
|
||||
if (aRootContent != FindOwner(aStartContent)) {
|
||||
nsIContent* rootElement = aRootContent->OwnerDoc()->GetRootElement();
|
||||
if (rootElement != FindOwner(aStartContent)) {
|
||||
nsIContent* contentToFocus =
|
||||
GetNextTabbableContentInAncestorScopes(&aStartContent,
|
||||
aOriginalStartContent,
|
||||
|
|
|
@ -16,82 +16,82 @@ skip-if(Android) load 789075-1.html # bug 1374405 for android
|
|||
skip-if(Android&&AndroidVersion=='22') HTTP load 795892-1.html # bug 1358718
|
||||
load 844563.html
|
||||
load 846612.html
|
||||
load 852838.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 852838.html
|
||||
load 865537-1.html
|
||||
load 868504.html
|
||||
load 874869.html
|
||||
load 874915.html
|
||||
load 874934.html
|
||||
load 874952.html
|
||||
load 875144.html
|
||||
load 875596.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 868504.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 874869.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 874915.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 874934.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 874952.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 875144.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 875596.html
|
||||
load 875911.html
|
||||
load 876024-1.html
|
||||
load 876024-2.html
|
||||
load 876118.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 876024-2.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 876118.html
|
||||
load 876207.html
|
||||
load 876215.html
|
||||
load 876249.html
|
||||
load 876252.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 876249.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 876252.html
|
||||
load 876834.html
|
||||
load 877527.html
|
||||
load 877820.html
|
||||
load 878014.html
|
||||
load 878328.html
|
||||
load 878407.html
|
||||
load 878478.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 878407.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 878478.html
|
||||
load 880129.html
|
||||
load 880202.html
|
||||
load 880342-1.html
|
||||
load 880342-2.html
|
||||
load 880384.html
|
||||
load 880404.html
|
||||
load 880724.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 880724.html
|
||||
load 881775.html
|
||||
load 882549.html
|
||||
load 882956.html
|
||||
load 884459.html
|
||||
load 889042.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 889042.html
|
||||
load 894104.html
|
||||
load 907986-1.html
|
||||
load 907986-2.html
|
||||
load 907986-3.html
|
||||
load 907986-4.html
|
||||
load 910171-1.html
|
||||
load 920987.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 920987.html
|
||||
load 925619-1.html
|
||||
load 925619-2.html
|
||||
load 926619.html
|
||||
load 933151.html
|
||||
load 933156.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 926619.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 933151.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 933156.html
|
||||
load 944851.html
|
||||
load 952756.html
|
||||
load 966636.html
|
||||
load 986901.html
|
||||
load 990794.html
|
||||
load 995289.html
|
||||
load 1012609.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 952756.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 966636.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 986901.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 990794.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 995289.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 1012609.html
|
||||
load 1015662.html
|
||||
load 1020205.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 1020205.html
|
||||
skip-if(Android) test-pref(media.navigator.permission.disabled,true) load 1028458.html # bug 1048863
|
||||
load 1041466.html
|
||||
load 1045650.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 1041466.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 1045650.html
|
||||
load 1080986.html
|
||||
skip-if(Android&&AndroidVersion=='21') load 1180881.html # bug 1409365
|
||||
load 1197935.html
|
||||
load 1122218.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 1122218.html
|
||||
load 1127188.html
|
||||
load 1157994.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 1157994.html
|
||||
load 1158427.html
|
||||
load 1185176.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 1185176.html
|
||||
load 1185192.html
|
||||
load 1257700.html
|
||||
load 1267263.html
|
||||
load 1270303.html
|
||||
load 1304948.html
|
||||
load 1319486.html
|
||||
load 1368490.html
|
||||
load 1291702.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 1368490.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load 1291702.html
|
||||
load 1378826.html
|
||||
load 1384248.html
|
||||
load 1389304.html
|
||||
|
@ -99,14 +99,14 @@ load 1393272.webm
|
|||
load 1411322.html
|
||||
load disconnect-wrong-destination.html
|
||||
load analyser-channels-1.html
|
||||
load audiocontext-double-suspend.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load audiocontext-double-suspend.html
|
||||
load buffer-source-duration-1.html
|
||||
load buffer-source-ended-1.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load buffer-source-ended-1.html
|
||||
load buffer-source-resampling-start-1.html
|
||||
load buffer-source-slow-resampling-1.html
|
||||
load doppler-1.html
|
||||
HTTP load media-element-source-seek-1.html
|
||||
load offline-buffer-source-ended-1.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load doppler-1.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) HTTP load media-element-source-seek-1.html
|
||||
skip-if(verify&&isDebugBuild&>kWidget) load offline-buffer-source-ended-1.html
|
||||
load oscillator-ended-1.html
|
||||
load oscillator-ended-2.html
|
||||
skip-if(Android&&AndroidVersion=='22') load video-replay-after-audio-end.html # bug 1315125, bug 1358876
|
||||
|
|
|
@ -14,7 +14,7 @@ load 855796.html
|
|||
load 860143.html
|
||||
load 861958.html
|
||||
load 863929.html
|
||||
load 1185191.html
|
||||
skip-if(verify&>kWidget) load 1185191.html
|
||||
load 1281695.html
|
||||
load 1306476.html
|
||||
load 1348381.html
|
||||
|
|
|
@ -11,20 +11,17 @@
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
|
||||
bool
|
||||
ServiceWorkerParentInterceptEnabled()
|
||||
{
|
||||
static bool sInit = false;
|
||||
static Atomic<bool> sEnabled;
|
||||
|
||||
if (!sInit) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
Preferences::AddAtomicBoolVarCache(&sEnabled,
|
||||
"dom.serviceWorkers.parent_intercept",
|
||||
false);
|
||||
sInit = true;
|
||||
static Atomic<bool> sInitialized;
|
||||
if (!sInitialized) {
|
||||
AssertIsOnMainThread();
|
||||
sInitialized = true;
|
||||
sEnabled = Preferences::GetBool("dom.serviceWorkers.parent_intercept", false);
|
||||
}
|
||||
|
||||
return sEnabled;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ interface CustomElementRegistry {
|
|||
any get(DOMString name);
|
||||
[Throws]
|
||||
Promise<void> whenDefined(DOMString name);
|
||||
[CEReactions] void upgrade(Node root);
|
||||
};
|
||||
|
||||
dictionary ElementDefinitionOptions {
|
||||
|
|
|
@ -605,13 +605,10 @@ private:
|
|||
|
||||
NS_IMPL_ISUPPORTS(LoaderListener, nsIStreamLoaderObserver, nsIRequestObserver)
|
||||
|
||||
class ScriptLoaderHolder;
|
||||
|
||||
class ScriptLoaderRunnable final : public nsIRunnable,
|
||||
public nsINamed
|
||||
{
|
||||
friend class ScriptExecutorRunnable;
|
||||
friend class ScriptLoaderHolder;
|
||||
friend class CachePromiseHandler;
|
||||
friend class CacheScriptLoader;
|
||||
friend class LoaderListener;
|
||||
|
@ -624,7 +621,6 @@ class ScriptLoaderRunnable final : public nsIRunnable,
|
|||
Maybe<ServiceWorkerDescriptor> mController;
|
||||
bool mIsMainScript;
|
||||
WorkerScriptType mWorkerScriptType;
|
||||
bool mCanceled;
|
||||
bool mCanceledMainThread;
|
||||
ErrorResult& mRv;
|
||||
|
||||
|
@ -642,7 +638,7 @@ public:
|
|||
: mWorkerPrivate(aWorkerPrivate), mSyncLoopTarget(aSyncLoopTarget),
|
||||
mClientInfo(aClientInfo), mController(aController),
|
||||
mIsMainScript(aIsMainScript), mWorkerScriptType(aWorkerScriptType),
|
||||
mCanceled(false), mCanceledMainThread(false), mRv(aRv)
|
||||
mCanceledMainThread(false), mRv(aRv)
|
||||
{
|
||||
aWorkerPrivate->AssertIsOnWorkerThread();
|
||||
MOZ_ASSERT(aSyncLoopTarget);
|
||||
|
@ -651,6 +647,12 @@ public:
|
|||
mLoadInfos.SwapElements(aLoadInfos);
|
||||
}
|
||||
|
||||
void
|
||||
CancelMainThreadWithBindingAborted()
|
||||
{
|
||||
CancelMainThread(NS_BINDING_ABORTED);
|
||||
}
|
||||
|
||||
private:
|
||||
~ScriptLoaderRunnable()
|
||||
{ }
|
||||
|
@ -813,23 +815,6 @@ private:
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
Notify(WorkerStatus aStatus)
|
||||
{
|
||||
mWorkerPrivate->AssertIsOnWorkerThread();
|
||||
|
||||
if (aStatus >= Terminating && !mCanceled) {
|
||||
mCanceled = true;
|
||||
|
||||
MOZ_ALWAYS_SUCCEEDS(
|
||||
NS_DispatchToMainThread(NewRunnableMethod("ScriptLoaderRunnable::CancelMainThreadWithBindingAborted",
|
||||
this,
|
||||
&ScriptLoaderRunnable::CancelMainThreadWithBindingAborted)));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
IsMainWorkerScript() const
|
||||
{
|
||||
|
@ -842,12 +827,6 @@ private:
|
|||
return mWorkerScriptType == DebuggerScript;
|
||||
}
|
||||
|
||||
void
|
||||
CancelMainThreadWithBindingAborted()
|
||||
{
|
||||
CancelMainThread(NS_BINDING_ABORTED);
|
||||
}
|
||||
|
||||
void
|
||||
CancelMainThread(nsresult aCancelResult)
|
||||
{
|
||||
|
@ -1474,27 +1453,6 @@ private:
|
|||
|
||||
NS_IMPL_ISUPPORTS(ScriptLoaderRunnable, nsIRunnable, nsINamed)
|
||||
|
||||
class MOZ_STACK_CLASS ScriptLoaderHolder final : public WorkerHolder
|
||||
{
|
||||
// Raw pointer because this holder object follows the mRunnable life-time.
|
||||
ScriptLoaderRunnable* mRunnable;
|
||||
|
||||
public:
|
||||
explicit ScriptLoaderHolder(ScriptLoaderRunnable* aRunnable)
|
||||
: WorkerHolder("ScriptLoaderHolder")
|
||||
, mRunnable(aRunnable)
|
||||
{
|
||||
MOZ_ASSERT(aRunnable);
|
||||
}
|
||||
|
||||
virtual bool
|
||||
Notify(WorkerStatus aStatus) override
|
||||
{
|
||||
mRunnable->Notify(aStatus);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
NS_IMETHODIMP
|
||||
LoaderListener::OnStreamComplete(nsIStreamLoader* aLoader, nsISupports* aContext,
|
||||
nsresult aStatus, uint32_t aStringLen,
|
||||
|
@ -2277,9 +2235,14 @@ LoadAllScripts(WorkerPrivate* aWorkerPrivate,
|
|||
|
||||
NS_ASSERTION(aLoadInfos.IsEmpty(), "Should have swapped!");
|
||||
|
||||
ScriptLoaderHolder workerHolder(loader);
|
||||
RefPtr<StrongWorkerRef> workerRef =
|
||||
StrongWorkerRef::Create(aWorkerPrivate, "ScriptLoader", [loader]() {
|
||||
NS_DispatchToMainThread(NewRunnableMethod("ScriptLoader::CancelMainThreadWithBindingAborted",
|
||||
loader,
|
||||
&ScriptLoaderRunnable::CancelMainThreadWithBindingAborted));
|
||||
});
|
||||
|
||||
if (NS_WARN_IF(!workerHolder.HoldWorker(aWorkerPrivate, Terminating))) {
|
||||
if (NS_WARN_IF(!workerRef)) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -134,4 +134,4 @@ needs-focus == spellcheck-contenteditable-focused-reframe.html spellcheck-conten
|
|||
== 911201.html 911201-ref.html
|
||||
needs-focus == 969773.html 969773-ref.html
|
||||
fuzzy-if(skiaContent,1,220) == 997805.html 997805-ref.html
|
||||
fuzzy-if(skiaContent,1,220) == 1088158.html 1088158-ref.html
|
||||
fuzzy-if(skiaContent,1,220) skip-if(verify&&OSX) == 1088158.html 1088158-ref.html
|
||||
|
|
|
@ -189,8 +189,9 @@ const ClassSpec BigIntObject::classSpec_ = {
|
|||
BigIntObject::properties
|
||||
};
|
||||
|
||||
// The class is named "Object" as a workaround for bug 1277801.
|
||||
const Class BigIntObject::class_ = {
|
||||
"BigInt",
|
||||
"Object",
|
||||
JSCLASS_HAS_CACHED_PROTO(JSProto_BigInt) |
|
||||
JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS),
|
||||
JS_NULL_CLASS_OPS,
|
||||
|
|
|
@ -474,11 +474,6 @@ GetBuiltinTagSlow(JSContext* cx, HandleObject obj, MutableHandleString builtinTa
|
|||
case ESClass::RegExp:
|
||||
builtinTag.set(cx->names().objectRegExp);
|
||||
return true;
|
||||
#ifdef ENABLE_BIGINT
|
||||
case ESClass::BigInt:
|
||||
builtinTag.set(cx->names().objectBigInt);
|
||||
return true;
|
||||
#endif
|
||||
default:
|
||||
if (obj->isCallable()) {
|
||||
// Non-standard: Prevent <object> from showing up as Function.
|
||||
|
@ -538,11 +533,6 @@ GetBuiltinTagFast(JSObject* obj, const Class* clasp, JSContext* cx)
|
|||
return cx->names().objectFunction;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_BIGINT
|
||||
if (obj->is<BigIntObject>())
|
||||
return cx->names().objectBigInt;
|
||||
#endif
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -586,7 +586,7 @@ load 1039454-1.html
|
|||
load 1042489.html
|
||||
load 1054010-1.html
|
||||
load 1058954-1.html
|
||||
pref(dom.webcomponents.shadowdom.enabled,true) pref(dom.webcomponents.customelements.enabled,true) load 1059138-1.html
|
||||
skip-if(verify&&isDebugBuild&&(gtkWidget||OSX)) pref(dom.webcomponents.shadowdom.enabled,true) pref(dom.webcomponents.customelements.enabled,true) load 1059138-1.html
|
||||
load 1134531.html
|
||||
load 1134667.html
|
||||
load 1137723-1.html
|
||||
|
|
|
@ -1879,7 +1879,7 @@ fuzzy-if(skiaContent,1,800000) == 1119117-1b.html 1119117-1-ref.html
|
|||
== 1120431-1.html 1120431-1-ref.html
|
||||
== 1120431-2.html 1120431-2-ref.html
|
||||
== 1121748-1.html 1121748-1-ref.html
|
||||
== 1121748-2.html 1121748-2-ref.html
|
||||
skip-if(verify) == 1121748-2.html 1121748-2-ref.html
|
||||
== 1127107-1a-nowrap.html 1127107-1-ref.html
|
||||
== 1127107-1b-pre.html 1127107-1-ref.html
|
||||
== 1127107-2-capitalize.html 1127107-2-capitalize-ref.html
|
||||
|
|
|
@ -77,7 +77,7 @@ fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)||azureSkia||skiaContent,9,47
|
|||
== ctm-1.html ctm-1-ref.html
|
||||
|
||||
== 672646-alpha-radial-gradient.html 672646-alpha-radial-gradient-ref.html
|
||||
== 674003-alpha-radial-gradient-superlum.html 674003-alpha-radial-gradient-superlum-ref.html
|
||||
skip-if(verify&&/^Windows\x20NT\x2010\.0/.test(http.oscpu)) == 674003-alpha-radial-gradient-superlum.html 674003-alpha-radial-gradient-superlum-ref.html
|
||||
|
||||
!= 693610-1.html 693610-1-notref.html # bug 693610: multiple glyph runs should not be overprinted
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ default-preferences pref(layout.css.box-decoration-break.enabled,true)
|
|||
|
||||
== box-decoration-break-1.html box-decoration-break-1-ref.html
|
||||
fuzzy(1,20) fuzzy-if(skiaContent,1,700) fuzzy-if(webrender,21-26,8910-12357) == box-decoration-break-with-inset-box-shadow-1.html box-decoration-break-with-inset-box-shadow-1-ref.html
|
||||
fuzzy(45,460) fuzzy-if(skiaContent,57,439) fuzzy-if(Android,57,1330) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html # Bug 1386543
|
||||
skip-if(verify) fuzzy(45,460) fuzzy-if(skiaContent,57,439) fuzzy-if(Android,57,1330) == box-decoration-break-with-outset-box-shadow-1.html box-decoration-break-with-outset-box-shadow-1-ref.html # Bug 1386543
|
||||
random-if(!gtkWidget) == box-decoration-break-border-image.html box-decoration-break-border-image-ref.html
|
||||
== box-decoration-break-block-border-padding.html box-decoration-break-block-border-padding-ref.html
|
||||
== box-decoration-break-block-margin.html box-decoration-break-block-margin-ref.html
|
||||
|
|
|
@ -136,7 +136,7 @@ random-if(http.oscpu!="Linux\u0020i686") == grid-item-content-baseline-002.html
|
|||
random-if(http.oscpu!="Linux\u0020i686") == grid-item-mixed-baseline-001.html grid-item-mixed-baseline-001-ref.html # ditto
|
||||
random-if(http.oscpu!="Linux\u0020i686") == grid-item-mixed-baseline-002.html grid-item-mixed-baseline-002-ref.html # ditto
|
||||
random-if(http.oscpu!="Linux\u0020i686") == grid-item-mixed-baseline-003.html grid-item-mixed-baseline-003-ref.html # ditto
|
||||
skip-if(!gtkWidget) == grid-item-mixed-baseline-004.html grid-item-mixed-baseline-004-ref.html # ditto.
|
||||
skip-if(!gtkWidget) skip-if(verify) == grid-item-mixed-baseline-004.html grid-item-mixed-baseline-004-ref.html # ditto.
|
||||
== grid-align-content-001.html grid-align-content-001-ref.html
|
||||
== grid-justify-content-001.html grid-justify-content-001-ref.html
|
||||
skip-if(Android&&isDebugBuild) == grid-justify-content-002.html grid-justify-content-002-ref.html # Bug 1245884 - slow
|
||||
|
|
|
@ -5,7 +5,7 @@ fuzzy-if(Android,16,244) fuzzy-if(webrender,47,6) == marker-basic.html marker-ba
|
|||
skip-if(Android) fuzzy-if(webrender,47,18) == bidi-simple.html bidi-simple-ref.html # Fails on Android due to anti-aliasing
|
||||
skip-if(!gtkWidget) fuzzy-if(gtkWidget,2,289) == bidi-simple-scrolled.html bidi-simple-scrolled-ref.html # Fails on Windows and OSX due to anti-aliasing
|
||||
fuzzy-if(Android,24,4000) fuzzy-if(cocoaWidget,1,40) fuzzy-if(asyncPan&&!layersGPUAccelerated,149,1836) == scroll-rounding.html scroll-rounding-ref.html # bug 760264
|
||||
fuzzy(16,454) fails-if(gtkWidget) fuzzy-if(webrender&&!gtkWidget,50-85,459-499) == anonymous-block.html anonymous-block-ref.html # gtkWidget:bug 1309103, fuzzy: subpixel aa
|
||||
fuzzy(16,454) fails-if(gtkWidget) fuzzy-if(webrender&&!gtkWidget,50-85,459-499) skip-if(OSX&&!isDebugBuild&&verify) == anonymous-block.html anonymous-block-ref.html # gtkWidget:bug 1309103, fuzzy: subpixel aa
|
||||
fuzzy-if(webrender,47,3) == false-marker-overlap.html false-marker-overlap-ref.html
|
||||
== visibility-hidden.html visibility-hidden-ref.html
|
||||
fuzzy-if(asyncPan&&!layersGPUAccelerated,102,1724) fuzzy-if(gtkWidget,10,8) fuzzy-if(webrender,47,24) == block-padding.html block-padding-ref.html
|
||||
|
|
|
@ -39,6 +39,3 @@ MOZ_RAW=1
|
|||
MOZ_USE_NATIVE_POPUP_WINDOWS=1
|
||||
|
||||
MOZ_APP_ID={aa3c5121-dab2-40e2-81ca-7ea25febc110}
|
||||
|
||||
# Enable checking that add-ons are signed by the trusted root
|
||||
MOZ_ADDON_SIGNING=1
|
||||
|
|
|
@ -111,6 +111,11 @@ VARCACHE_PREF(
|
|||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
// If true. then the service worker interception and the ServiceWorkerManager
|
||||
// will live in the parent process. This only takes effect on browser start.
|
||||
// Note, this is not currently safe to use for normal browsing yet.
|
||||
PREF("dom.serviceWorkers.parent_intercept", bool, false)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Full-screen prefs
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -1770,8 +1770,12 @@ pref("network.http.focused_window_transaction_ratio", "0.9");
|
|||
|
||||
// Whether or not we give more priority to active tab.
|
||||
// Note that this requires restart for changes to take effect.
|
||||
#ifdef ANDROID
|
||||
// disabled because of bug 1382274
|
||||
pref("network.http.active_tab_priority", false);
|
||||
#else
|
||||
pref("network.http.active_tab_priority", true);
|
||||
// </http>
|
||||
#endif
|
||||
|
||||
// default values for FTP
|
||||
// in a DSCP environment this should be 40 (0x28, or AF11), per RFC-4594,
|
||||
|
@ -2123,7 +2127,12 @@ pref("network.auth.private-browsing-sso", false);
|
|||
|
||||
// Control how throttling of http responses works - number of ms that each
|
||||
// suspend and resume period lasts (prefs named appropriately)
|
||||
#ifdef ANDROID
|
||||
// disabled because of bug 1382274
|
||||
pref("network.http.throttle.enable", false);
|
||||
#else
|
||||
pref("network.http.throttle.enable", true);
|
||||
#endif
|
||||
pref("network.http.throttle.version", 2);
|
||||
|
||||
// V1 prefs
|
||||
|
|
|
@ -9305,6 +9305,34 @@ nsHttpChannel::GetWarningReporter()
|
|||
return mWarningReporter.get();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
class CopyNonDefaultHeaderVisitor final : public nsIHttpHeaderVisitor
|
||||
{
|
||||
nsCOMPtr<nsIHttpChannel> mTarget;
|
||||
|
||||
~CopyNonDefaultHeaderVisitor() = default;
|
||||
|
||||
NS_IMETHOD
|
||||
VisitHeader(const nsACString& aHeader, const nsACString& aValue) override
|
||||
{
|
||||
return mTarget->SetRequestHeader(aHeader, aValue, false /* merge */);
|
||||
}
|
||||
|
||||
public:
|
||||
explicit CopyNonDefaultHeaderVisitor(nsIHttpChannel* aTarget)
|
||||
: mTarget(aTarget)
|
||||
{
|
||||
MOZ_DIAGNOSTIC_ASSERT(mTarget);
|
||||
}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS(CopyNonDefaultHeaderVisitor, nsIHttpHeaderVisitor)
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
nsresult
|
||||
nsHttpChannel::RedirectToInterceptedChannel()
|
||||
{
|
||||
|
@ -9328,6 +9356,23 @@ nsHttpChannel::RedirectToInterceptedChannel()
|
|||
nsIChannelEventSink::REDIRECT_INTERNAL);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Some APIs, like fetch(), allow content to set non-standard headers.
|
||||
// Normally these APIs are responsible for copying these headers across
|
||||
// redirects. In the e10s parent-side intercept case, though, we currently
|
||||
// "hide" the internal redirect to the InterceptedHttpChannel. So the
|
||||
// fetch() API does not have the opportunity to move headers over.
|
||||
// Therefore, we do it automatically here.
|
||||
//
|
||||
// Once child-side interception is removed and the internal redirect no
|
||||
// longer needs to be "hidden", then this header copying code can be
|
||||
// removed.
|
||||
if (ServiceWorkerParentInterceptEnabled()) {
|
||||
nsCOMPtr<nsIHttpHeaderVisitor> visitor =
|
||||
new CopyNonDefaultHeaderVisitor(intercepted);
|
||||
rv = VisitNonDefaultRequestHeaders(visitor);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
mRedirectChannel = intercepted;
|
||||
|
||||
PushRedirectAsyncFunc(
|
||||
|
|
|
@ -4120,10 +4120,6 @@ if test -n "$MOZ_BINARY_EXTENSIONS"; then
|
|||
AC_DEFINE(MOZ_BINARY_EXTENSIONS)
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_ADDON_SIGNING)
|
||||
if test "$MOZ_ADDON_SIGNING" = 1; then
|
||||
AC_DEFINE(MOZ_ADDON_SIGNING)
|
||||
fi
|
||||
AC_SUBST(MOZ_REQUIRE_SIGNING)
|
||||
if test "$MOZ_REQUIRE_SIGNING" = 1; then
|
||||
AC_DEFINE(MOZ_REQUIRE_SIGNING)
|
||||
|
|
|
@ -91,7 +91,6 @@ def build_dict(config, env=os.environ):
|
|||
d['telemetry'] = substs.get('MOZ_TELEMETRY_REPORTING') == '1'
|
||||
d['tests_enabled'] = substs.get('ENABLE_TESTS') == "1"
|
||||
d['bin_suffix'] = substs.get('BIN_SUFFIX', '')
|
||||
d['addon_signing'] = substs.get('MOZ_ADDON_SIGNING') == '1'
|
||||
d['require_signing'] = substs.get('MOZ_REQUIRE_SIGNING') == '1'
|
||||
d['allow_legacy_extensions'] = substs.get('MOZ_ALLOW_LEGACY_EXTENSIONS') == '1'
|
||||
d['official'] = bool(substs.get('MOZILLA_OFFICIAL'))
|
||||
|
|
|
@ -36,6 +36,12 @@ win32/opt:
|
|||
platform: windows2012-32/opt
|
||||
symbol: B
|
||||
tier: 1
|
||||
stub-installer:
|
||||
# Beta and release use a stub-requiring update channel
|
||||
by-project:
|
||||
default: false
|
||||
mozilla-beta: true
|
||||
mozilla-release: true
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
|
||||
worker:
|
||||
max-run-time: 7200
|
||||
|
|
|
@ -19,6 +19,7 @@ web-platform-tests:
|
|||
treeherder-symbol: W(wpt)
|
||||
chunks:
|
||||
by-test-platform:
|
||||
linux.*/debug: 18
|
||||
macosx64/opt: 5
|
||||
macosx64/debug: 10
|
||||
windows10-64-ccov/debug: 15
|
||||
|
|
|
@ -36,14 +36,15 @@ def set_defaults(config, jobs):
|
|||
@transforms.add
|
||||
def stub_installer(config, jobs):
|
||||
for job in jobs:
|
||||
resolve_keyed_by(
|
||||
job, 'stub-installer', item_name=job['name'], project=config.params['project']
|
||||
)
|
||||
job.setdefault('attributes', {})
|
||||
if job.get('stub-installer'):
|
||||
resolve_keyed_by(
|
||||
job, 'stub-installer', item_name=job['name'], project=config.params['project']
|
||||
)
|
||||
job['attributes']['stub-installer'] = job['stub-installer']
|
||||
del job['stub-installer']
|
||||
job['worker']['env'].update({"USE_STUB_INSTALLER": "1"})
|
||||
if 'stub-installer' in job:
|
||||
del job['stub-installer']
|
||||
yield job
|
||||
|
||||
|
||||
|
|
|
@ -18,12 +18,6 @@ config = {
|
|||
("browser/confvars.sh",
|
||||
"MAR_CHANNEL_ID=firefox-mozilla-release",
|
||||
"MAR_CHANNEL_ID=firefox-mozilla-esr"),
|
||||
("build/mozconfig.common",
|
||||
"# Enable checking that add-ons are signed by the trusted root",
|
||||
"# Disable checking that add-ons are signed by the trusted root"),
|
||||
("build/mozconfig.common",
|
||||
"MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-1}",
|
||||
"MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-0}"),
|
||||
("build/mozconfig.common",
|
||||
"# Enable enforcing that add-ons are signed by the trusted root",
|
||||
"# Disable enforcing that add-ons are signed by the trusted root"),
|
||||
|
|
|
@ -3,7 +3,5 @@
|
|||
if os == "win": https://bugzilla.mozilla.org/show_bug.cgi?id=1092458
|
||||
[drawFocusIfNeeded does draw a focus ring if the element is in focus.]
|
||||
expected:
|
||||
if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if not debug and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
|
||||
if not debug and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
[2d.gradient.interpolate.overlap.html]
|
||||
[Canvas test: 2d.gradient.interpolate.overlap]
|
||||
expected:
|
||||
if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
[2d.pattern.image.broken.html]
|
||||
[Canvas test: 2d.pattern.image.broken]
|
||||
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1016482
|
||||
expected:
|
||||
if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
[2d.path.arc.selfintersect.1.html]
|
||||
[arc() with lineWidth > 2*radius is drawn sensibly]
|
||||
expected:
|
||||
if (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[2d.path.arc.shape.3.html]
|
||||
[arc() from 0 to -pi/2 does not draw anything in the wrong quadrant]
|
||||
expected:
|
||||
if (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
[2d.path.rect.zero.3.html]
|
||||
[Canvas test: 2d.path.rect.zero.3]
|
||||
expected:
|
||||
if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
[2d.path.stroke.scale2.html]
|
||||
[Stroke line widths are scaled by the current transformation matrix]
|
||||
expected:
|
||||
if not debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if debug and (os == "win") and (version == "6.2.9200") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if not debug and (os == "win") and (version == "10.0.10240") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
|
|
@ -1,16 +1,2 @@
|
|||
[upgrade.html]
|
||||
[Upgrading an element directly (example from the spec)]
|
||||
expected: FAIL
|
||||
|
||||
[Two elements as children of the upgraded node]
|
||||
expected: FAIL
|
||||
|
||||
[Two elements as descendants of the upgraded node]
|
||||
expected: FAIL
|
||||
|
||||
[Two elements as shadow-including descendants (and not descendants) of the upgraded node]
|
||||
expected: FAIL
|
||||
|
||||
[Elements inside a template contents DocumentFragment node]
|
||||
expected: FAIL
|
||||
|
||||
prefs: [dom.webcomponents.shadowdom.enabled:true]
|
||||
|
|
|
@ -1403,6 +1403,3 @@
|
|||
[HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onunhandledrejection" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[CustomElementRegistry interface: operation upgrade(Node)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -157,7 +157,27 @@ class MockExtension {
|
|||
}
|
||||
}
|
||||
|
||||
function provide(obj, keys, value, override = false) {
|
||||
if (keys.length == 1) {
|
||||
if (!(keys[0] in obj) || override) {
|
||||
obj[keys[0]] = value;
|
||||
}
|
||||
} else {
|
||||
if (!(keys[0] in obj)) {
|
||||
obj[keys[0]] = {};
|
||||
}
|
||||
provide(obj[keys[0]], keys.slice(1), value, override);
|
||||
}
|
||||
}
|
||||
|
||||
var ExtensionTestCommon = class ExtensionTestCommon {
|
||||
static generateManifest(manifest) {
|
||||
provide(manifest, ["name"], "Generated extension");
|
||||
provide(manifest, ["manifest_version"], 2);
|
||||
provide(manifest, ["version"], "1.0");
|
||||
return manifest;
|
||||
}
|
||||
|
||||
/**
|
||||
* This code is designed to make it easy to test a WebExtension
|
||||
* without creating a bunch of files. Everything is contained in a
|
||||
|
@ -194,19 +214,6 @@ var ExtensionTestCommon = class ExtensionTestCommon {
|
|||
|
||||
let files = Object.assign({}, data.files);
|
||||
|
||||
function provide(obj, keys, value, override = false) {
|
||||
if (keys.length == 1) {
|
||||
if (!(keys[0] in obj) || override) {
|
||||
obj[keys[0]] = value;
|
||||
}
|
||||
} else {
|
||||
if (!(keys[0] in obj)) {
|
||||
obj[keys[0]] = {};
|
||||
}
|
||||
provide(obj[keys[0]], keys.slice(1), value, override);
|
||||
}
|
||||
}
|
||||
|
||||
provide(manifest, ["name"], "Generated extension");
|
||||
provide(manifest, ["manifest_version"], 2);
|
||||
provide(manifest, ["version"], "1.0");
|
||||
|
|
|
@ -677,7 +677,7 @@ function checkSystemSection(data) {
|
|||
}
|
||||
|
||||
function checkActiveAddon(data, partialRecord) {
|
||||
let signedState = mozinfo.addon_signing ? "number" : "undefined";
|
||||
let signedState = "number";
|
||||
// system add-ons have an undefined signState
|
||||
if (data.isSystem)
|
||||
signedState = "undefined";
|
||||
|
@ -1218,7 +1218,7 @@ add_task(async function test_addonsAndPlugins() {
|
|||
hasBinaryComponents: false,
|
||||
installDay: ADDON_INSTALL_DATE,
|
||||
updateDay: ADDON_INSTALL_DATE,
|
||||
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
|
||||
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
|
||||
isSystem: false,
|
||||
isWebExtension: true,
|
||||
multiprocessCompatible: true,
|
||||
|
@ -1258,7 +1258,7 @@ add_task(async function test_addonsAndPlugins() {
|
|||
hasBinaryComponents: false,
|
||||
installDay: WEBEXTENSION_ADDON_INSTALL_DATE,
|
||||
updateDay: WEBEXTENSION_ADDON_INSTALL_DATE,
|
||||
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_PRIVILEGED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
|
||||
signedState: AddonManager.SIGNEDSTATE_PRIVILEGED,
|
||||
isSystem: false,
|
||||
isWebExtension: true,
|
||||
multiprocessCompatible: true,
|
||||
|
@ -1375,7 +1375,7 @@ add_task(async function test_signedAddon() {
|
|||
hasBinaryComponents: false,
|
||||
installDay: ADDON_INSTALL_DATE,
|
||||
updateDay: ADDON_INSTALL_DATE,
|
||||
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_SIGNED : AddonManager.SIGNEDSTATE_NOT_REQUIRED,
|
||||
signedState: AddonManager.SIGNEDSTATE_SIGNED,
|
||||
};
|
||||
|
||||
let deferred = PromiseUtils.defer();
|
||||
|
@ -1460,8 +1460,7 @@ add_task(async function test_collectionWithbrokenAddonData() {
|
|||
hasBinaryComponents: false,
|
||||
installDay: ADDON_INSTALL_DATE,
|
||||
updateDay: ADDON_INSTALL_DATE,
|
||||
signedState: mozinfo.addon_signing ? AddonManager.SIGNEDSTATE_MISSING :
|
||||
AddonManager.SIGNEDSTATE_NOT_REQUIRED,
|
||||
signedState: AddonManager.SIGNEDSTATE_MISSING,
|
||||
};
|
||||
|
||||
let receivedNotifications = 0;
|
||||
|
|
|
@ -222,13 +222,6 @@ this.AppConstants = Object.freeze({
|
|||
false,
|
||||
#endif
|
||||
|
||||
MOZ_ADDON_SIGNING:
|
||||
#ifdef MOZ_ADDON_SIGNING
|
||||
true,
|
||||
#else
|
||||
false,
|
||||
#endif
|
||||
|
||||
MOZ_REQUIRE_SIGNING:
|
||||
#ifdef MOZ_REQUIRE_SIGNING
|
||||
true,
|
||||
|
|
|
@ -2053,33 +2053,6 @@ var AddonManagerInternal = {
|
|||
.installTemporaryAddon(aFile);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns an Addon corresponding to an instance ID.
|
||||
* @param aInstanceID
|
||||
* An Addon Instance ID symbol
|
||||
* @return {Promise}
|
||||
* @resolves The found Addon or null if no such add-on exists.
|
||||
* @rejects Never
|
||||
* @throws if the aInstanceID argument is not specified
|
||||
* or the AddonManager is not initialized
|
||||
*/
|
||||
async getAddonByInstanceID(aInstanceID) {
|
||||
return this.syncGetAddonByInstanceID(aInstanceID);
|
||||
},
|
||||
|
||||
syncGetAddonByInstanceID(aInstanceID) {
|
||||
if (!gStarted)
|
||||
throw Components.Exception("AddonManager is not initialized",
|
||||
Cr.NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
if (!aInstanceID || typeof aInstanceID != "symbol")
|
||||
throw Components.Exception("aInstanceID must be a Symbol()",
|
||||
Cr.NS_ERROR_INVALID_ARG);
|
||||
|
||||
return AddonManagerInternal._getProviderByName("XPIProvider")
|
||||
.getAddonByInstanceID(aInstanceID);
|
||||
},
|
||||
|
||||
syncGetAddonIDByInstanceID(aInstanceID) {
|
||||
if (!gStarted)
|
||||
throw Components.Exception("AddonManager is not initialized",
|
||||
|
@ -3371,10 +3344,6 @@ var AddonManager = {
|
|||
return AddonManagerInternal.installTemporaryAddon(aDirectory);
|
||||
},
|
||||
|
||||
getAddonByInstanceID(aInstanceID) {
|
||||
return AddonManagerInternal.getAddonByInstanceID(aInstanceID);
|
||||
},
|
||||
|
||||
addManagerListener(aListener) {
|
||||
AddonManagerInternal.addManagerListener(aListener);
|
||||
},
|
||||
|
|
|
@ -26,8 +26,6 @@ function makeConstant(name, value) {
|
|||
});
|
||||
}
|
||||
|
||||
makeConstant("ADDON_SIGNING", AppConstants.MOZ_ADDON_SIGNING);
|
||||
|
||||
if (AppConstants.MOZ_REQUIRE_SIGNING && !Cu.isInAutomation) {
|
||||
makeConstant("REQUIRE_SIGNING", true);
|
||||
makeConstant("LANGPACKS_REQUIRE_SIGNING", true);
|
||||
|
|
|
@ -749,6 +749,19 @@ var AddonTestUtils = {
|
|||
let XPIScope = ChromeUtils.import("resource://gre/modules/addons/XPIProvider.jsm", null);
|
||||
XPIScope.AsyncShutdown = MockAsyncShutdown;
|
||||
|
||||
XPIScope.XPIInternal.BootstrapScope.prototype
|
||||
._beforeCallBootstrapMethod = (method, params, reason) => {
|
||||
try {
|
||||
this.emit("bootstrap-method", {method, params, reason});
|
||||
} catch (e) {
|
||||
try {
|
||||
this.testScope.do_throw(e);
|
||||
} catch (e) {
|
||||
// Le sigh.
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.addonIntegrationService = Cc["@mozilla.org/addons/integration;1"]
|
||||
.getService(Ci.nsIObserver);
|
||||
|
||||
|
@ -881,7 +894,7 @@ var AddonTestUtils = {
|
|||
_writeProps(obj, props, indent = " ") {
|
||||
let items = [];
|
||||
for (let prop of props) {
|
||||
if (prop in obj)
|
||||
if (obj[prop] !== undefined)
|
||||
items.push(escaped`${indent}<em:${prop}>${obj[prop]}</em:${prop}>\n`);
|
||||
}
|
||||
return items.join("");
|
||||
|
@ -906,12 +919,27 @@ var AddonTestUtils = {
|
|||
},
|
||||
|
||||
createInstallRDF(data) {
|
||||
let defaults = {
|
||||
bootstrap: true,
|
||||
version: "1.0",
|
||||
name: `Test Extension ${data.id}`,
|
||||
targetApplications: [
|
||||
{
|
||||
"id": "xpcshell@tests.mozilla.org",
|
||||
"minVersion": "1",
|
||||
"maxVersion": "64.*",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
var rdf = '<?xml version="1.0"?>\n';
|
||||
rdf += '<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n' +
|
||||
' xmlns:em="http://www.mozilla.org/2004/em-rdf#">\n';
|
||||
|
||||
rdf += '<Description about="urn:mozilla:install-manifest">\n';
|
||||
|
||||
data = Object.assign({}, defaults, data);
|
||||
|
||||
let props = ["id", "version", "type", "internalName", "updateURL",
|
||||
"optionsURL", "optionsType", "aboutURL", "iconURL", "icon64URL",
|
||||
"skinnable", "bootstrap", "strictCompatibility",
|
||||
|
@ -1014,6 +1042,8 @@ var AddonTestUtils = {
|
|||
await OS.File.makeDir(dirPath, {ignoreExisting: true});
|
||||
}
|
||||
|
||||
if (typeof data == "object" && ChromeUtils.getClassName(data) == "Object")
|
||||
data = JSON.stringify(data);
|
||||
if (typeof data == "string")
|
||||
data = new TextEncoder("utf-8").encode(data);
|
||||
|
||||
|
|
|
@ -1681,10 +1681,6 @@ this.XPIDatabase = {
|
|||
});
|
||||
},
|
||||
|
||||
syncGetAddon(aFilter) {
|
||||
return _findAddon(this.addonDB, aFilter);
|
||||
},
|
||||
|
||||
/**
|
||||
* Asynchronously gets an add-on with a particular ID in a particular
|
||||
* install location.
|
||||
|
@ -1722,10 +1718,6 @@ this.XPIDatabase = {
|
|||
return this.getAddon(aAddon => ((aAddon.id == aId) && aAddon.visible));
|
||||
},
|
||||
|
||||
syncGetVisibleAddonForID(aId) {
|
||||
return this.syncGetAddon(aAddon => ((aAddon.id == aId) && aAddon.visible));
|
||||
},
|
||||
|
||||
/**
|
||||
* Asynchronously gets the visible add-ons, optionally restricting by type.
|
||||
*
|
||||
|
@ -1800,26 +1792,6 @@ this.XPIDatabase = {
|
|||
return aAddon ? aAddon.wrapper : null;
|
||||
},
|
||||
|
||||
/**
|
||||
* Synchronously returns the Addon object for the add-on with the
|
||||
* given ID.
|
||||
*
|
||||
* *DO NOT USE THIS IF YOU CAN AT ALL AVOID IT*
|
||||
*
|
||||
* This will always return null if the add-on database has not been
|
||||
* loaded, and the resulting Addon object may not yet include a
|
||||
* reference to its corresponding repository add-on object.
|
||||
*
|
||||
* @param {string} aId
|
||||
* The ID of the add-on to return.
|
||||
* @returns {DBAddonInternal?}
|
||||
* The Addon object, if available.
|
||||
*/
|
||||
syncGetAddonByID(aId) {
|
||||
let aAddon = this.syncGetVisibleAddonForID(aId);
|
||||
return aAddon ? aAddon.wrapper : null;
|
||||
},
|
||||
|
||||
/**
|
||||
* Obtain an Addon having the specified Sync GUID.
|
||||
*
|
||||
|
@ -2570,7 +2542,6 @@ this.XPIDatabaseReconcile = {
|
|||
logger.debug(`Updating compatibility for add-on ${aOldAddon.id} in ${aLocation.name}`);
|
||||
|
||||
let checkSigning = (aOldAddon.signedState === undefined &&
|
||||
AddonSettings.ADDON_SIGNING &&
|
||||
SIGNED_TYPES.has(aOldAddon.type));
|
||||
|
||||
let manifest = null;
|
||||
|
|
|
@ -33,7 +33,6 @@ XPCOMUtils.defineLazyGlobalGetters(this, ["TextDecoder", "TextEncoder", "fetch"]
|
|||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AddonRepository: "resource://gre/modules/addons/AddonRepository.jsm",
|
||||
AddonSettings: "resource://gre/modules/addons/AddonSettings.jsm",
|
||||
AppConstants: "resource://gre/modules/AppConstants.jsm",
|
||||
CertUtils: "resource://gre/modules/CertUtils.jsm",
|
||||
ExtensionData: "resource://gre/modules/Extension.jsm",
|
||||
|
@ -960,9 +959,9 @@ function shouldVerifySignedState(aAddon) {
|
|||
if (aAddon.location.name == KEY_APP_SYSTEM_DEFAULTS)
|
||||
return false;
|
||||
|
||||
// Otherwise only check signatures if signing is enabled and the add-on is one
|
||||
// of the signed types.
|
||||
return AddonSettings.ADDON_SIGNING && XPIDatabase.SIGNED_TYPES.has(aAddon.type);
|
||||
// Otherwise only check signatures if the add-on is one of the signed
|
||||
// types.
|
||||
return XPIDatabase.SIGNED_TYPES.has(aAddon.type);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -192,7 +192,6 @@ function awaitPromise(promise) {
|
|||
if (!success)
|
||||
throw result;
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -832,7 +831,6 @@ class DirectoryLocation extends XPIStateLocation {
|
|||
constructor(name, dir, scope, locked = true) {
|
||||
super(name, dir, scope);
|
||||
this.locked = locked;
|
||||
this.initialized = false;
|
||||
}
|
||||
|
||||
makeInstaller() {
|
||||
|
@ -911,7 +909,6 @@ class DirectoryLocation extends XPIStateLocation {
|
|||
if (!this.dir) {
|
||||
return addons;
|
||||
}
|
||||
this.initialized = true;
|
||||
|
||||
// Use a snapshot of the directory contents to avoid possible issues with
|
||||
// iterating over a directory while removing files from it (the YAFFS2
|
||||
|
@ -1585,6 +1582,8 @@ class BootstrapScope {
|
|||
} else {
|
||||
logger.debug(`Calling bootstrap method ${aMethod} on ${addon.id} version ${addon.version}`);
|
||||
|
||||
this._beforeCallBootstrapMethod(aMethod, params, aReason);
|
||||
|
||||
try {
|
||||
result = method.call(scope, params, aReason);
|
||||
} catch (e) {
|
||||
|
@ -1608,6 +1607,9 @@ class BootstrapScope {
|
|||
}
|
||||
}
|
||||
|
||||
// No-op method to be overridden by tests.
|
||||
_beforeCallBootstrapMethod() {}
|
||||
|
||||
/**
|
||||
* Loads a bootstrapped add-on's bootstrap.js into a sandbox and the reason
|
||||
* values as constants in the scope.
|
||||
|
@ -1854,8 +1856,6 @@ var XPIProvider = {
|
|||
|
||||
// A Map of active addons to their bootstrapScope by ID
|
||||
activeAddons: new Map(),
|
||||
// True if the platform could have activated extensions
|
||||
extensionsActive: false,
|
||||
// Per-addon telemetry information
|
||||
_telemetryDetails: {},
|
||||
// Have we started shutting down bootstrap add-ons?
|
||||
|
@ -2234,8 +2234,6 @@ var XPIProvider = {
|
|||
|
||||
AddonManagerPrivate.recordTimestamp("XPI_startup_end");
|
||||
|
||||
this.extensionsActive = true;
|
||||
|
||||
timerManager.registerTimer("xpi-signature-verification", () => {
|
||||
XPIDatabase.verifySignatures();
|
||||
}, XPI_SIGNATURE_CHECK_PERIOD);
|
||||
|
@ -2280,9 +2278,6 @@ var XPIProvider = {
|
|||
await XPIDatabase.asyncLoadDB();
|
||||
}
|
||||
|
||||
// This is needed to allow xpcshell tests to simulate a restart
|
||||
this.extensionsActive = false;
|
||||
|
||||
await XPIDatabase.shutdown();
|
||||
},
|
||||
|
||||
|
@ -2579,7 +2574,7 @@ var XPIProvider = {
|
|||
|
||||
let addons = await Promise.all(
|
||||
Array.from(XPIStates.sideLoadedAddons.keys(),
|
||||
id => AddonManager.getAddonByID(id)));
|
||||
id => this.getAddonByID(id)));
|
||||
|
||||
return addons.filter(addon => (addon.seen === false &&
|
||||
addon.permissions & AddonManager.PERM_CAN_ENABLE));
|
||||
|
@ -2620,25 +2615,6 @@ var XPIProvider = {
|
|||
XPIStates.save();
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns an Addon corresponding to an instance ID.
|
||||
*
|
||||
* @param {Symbol} aInstanceID
|
||||
* An Addon Instance ID
|
||||
*
|
||||
* @returns {AddonInternal?}
|
||||
*
|
||||
* @throws if the aInstanceID argument is not valid.
|
||||
*/
|
||||
getAddonByInstanceID(aInstanceID) {
|
||||
let id = this.getAddonIDByInstanceID(aInstanceID);
|
||||
if (id) {
|
||||
return XPIDatabase.syncGetAddonByID(id);
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
getAddonIDByInstanceID(aInstanceID) {
|
||||
if (!aInstanceID || typeof aInstanceID != "symbol")
|
||||
throw Components.Exception("aInstanceID must be a Symbol()",
|
||||
|
@ -2670,29 +2646,19 @@ var XPIProvider = {
|
|||
async getActiveAddons(aTypes) {
|
||||
// If we already have the database loaded, returning full info is fast.
|
||||
if (this.isDBLoaded) {
|
||||
let addons = await XPIProvider.getAddonsByTypes(aTypes);
|
||||
let addons = await this.getAddonsByTypes(aTypes);
|
||||
return {
|
||||
addons: addons.filter(addon => addon.isActive),
|
||||
fullData: true,
|
||||
};
|
||||
}
|
||||
|
||||
// Construct addon-like objects with the information we already
|
||||
// have in memory.
|
||||
if (!XPIStates.db) {
|
||||
throw new Error("XPIStates not yet initialized");
|
||||
}
|
||||
|
||||
let result = [];
|
||||
for (let addon of XPIStates.enabledAddons()) {
|
||||
if (aTypes && !aTypes.includes(addon.type)) {
|
||||
continue;
|
||||
}
|
||||
let {location} = addon;
|
||||
let scope, isSystem;
|
||||
if (location) {
|
||||
({scope, isSystem} = location);
|
||||
}
|
||||
let {scope, isSystem} = addon.location;
|
||||
result.push({
|
||||
id: addon.id,
|
||||
version: addon.version,
|
||||
|
|
|
@ -1,20 +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/.
|
||||
|
||||
ADDONSRC = $(srcdir)/addons
|
||||
TESTROOT = $(CURDIR)/$(DEPTH)/_tests/xpcshell/$(relativesrcdir)
|
||||
TESTXPI = $(TESTROOT)/xpcshell/addons
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
libs::
|
||||
rm -rf $(TESTXPI)
|
||||
$(NSINSTALL) -D $(TESTXPI)
|
||||
if [ -d $(ADDONSRC) ]; then \
|
||||
$(EXIT_ON_ERROR) \
|
||||
for dir in $(ADDONSRC)/*; do \
|
||||
base=`basename $$dir` ; \
|
||||
(cd $$dir && zip -qr $(TESTXPI)/$$base.xpi *) \
|
||||
done \
|
||||
fi
|
|
@ -1,30 +0,0 @@
|
|||
/* exported startup, shutdown, install, uninstall */
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
var seenGlobals = new Set();
|
||||
var scope = this;
|
||||
function checkGlobal(name, type) {
|
||||
if (scope[name] && typeof(scope[name]) == type)
|
||||
seenGlobals.add(name);
|
||||
}
|
||||
|
||||
var wrapped = {};
|
||||
Services.obs.notifyObservers({ wrappedJSObject: wrapped }, "bootstrap-request-globals");
|
||||
for (let [name, type] of wrapped.expectedGlobals) {
|
||||
checkGlobal(name, type);
|
||||
}
|
||||
|
||||
function install(data, reason) {
|
||||
}
|
||||
|
||||
function startup(data, reason) {
|
||||
Services.obs.notifyObservers({
|
||||
wrappedJSObject: seenGlobals
|
||||
}, "bootstrap-seen-globals");
|
||||
}
|
||||
|
||||
function shutdown(data, reason) {
|
||||
}
|
||||
|
||||
function uninstall(data, reason) {
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>bootstrap_globals@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Bootstrap Globals</em:name>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1 +0,0 @@
|
|||
message-browser = Value from Browser
|
|
@ -1 +0,0 @@
|
|||
message = Value from .properties
|
|
@ -1 +0,0 @@
|
|||
message-id1 = Value 1
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"name": "und Language Pack",
|
||||
"version": "1.0",
|
||||
"manifest_version": 2,
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "langpack-und@test.mozilla.org",
|
||||
"strict_min_version": "58.0",
|
||||
"strict_max_version": "58.*"
|
||||
}
|
||||
},
|
||||
"sources": {
|
||||
"browser": {
|
||||
"base_path": "browser/"
|
||||
}
|
||||
},
|
||||
"langpack_id": "und",
|
||||
"version": "1",
|
||||
"languages": {
|
||||
"und": {
|
||||
"chrome_resources": {
|
||||
"global": "chrome/und/locale/und/global/"
|
||||
},
|
||||
"version": "20171001190118"
|
||||
}
|
||||
},
|
||||
"author": "Mozilla Localization Task Force",
|
||||
"description": "Language pack for Testy for und"
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
ChromeUtils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this);
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>bootstrap1@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
<em:multiprocessCompatible>true</em:multiprocessCompatible>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Bootstrap 1</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:iconURL>chrome://foo/skin/icon.png</em:iconURL>
|
||||
<em:aboutURL>chrome://foo/content/about.xul</em:aboutURL>
|
||||
<em:optionsURL>chrome://foo/content/options.xul</em:optionsURL>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,3 +0,0 @@
|
|||
var EXPORTED_SYMBOLS = ["VERSION"];
|
||||
|
||||
var VERSION = 1;
|
|
@ -1 +0,0 @@
|
|||
ChromeUtils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this);
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>bootstrap1@tests.mozilla.org</em:id>
|
||||
<em:version>2.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Bootstrap 1</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,3 +0,0 @@
|
|||
var EXPORTED_SYMBOLS = ["VERSION"];
|
||||
|
||||
var VERSION = 2;
|
|
@ -1,6 +0,0 @@
|
|||
/* exported install */
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const install = function() {
|
||||
Services.obs.notifyObservers(null, "addon-install");
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>bootstrap@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Bootstrap</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>bug567173</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Bug 567173</em:name>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,70 +0,0 @@
|
|||
const CERTDB_CONTRACTID = "@mozilla.org/security/x509certdb;1";
|
||||
const CERTDB_CID = Components.ID("{fb0bbc5c-452e-4783-b32c-80124693d871}");
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
const CERT = `MIIDITCCAgmgAwIBAgIJALAv8fydd6nBMA0GCSqGSIb3DQEBBQUAMCcxJTAjBgNV
|
||||
BAMMHGJvb3RzdHJhcDFAdGVzdHMubW96aWxsYS5vcmcwHhcNMTYwMjAyMjMxNjUy
|
||||
WhcNMjYwMTMwMjMxNjUyWjAnMSUwIwYDVQQDDBxib290c3RyYXAxQHRlc3RzLm1v
|
||||
emlsbGEub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5caNuLTu
|
||||
H8dEqNntLlhKi4y09hrgcF3cb6n5Xx9DIHA8CKiZxt9qGXKeeiDwEiiQ8ibJYzdc
|
||||
jLkbzJUyPVUaH9ygrWynSpSTOvv/Ys3+ERrCo9W7Zuzwdmzt6TTEjFMS4lVx06us
|
||||
3uUqkdp3JMgCqCEbOFZiztICiSKrp8QFJkAfApZzBqmJOPOWH0yZ2CRRzvbQZ6af
|
||||
hqQDUalJQjWfsenyUWphhbREqExetxHJFR3OrmJt/shXVyz6dD7TBuE3PPUh1RpE
|
||||
3ejVufcTzjV3XmK79PxsKLM9V2+ww9e9V3OET57kyvn+bpSWdUYm3X4DA8dxNW6+
|
||||
kTFWRnQNZ+zQVQIDAQABo1AwTjAdBgNVHQ4EFgQUac36ccv+99N5HxYa8dCDYRaF
|
||||
HNQwHwYDVR0jBBgwFoAUac36ccv+99N5HxYa8dCDYRaFHNQwDAYDVR0TBAUwAwEB
|
||||
/zANBgkqhkiG9w0BAQUFAAOCAQEAFfu3MN8EtY5wcxOFdGShOmGQPm2MJJVE6MG+
|
||||
p4RqHrukHZSgKOyWjkRk7t6NXzNcnHco9HFv7FQRAXSJ5zObmyu+TMZlu4jHHCav
|
||||
GMcV3C/4SUGtlipZbgNe00UAIm6tM3Wh8dr38W7VYg4KGAwXou5XhQ9gCAnSn90o
|
||||
H/42NqHTjJsR4v18izX2aO25ARQdMby7Lsr5j9RqweHywiSlPusFcKRseqOnIP0d
|
||||
JT3+qh78LeMbNBO2mYD3SP/zu0TAmkAVNcj2KPw0+a0kVZ15rvslPC/K3xn9msMk
|
||||
fQthv3rDAcsWvi9YO7T+vylgZBgJfn1ZqpQqy58xN96uh6nPOw==`;
|
||||
|
||||
function overrideCertDB() {
|
||||
// Unregister the real database.
|
||||
let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
|
||||
let factory = registrar.getClassObject(CERTDB_CID, Ci.nsIFactory);
|
||||
registrar.unregisterFactory(CERTDB_CID, factory);
|
||||
|
||||
// Get the real DB
|
||||
let realCertDB = factory.createInstance(null, Ci.nsIX509CertDB);
|
||||
|
||||
let fakeCert = realCertDB.constructX509FromBase64(CERT.replace(/\n/g, ""));
|
||||
|
||||
let fakeCertDB = {
|
||||
openSignedAppFileAsync(root, file, callback) {
|
||||
callback.openSignedAppFileFinished(Cr.NS_OK, null, fakeCert);
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIX509CertDB])
|
||||
};
|
||||
|
||||
for (let property of Object.keys(realCertDB)) {
|
||||
if (property in fakeCertDB) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typeof realCertDB[property] == "function") {
|
||||
fakeCertDB[property] = realCertDB[property].bind(realCertDB);
|
||||
}
|
||||
}
|
||||
|
||||
let certDBFactory = {
|
||||
createInstance(outer, iid) {
|
||||
if (outer != null) {
|
||||
throw Cr.NS_ERROR_NO_AGGREGATION;
|
||||
}
|
||||
return fakeCertDB.QueryInterface(iid);
|
||||
}
|
||||
};
|
||||
registrar.registerFactory(CERTDB_CID, "CertDB",
|
||||
CERTDB_CONTRACTID, certDBFactory);
|
||||
|
||||
const scope = ChromeUtils.import("resource://gre/modules/addons/XPIProvider.jsm", {});
|
||||
scope.gCertDB = fakeCertDB;
|
||||
}
|
||||
|
||||
function install() { // eslint-disable-line no-unused-vars
|
||||
overrideCertDB();
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>bootstrap1@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
<em:multiprocessCompatible>true</em:multiprocessCompatible>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Bootstrap 1</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,11 +0,0 @@
|
|||
/* exported startup, shutdown, install, ADDON_ID */
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
|
||||
|
||||
const ADDON_ID = "test_delay_update_complete@tests.mozilla.org";
|
||||
|
||||
function install(data, reason) {}
|
||||
|
||||
function startup(data, reason) {}
|
||||
|
||||
function shutdown(data, reason) {}
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>test_delay_update_complete@tests.mozilla.org</em:id>
|
||||
<em:version>2.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Delay Update Complete</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:iconURL>chrome://foo/skin/icon.png</em:iconURL>
|
||||
<em:aboutURL>chrome://foo/content/about.xul</em:aboutURL>
|
||||
<em:optionsURL>chrome://foo/content/options.xul</em:optionsURL>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Delay Upgrade",
|
||||
"version": "2.0",
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "test_delay_update_complete_webext@tests.mozilla.org"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
/* exported startup, shutdown, install, ADDON_ID */
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
|
||||
|
||||
const ADDON_ID = "test_delay_update_defer@tests.mozilla.org";
|
||||
|
||||
function install(data, reason) {}
|
||||
|
||||
function startup(data, reason) {}
|
||||
|
||||
function shutdown(data, reason) {}
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>test_delay_update_defer@tests.mozilla.org</em:id>
|
||||
<em:version>2.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Delay Update Defer</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:iconURL>chrome://foo/skin/icon.png</em:iconURL>
|
||||
<em:aboutURL>chrome://foo/content/about.xul</em:aboutURL>
|
||||
<em:optionsURL>chrome://foo/content/options.xul</em:optionsURL>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Delay Upgrade",
|
||||
"version": "2.0",
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "test_delay_update_defer_webext@tests.mozilla.org"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
/* exported startup, shutdown, install */
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
|
||||
|
||||
function install(data, reason) {}
|
||||
|
||||
function startup(data, reason) {}
|
||||
|
||||
function shutdown(data, reason) {}
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>test_delay_update_ignore@tests.mozilla.org</em:id>
|
||||
<em:version>2.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Delay Update Ignore</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:iconURL>chrome://foo/skin/icon.png</em:iconURL>
|
||||
<em:aboutURL>chrome://foo/content/about.xul</em:aboutURL>
|
||||
<em:optionsURL>chrome://foo/content/options.xul</em:optionsURL>
|
||||
<em:updateURL>http://localhost:4444/data/test_delay_updates_ignore.rdf</em:updateURL>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Delay Upgrade",
|
||||
"version": "2.0",
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "test_delay_update_ignore_webext@tests.mozilla.org"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
content dict ./
|
|
@ -1,2 +0,0 @@
|
|||
1
|
||||
test1
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>ab-CD@dictionaries.addons.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
<em:type>64</em:type>
|
||||
<em:unpack>true</em:unpack>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Dictionary</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>ab-CD@dictionaries.addons.mozilla.org</em:id>
|
||||
<em:version>2.0</em:version>
|
||||
<em:type>64</em:type>
|
||||
<em:unpack>true</em:unpack>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Dictionary</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>ef@dictionaries.addons.mozilla.org</em:id>
|
||||
<em:version>2.0</em:version>
|
||||
<em:unpack>true</em:unpack>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Dictionary ef</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>gh@dictionaries.addons.mozilla.org</em:id>
|
||||
<em:version>2.0</em:version>
|
||||
<em:type>64</em:type>
|
||||
<em:unpack>true</em:unpack>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Dictionary gh</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,23 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>addon1@tests.mozilla.org</em:id>
|
||||
<em:version>2.0</em:version>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Distributed add-ons test</em:name>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>5</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1 +0,0 @@
|
|||
Dummy icon file
|
|
@ -1,23 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>addon1@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test 1</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1 +0,0 @@
|
|||
Dummy file in subdirectory
|
|
@ -1 +0,0 @@
|
|||
Fake icon image
|
|
@ -1 +0,0 @@
|
|||
Fake icon image
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- An extension that is compatible with the XPCShell test suite -->
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>addon1@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test 1</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,62 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>addon1@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
<em:localized>
|
||||
<Description em:locale="fr-FR">
|
||||
<em:locale/> <!-- Should be ignored and not fail -->
|
||||
<em:name>fr-FR Name</em:name>
|
||||
<em:description>fr-FR Description</em:description>
|
||||
<em:contributor>Fr Contributor 1</em:contributor>
|
||||
<em:contributor>Fr Contributor 2</em:contributor>
|
||||
<em:contributor>Fr Contributor 3</em:contributor>
|
||||
</Description>
|
||||
</em:localized>
|
||||
|
||||
<em:localized>
|
||||
<Description em:locale="de-DE">
|
||||
<em:name>de-DE Name</em:name>
|
||||
</Description>
|
||||
</em:localized>
|
||||
|
||||
<em:localized>
|
||||
<Description em:locale="es-ES">
|
||||
<em:name>es-ES Name</em:name>
|
||||
<em:description>es-ES Description</em:description>
|
||||
</Description>
|
||||
</em:localized>
|
||||
|
||||
<!-- Subsequent definitions for the same locale should be ignored -->
|
||||
<em:localized>
|
||||
<Description em:locale="fr-FR">
|
||||
<em:name>Repeated locale</em:name>
|
||||
</Description>
|
||||
</em:localized>
|
||||
|
||||
<!-- Properties with no listed locale should be ignored -->
|
||||
<em:localized>
|
||||
<Description>
|
||||
<em:name>Missing locale</em:name>
|
||||
</Description>
|
||||
</em:localized>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Fallback Name</em:name>
|
||||
<em:description>Fallback Description</em:description>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,63 +0,0 @@
|
|||
/* exported startup, shutdown, install, uninstall, ADDON_ID */
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
|
||||
|
||||
const PASS_PREF = "symboltest.instanceid.pass";
|
||||
const FAIL_BOGUS_PREF = "symboltest.instanceid.fail_bogus";
|
||||
const FAIL_ID_PREF = "symboltest.instanceid.fail_bogus";
|
||||
const ADDON_ID = "test_symbol@tests.mozilla.org";
|
||||
|
||||
function install(data, reason) {}
|
||||
|
||||
// normally we would use BootstrapMonitor here, but we need a reference to
|
||||
// the symbol inside `XPIProvider.jsm`.
|
||||
function startup(data, reason) {
|
||||
Services.prefs.setBoolPref(PASS_PREF, false);
|
||||
Services.prefs.setBoolPref(FAIL_BOGUS_PREF, false);
|
||||
Services.prefs.setBoolPref(FAIL_ID_PREF, false);
|
||||
|
||||
// test with the correct symbol
|
||||
if (data.hasOwnProperty("instanceID") && data.instanceID) {
|
||||
AddonManager.getAddonByInstanceID(data.instanceID)
|
||||
.then(addon => {
|
||||
if (addon.id == ADDON_ID) {
|
||||
Services.prefs.setBoolPref(PASS_PREF, true);
|
||||
}
|
||||
}).catch(err => {
|
||||
throw Error("no addon found for symbol");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// test with a totally bogus symbol
|
||||
AddonManager.getAddonByInstanceID(Symbol("bad symbol"))
|
||||
.then(addon => {
|
||||
// there is no symbol by this name, so null should be returned
|
||||
if (addon == null) {
|
||||
Services.prefs.setBoolPref(FAIL_BOGUS_PREF, true);
|
||||
} else {
|
||||
throw Error("bad symbol should not match:", addon);
|
||||
}
|
||||
}).catch(err => {
|
||||
throw Error("promise should not have rejected: " + err);
|
||||
});
|
||||
|
||||
// try to make a matching symbol - this should fail because it's not a
|
||||
// reference to the same symbol stored inside the addons manager.
|
||||
AddonManager.getAddonByInstanceID(Symbol(ADDON_ID))
|
||||
.then(addon => {
|
||||
// there is no symbol by this name, so null should be returned
|
||||
if (addon == null) {
|
||||
Services.prefs.setBoolPref(FAIL_ID_PREF, true);
|
||||
} else {
|
||||
throw Error("bad symbol should not match:", addon);
|
||||
}
|
||||
}).catch(err => {
|
||||
throw Error("promise should not have rejected: " + err);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function shutdown(data, reason) {}
|
||||
|
||||
function uninstall(data, reason) {}
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>test_symbol@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Symbol</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:iconURL>chrome://foo/skin/icon.png</em:iconURL>
|
||||
<em:aboutURL>chrome://foo/content/about.xul</em:aboutURL>
|
||||
<em:optionsURL>chrome://foo/content/options.xul</em:optionsURL>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1 +0,0 @@
|
|||
ChromeUtils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this);
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>incompatible@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Incompatible Addon</em:name>
|
||||
<em:description>I am incompatible</em:description>
|
||||
|
||||
<em:iconURL>chrome://foo/skin/icon.png</em:iconURL>
|
||||
<em:aboutURL>chrome://foo/content/about.xul</em:aboutURL>
|
||||
<em:optionsURL>chrome://foo/content/options.xul</em:optionsURL>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>2</em:minVersion>
|
||||
<em:maxVersion>2</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1 +0,0 @@
|
|||
ChromeUtils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this);
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>undouninstall1@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Bootstrap 1</em:name>
|
||||
<em:description>Test Description</em:description>
|
||||
|
||||
<em:iconURL>chrome://foo/skin/icon.png</em:iconURL>
|
||||
<em:aboutURL>chrome://foo/content/about.xul</em:aboutURL>
|
||||
<em:optionsURL>chrome://foo/content/options.xul</em:optionsURL>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
|
@ -1,6 +0,0 @@
|
|||
/* exported startup, shutdown, install, uninstall */
|
||||
|
||||
function install(data, reason) {}
|
||||
function startup(data, reason) {}
|
||||
function shutdown(data, reason) {}
|
||||
function uninstall(data, reason) {}
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче