Merge inbound to m-c

This commit is contained in:
Wes Kocher 2013-09-25 20:25:06 -07:00
commit d23c887db8
345 changed files with 3890 additions and 1873 deletions

View File

@ -5,7 +5,13 @@
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
ac_add_options --enable-update-packaging
ac_add_options --enable-jemalloc
ac_add_options --with-google-api-keyfile=/e/builds/gapi.data
if [ -f /c/builds/gapi.data ]; then
_gapi_keyfile=/c/builds/gapi.data
else
_gapi_keyfile=/e/builds/gapi.data
fi
ac_add_options --with-google-api-keyfile=${_gapi_keyfile}
# Needed to enable breakpad in application.ini
export MOZILLA_OFFICIAL=1

View File

@ -5,7 +5,12 @@
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
ac_add_options --enable-update-packaging
ac_add_options --enable-jemalloc
ac_add_options --with-google-api-keyfile=/e/builds/gapi.data
if [ -f /c/builds/gapi.data ]; then
_gapi_keyfile=/c/builds/gapi.data
else
_gapi_keyfile=/e/builds/gapi.data
fi
ac_add_options --with-google-api-keyfile=${_gapi_keyfile}
# Needed to enable breakpad in application.ini
export MOZILLA_OFFICIAL=1

View File

@ -757,7 +757,7 @@ nsFrameMessageManager::ReceiveMessage(nsISupports* aTarget,
for (uint32_t i = 0; i < mListeners.Length(); ++i) {
// Remove mListeners[i] if it's an expired weak listener.
nsCOMPtr<nsIMessageListener> weakListener;
nsCOMPtr<nsISupports> weakListener;
if (mListeners[i].mWeakListener) {
weakListener = do_QueryReferent(mListeners[i].mWeakListener);
if (!weakListener) {

View File

@ -2538,6 +2538,23 @@ nsDOMWindowUtils::GetOuterWindowWithId(uint64_t aWindowID,
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::GetContainerElement(nsIDOMElement** aResult)
{
if (!nsContentUtils::IsCallerChrome()) {
return NS_ERROR_DOM_SECURITY_ERR;
}
nsCOMPtr<nsPIDOMWindow> window = do_QueryReferent(mWindow);
NS_ENSURE_STATE(window);
nsCOMPtr<nsIDOMElement> element =
do_QueryInterface(window->GetFrameElementInternal());
element.forget(aResult);
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::WrapDOMFile(nsIFile *aFile,
nsIDOMFile **aDOMFile)

View File

@ -1378,19 +1378,12 @@ InitIds(JSContext* cx, const Prefable<Spec>* prefableSpecs, jsid* ids)
bool
QueryInterface(JSContext* cx, unsigned argc, JS::Value* vp);
template <class T, bool isISupports=IsBaseOf<nsISupports, T>::value>
template <class T>
struct
WantsQueryInterface
{
static bool Enabled(JSContext* aCx, JSObject* aGlobal)
{
return false;
}
};
template <class T>
struct
WantsQueryInterface<T, true>
{
static_assert(IsBaseOf<nsISupports, T>::value,
"QueryInterface can't work without an nsISupports.");
static bool Enabled(JSContext* aCx, JSObject* aGlobal)
{
return NS_IsMainThread() && IsChromeOrXBL(aCx, aGlobal);

View File

@ -30,8 +30,6 @@
# true for workers, false otherwise).
# * customFinalize - The native class will use a custom finalize hook
# (defaults to true for workers, false otherwise).
# * wantsQI - Indicates whether the interface should have a QueryInterface
# method available to chrome.
# * notflattened - The native type does not have nsIClassInfo, so when
# wrapping it the right IID needs to be passed in.
# * register - True if this binding should be registered. Defaults to true.
@ -318,7 +316,6 @@ DOMInterfaces = {
},
'DOMException': {
'wantsQI': False,
'binaryNames': {
'message': 'messageMoz',
},
@ -395,7 +392,6 @@ DOMInterfaces = {
'Exception': {
'headerFile': 'mozilla/dom/DOMException.h',
'wantsQI': False,
'binaryNames': {
'message': 'messageMoz',
},
@ -660,7 +656,6 @@ DOMInterfaces = {
'ImageData': [
{
'wrapperCache': False,
'wantsQI': False,
}],
'InputStream': [

View File

@ -1462,6 +1462,41 @@ class MethodDefiner(PropertyDefiner):
self.chrome = []
self.regular = []
for m in methods:
if m.identifier.name == 'queryInterface':
if self.descriptor.workers:
continue
if m.isStatic():
raise TypeError("Legacy queryInterface member shouldn't be static")
signatures = m.signatures()
def argTypeIsIID(arg):
return arg.type.inner.isExternal() and arg.type.inner.identifier.name == 'IID'
if len(signatures) > 1 or len(signatures[0][1]) > 1 or not argTypeIsIID(signatures[0][1][0]):
raise TypeError("There should be only one queryInterface method with 1 argument of type IID")
# Make sure to not stick QueryInterface on abstract interfaces that
# have hasXPConnectImpls (like EventTarget). So only put it on
# interfaces that are concrete and all of whose ancestors are abstract.
def allAncestorsAbstract(iface):
if not iface.parent:
return True
desc = self.descriptor.getDescriptor(iface.parent.identifier.name)
if desc.concrete:
return False
return allAncestorsAbstract(iface.parent)
if (not self.descriptor.interface.hasInterfacePrototypeObject() or
not self.descriptor.concrete or
not allAncestorsAbstract(self.descriptor.interface)):
raise TypeError("QueryInterface is only supported on "
"interfaces that are concrete and all "
"of whose ancestors are abstract: " +
self.descriptor.name)
condition = "WantsQueryInterface<%s>::Enabled" % descriptor.nativeType
self.regular.append({"name": 'QueryInterface',
"methodInfo": False,
"length": 1,
"flags": "0",
"condition": MemberCondition(None, condition) })
continue
method = { "name": m.identifier.name,
"methodInfo": not m.isStatic(),
"length": methodLength(m),
@ -1481,14 +1516,6 @@ class MethodDefiner(PropertyDefiner):
"flags": "JSPROP_ENUMERATE",
"condition": MemberCondition(None, None) })
if not static and descriptor.wantsQI():
condition = "WantsQueryInterface<%s>::Enabled" % descriptor.nativeType
self.regular.append({"name": 'QueryInterface',
"methodInfo": False,
"length": 1,
"flags": "0",
"condition": MemberCondition(None, condition) })
if not static:
stringifier = descriptor.operations['Stringifier']
if stringifier:
@ -7860,6 +7887,8 @@ class CGDescriptor(CGThing):
cgThings.append(CGClassConstructor(descriptor, n,
NamedConstructorName(n)))
for m in descriptor.interface.members:
if m.isMethod() and m.identifier.name == 'queryInterface':
continue
if (m.isMethod() and m == descriptor.operations['Jsonifier']):
hasJsonifier = True
hasMethod = True

View File

@ -356,8 +356,6 @@ class Descriptor(DescriptorProvider):
(self.interface.identifier.name, self.nativeOwnership))
self.customTrace = desc.get('customTrace', self.workers)
self.customFinalize = desc.get('customFinalize', self.workers)
if desc.get('wantsQI', None) != None:
self._wantsQI = desc.get('wantsQI', None)
self.wrapperCache = (not self.interface.isCallback() and
(self.nativeOwnership == 'worker' or
(self.nativeOwnership != 'owned' and
@ -477,26 +475,6 @@ class Descriptor(DescriptorProvider):
any((m.isAttr() or m.isMethod()) and m.isStatic() for m
in self.interface.members))
def wantsQI(self):
# If it was specified explicitly use that.
if hasattr(self, '_wantsQI'):
return self._wantsQI
# Make sure to not stick QueryInterface on abstract interfaces that
# have hasXPConnectImpls (like EventTarget). So only put it on
# interfaces that are concrete and all of whose ancestors are abstract.
def allAncestorsAbstract(iface):
if not iface.parent:
return True
desc = self.getDescriptor(iface.parent.identifier.name)
if desc.concrete:
return False
return allAncestorsAbstract(iface.parent)
return (not self.workers and
self.interface.hasInterfacePrototypeObject() and
self.concrete and
allAncestorsAbstract(self.interface))
# Some utility methods
def getTypesFromDescriptor(descriptor):
"""

View File

@ -0,0 +1,6 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
MOCHITEST_FILES := \
test_historical.html.json \
test_interfaces.html.json \
$(NULL)

View File

@ -0,0 +1,5 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
MOCHITEST_FILES := \
test_HTMLCollection-empty-name.html.json \
$(NULL)

View File

@ -0,0 +1,9 @@
{
"Empty string as a name for Document.getElementsByTagName": true,
"Empty string as a name for Element.getElementsByTagName": true,
"Empty string as a name for Document.getElementsByTagNameNS": true,
"Empty string as a name for Element.getElementsByTagNameNS": true,
"Empty string as a name for Document.getElementsByClassName": true,
"Empty string as a name for Element.getElementsByClassName": true,
"Empty string as a name for Element.children": true
}

View File

@ -1,5 +1,5 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
MOCHITEST_FILES := \
test_document-dir.html.json \
test_exceptions.html.json \
$(NULL)

View File

@ -0,0 +1,4 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
DIRS += [
]

View File

@ -0,0 +1,4 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
DIRS += [
]

View File

@ -0,0 +1,14 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
MOCHITEST_FILES := \
test_Document-createElement-namespace.html.json \
test_Document-createElementNS.html.json \
test_Document-createEvent.html.json \
test_Document-getElementsByTagName.html.json \
test_Node-isEqualNode.xhtml.json \
test_Node-properties.html.json \
test_attributes.html.json \
test_case.html.json \
test_getElementsByClassName-10.xml.json \
test_getElementsByClassName-11.xml.json \
$(NULL)

View File

@ -0,0 +1,4 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
DIRS += [
]

View File

@ -0,0 +1,12 @@
{
"Created element's namespace in empty.xml": true,
"Created element's namespace in xhtml.xml": true,
"Created element's namespace in svg.xml": true,
"Created element's namespace in mathml.xml": true,
"Created element's namespace in minimal_html.xml": true,
"Created element's namespace in xhtml_ns_removed.xml": true,
"Created element's namespace in xhtml_ns_changed.xml": true,
"Created element's namespace in bare_xhtml.xml": true,
"Created element's namespace in bare_svg.xml": true,
"Created element's namespace in bare_mathml.xml": true
}

View File

@ -0,0 +1,26 @@
{
"createEvent('CustomEvent') should be initialized correctly.": true,
"createEvent('customevent') should be initialized correctly.": true,
"createEvent('CUSTOMEVENT') should be initialized correctly.": true,
"createEvent('Event') should be initialized correctly.": true,
"createEvent('event') should be initialized correctly.": true,
"createEvent('EVENT') should be initialized correctly.": true,
"createEvent('Events') should be initialized correctly.": true,
"createEvent('events') should be initialized correctly.": true,
"createEvent('EVENTS') should be initialized correctly.": true,
"createEvent('HTMLEvents') should be initialized correctly.": true,
"createEvent('htmlevents') should be initialized correctly.": true,
"createEvent('HTMLEVENTS') should be initialized correctly.": true,
"createEvent('MouseEvent') should be initialized correctly.": true,
"createEvent('mouseevent') should be initialized correctly.": true,
"createEvent('MOUSEEVENT') should be initialized correctly.": true,
"createEvent('MouseEvents') should be initialized correctly.": true,
"createEvent('mouseevents') should be initialized correctly.": true,
"createEvent('MOUSEEVENTS') should be initialized correctly.": true,
"createEvent('UIEvent') should be initialized correctly.": true,
"createEvent('uievent') should be initialized correctly.": true,
"createEvent('UIEVENT') should be initialized correctly.": true,
"createEvent('UIEvents') should be initialized correctly.": true,
"createEvent('uievents') should be initialized correctly.": true,
"createEvent('UIEVENTS') should be initialized correctly.": true
}

View File

@ -0,0 +1,4 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
DIRS += [
]

View File

@ -1,34 +1,6 @@
{
"DOMException exception: existence and properties of exception interface object": true,
"DOMException exception: existence and properties of exception interface prototype object": true,
"DOMException exception: existence and properties of exception interface prototype object's \"name\" property": true,
"DOMException exception: existence and properties of exception interface prototype object's \"constructor\" property": true,
"DOMException exception: constant INDEX_SIZE_ERR on exception interface prototype object": true,
"DOMException exception: constant DOMSTRING_SIZE_ERR on exception interface prototype object": true,
"DOMException exception: constant HIERARCHY_REQUEST_ERR on exception interface prototype object": true,
"DOMException exception: constant WRONG_DOCUMENT_ERR on exception interface prototype object": true,
"DOMException exception: constant INVALID_CHARACTER_ERR on exception interface prototype object": true,
"DOMException exception: constant NO_DATA_ALLOWED_ERR on exception interface prototype object": true,
"DOMException exception: constant NO_MODIFICATION_ALLOWED_ERR on exception interface prototype object": true,
"DOMException exception: constant NOT_FOUND_ERR on exception interface prototype object": true,
"DOMException exception: constant NOT_SUPPORTED_ERR on exception interface prototype object": true,
"DOMException exception: constant INUSE_ATTRIBUTE_ERR on exception interface prototype object": true,
"DOMException exception: constant INVALID_STATE_ERR on exception interface prototype object": true,
"DOMException exception: constant SYNTAX_ERR on exception interface prototype object": true,
"DOMException exception: constant INVALID_MODIFICATION_ERR on exception interface prototype object": true,
"DOMException exception: constant NAMESPACE_ERR on exception interface prototype object": true,
"DOMException exception: constant INVALID_ACCESS_ERR on exception interface prototype object": true,
"DOMException exception: constant VALIDATION_ERR on exception interface prototype object": true,
"DOMException exception: constant TYPE_MISMATCH_ERR on exception interface prototype object": true,
"DOMException exception: constant SECURITY_ERR on exception interface prototype object": true,
"DOMException exception: constant NETWORK_ERR on exception interface prototype object": true,
"DOMException exception: constant ABORT_ERR on exception interface prototype object": true,
"DOMException exception: constant URL_MISMATCH_ERR on exception interface prototype object": true,
"DOMException exception: constant QUOTA_EXCEEDED_ERR on exception interface prototype object": true,
"DOMException exception: constant TIMEOUT_ERR on exception interface prototype object": true,
"DOMException exception: constant INVALID_NODE_TYPE_ERR on exception interface prototype object": true,
"DOMException exception: constant DATA_CLONE_ERR on exception interface prototype object": true,
"DOMException exception: field code on exception interface prototype object": true,
"Event interface: document.createEvent(\"Event\") must have own property \"isTrusted\"": true,
"Event interface: document.createEvent(\"Event\") must inherit property \"timeStamp\" with the proper type (15)": true,
"Event interface: new Event(\"foo\") must have own property \"isTrusted\"": true,
@ -36,48 +8,39 @@
"CustomEvent interface: existence and properties of interface object": true,
"Event interface: new CustomEvent(\"foo\") must have own property \"isTrusted\"": true,
"Event interface: new CustomEvent(\"foo\") must inherit property \"timeStamp\" with the proper type (15)": true,
"EventListener interface: existence and properties of interface prototype object": true,
"EventListener interface: existence and properties of interface prototype object's \"constructor\" property": true,
"EventListener interface: operation handleEvent(Event)": true,
"MutationObserver interface: operation observe(Node,MutationObserverInit)": true,
"Document interface: attribute children": true,
"Document interface: attribute firstElementChild": true,
"Document interface: attribute lastElementChild": true,
"Document interface: attribute childElementCount": true,
"Node interface: existence and properties of interface object": true,
"Document interface: existence and properties of interface object": true,
"Document interface: operation prepend(union)": true,
"Document interface: operation append(union)": true,
"Document interface: xmlDoc must inherit property \"children\" with the proper type (24)": true,
"Document interface: xmlDoc must inherit property \"firstElementChild\" with the proper type (25)": true,
"Document interface: xmlDoc must inherit property \"lastElementChild\" with the proper type (26)": true,
"Document interface: xmlDoc must inherit property \"childElementCount\" with the proper type (27)": true,
"XMLDocument interface: existence and properties of interface object": true,
"Document interface: xmlDoc must inherit property \"prepend\" with the proper type (28)": true,
"Document interface: calling prepend(union) on xmlDoc with too few arguments must throw TypeError": true,
"Document interface: xmlDoc must inherit property \"append\" with the proper type (29)": true,
"Document interface: calling append(union) on xmlDoc with too few arguments must throw TypeError": true,
"DocumentFragment interface: attribute children": true,
"DocumentFragment interface: attribute firstElementChild": true,
"DocumentFragment interface: attribute lastElementChild": true,
"DocumentFragment interface: attribute childElementCount": true,
"DOMImplementation interface: operation createDocument(DOMString,DOMString,DocumentType)": true,
"DOMImplementation interface: calling createDocument(DOMString,DOMString,DocumentType) on document.implementation with too few arguments must throw TypeError": true,
"DocumentFragment interface: existence and properties of interface object": true,
"DocumentFragment interface: operation prepend(union)": true,
"DocumentFragment interface: operation append(union)": true,
"DocumentFragment interface: document.createDocumentFragment() must inherit property \"children\" with the proper type (0)": true,
"DocumentFragment interface: document.createDocumentFragment() must inherit property \"firstElementChild\" with the proper type (1)": true,
"DocumentFragment interface: document.createDocumentFragment() must inherit property \"lastElementChild\" with the proper type (2)": true,
"DocumentFragment interface: document.createDocumentFragment() must inherit property \"childElementCount\" with the proper type (3)": true,
"DocumentFragment interface: document.createDocumentFragment() must inherit property \"prepend\" with the proper type (4)": true,
"DocumentFragment interface: calling prepend(union) on document.createDocumentFragment() with too few arguments must throw TypeError": true,
"DocumentFragment interface: document.createDocumentFragment() must inherit property \"append\" with the proper type (5)": true,
"DocumentFragment interface: calling append(union) on document.createDocumentFragment() with too few arguments must throw TypeError": true,
"DocumentType interface: attribute previousElementSibling": true,
"DocumentType interface: attribute nextElementSibling": true,
"DocumentType interface: existence and properties of interface object": true,
"DocumentType interface: operation before(union)": true,
"DocumentType interface: operation after(union)": true,
"DocumentType interface: operation replace(union)": true,
"DocumentType interface: document.doctype must inherit property \"previousElementSibling\" with the proper type (3)": true,
"DocumentType interface: document.doctype must inherit property \"nextElementSibling\" with the proper type (4)": true,
"DocumentType interface: document.doctype must inherit property \"before\" with the proper type (5)": true,
"DocumentType interface: calling before(union) on document.doctype with too few arguments must throw TypeError": true,
"DocumentType interface: document.doctype must inherit property \"after\" with the proper type (6)": true,
"DocumentType interface: calling after(union) on document.doctype with too few arguments must throw TypeError": true,
"DocumentType interface: document.doctype must inherit property \"replace\" with the proper type (7)": true,
"DocumentType interface: calling replace(union) on document.doctype with too few arguments must throw TypeError": true,
"Element interface: existence and properties of interface object": true,
"Element interface: attribute namespaceURI": true,
"Element interface: attribute prefix": true,
"Element interface: attribute localName": true,
@ -98,48 +61,38 @@
"Element interface: calling after(union) on element with too few arguments must throw TypeError": true,
"Element interface: element must inherit property \"replace\" with the proper type (29)": true,
"Element interface: calling replace(union) on element with too few arguments must throw TypeError": true,
"Attr interface: existence and properties of interface object": true,
"Attr interface: existence and properties of interface prototype object": true,
"CharacterData interface: attribute previousElementSibling": true,
"CharacterData interface: attribute nextElementSibling": true,
"CharacterData interface: existence and properties of interface object": true,
"CharacterData interface: operation before(union)": true,
"CharacterData interface: operation after(union)": true,
"CharacterData interface: operation replace(union)": true,
"CharacterData interface: document.createTextNode(\"abc\") must inherit property \"previousElementSibling\" with the proper type (7)": true,
"CharacterData interface: document.createTextNode(\"abc\") must inherit property \"nextElementSibling\" with the proper type (8)": true,
"Text interface: existence and properties of interface object": true,
"CharacterData interface: document.createTextNode(\"abc\") must inherit property \"before\" with the proper type (9)": true,
"CharacterData interface: calling before(union) on document.createTextNode(\"abc\") with too few arguments must throw TypeError": true,
"CharacterData interface: document.createTextNode(\"abc\") must inherit property \"after\" with the proper type (10)": true,
"CharacterData interface: calling after(union) on document.createTextNode(\"abc\") with too few arguments must throw TypeError": true,
"CharacterData interface: document.createTextNode(\"abc\") must inherit property \"replace\" with the proper type (11)": true,
"CharacterData interface: calling replace(union) on document.createTextNode(\"abc\") with too few arguments must throw TypeError": true,
"CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"previousElementSibling\" with the proper type (7)": true,
"CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"nextElementSibling\" with the proper type (8)": true,
"ProcessingInstruction interface: existence and properties of interface object": true,
"CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"before\" with the proper type (9)": true,
"CharacterData interface: calling before(union) on xmlDoc.createProcessingInstruction(\"abc\", \"def\") with too few arguments must throw TypeError": true,
"CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"after\" with the proper type (10)": true,
"CharacterData interface: calling after(union) on xmlDoc.createProcessingInstruction(\"abc\", \"def\") with too few arguments must throw TypeError": true,
"CharacterData interface: xmlDoc.createProcessingInstruction(\"abc\", \"def\") must inherit property \"replace\" with the proper type (11)": true,
"CharacterData interface: calling replace(union) on xmlDoc.createProcessingInstruction(\"abc\", \"def\") with too few arguments must throw TypeError": true,
"CharacterData interface: document.createComment(\"abc\") must inherit property \"previousElementSibling\" with the proper type (7)": true,
"CharacterData interface: document.createComment(\"abc\") must inherit property \"nextElementSibling\" with the proper type (8)": true,
"Comment interface: existence and properties of interface object": true,
"CharacterData interface: document.createComment(\"abc\") must inherit property \"before\" with the proper type (9)": true,
"CharacterData interface: calling before(union) on document.createComment(\"abc\") with too few arguments must throw TypeError": true,
"CharacterData interface: document.createComment(\"abc\") must inherit property \"after\" with the proper type (10)": true,
"CharacterData interface: calling after(union) on document.createComment(\"abc\") with too few arguments must throw TypeError": true,
"CharacterData interface: document.createComment(\"abc\") must inherit property \"replace\" with the proper type (11)": true,
"CharacterData interface: calling replace(union) on document.createComment(\"abc\") with too few arguments must throw TypeError": true,
"Node interface: existence and properties of interface object": true,
"Document interface: existence and properties of interface object": true,
"XMLDocument interface: existence and properties of interface object": true,
"DocumentFragment interface: existence and properties of interface object": true,
"DocumentType interface: existence and properties of interface object": true,
"Element interface: existence and properties of interface object": true,
"Attr interface: existence and properties of interface object": true,
"CharacterData interface: existence and properties of interface object": true,
"Text interface: existence and properties of interface object": true,
"ProcessingInstruction interface: existence and properties of interface object": true,
"Comment interface: existence and properties of interface object": true,
"DOMSettableTokenList interface: existence and properties of interface object": true,
"NodeFilter interface: existence and properties of interface object": true,
"NodeList interface: existence and properties of interface prototype object": true
"NodeList interface: existence and properties of interface prototype object": true,
"DOMTokenList interface: operation add(DOMString)": true,
"DOMTokenList interface: operation remove(DOMString)": true,
"DOMTokenList interface: calling add(DOMString) on document.body.classList with too few arguments must throw TypeError": true,
"DOMTokenList interface: calling remove(DOMString) on document.body.classList with too few arguments must throw TypeError": true,
"DOMSettableTokenList interface: existence and properties of interface object": true
}

View File

@ -1,3 +0,0 @@
{
"Setting the idl attribute to the empty sting": true
}

View File

@ -0,0 +1,4 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
DIRS += [
]

View File

@ -1,18 +0,0 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
MOCHITEST_FILES := \
test_Node-properties.html.json \
test_Range-cloneContents.html.json \
test_Range-cloneRange.html.json \
test_Range-collapse.html.json \
test_Range-commonAncestorContainer.html.json \
test_Range-compareBoundaryPoints.html.json \
test_Range-comparePoint.html.json \
test_Range-deleteContents.html.json \
test_Range-extractContents.html.json \
test_Range-intersectsNode.html.json \
test_Range-isPointInRange.html.json \
test_Range-set.html.json \
test_exceptions.html.json \
test_interfaces.html.json \
$(NULL)

View File

@ -1,5 +0,0 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
DIRS += [
]

View File

@ -1,12 +0,0 @@
{
"paras[0].firstChild.splitText(1), with unselected range on paras[0] from 0 to 1": true,
"paras[0].firstChild.splitText(1), with selected range on paras[0] from 0 to 1": true,
"paras[0].firstChild.splitText(1), with unselected range collapsed at (paras[0], 1)": true,
"paras[0].firstChild.splitText(1), with selected range collapsed at (paras[0], 1)": true,
"paras[0].firstChild.splitText(1), with unselected range from (paras[0].firstChild, 1) to (paras[0], 1)": true,
"paras[0].firstChild.splitText(1), with selected range from (paras[0].firstChild, 1) to (paras[0], 1)": true,
"paras[0].firstChild.splitText(2), with unselected range from (paras[0].firstChild, 1) to (paras[0], 1)": true,
"paras[0].firstChild.splitText(2), with selected range from (paras[0].firstChild, 1) to (paras[0], 1)": true,
"paras[0].firstChild.splitText(3), with unselected range from (paras[0].firstChild, 1) to (paras[0], 1)": true,
"paras[0].firstChild.splitText(3), with selected range from (paras[0].firstChild, 1) to (paras[0], 1)": true
}

View File

@ -1,10 +0,0 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
MOCHITEST_FILES := \
test_Document-createElementNS.html.json \
test_Document-getElementsByTagName.html.json \
test_Node-isEqualNode.xhtml.json \
test_attributes.html.json \
test_case.html.json \
test_historical.html.json \
$(NULL)

View File

@ -1,5 +0,0 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
DIRS += [
]

View File

@ -1,5 +0,0 @@
{
"createDocument test 91: null,null,DocumentType node,\"WRONG_DOCUMENT_ERR\"": true,
"createDocument test 92: null,null,DocumentType node,\"WRONG_DOCUMENT_ERR\"": true,
"createDocument test 94: null,null,DocumentType node,\"WRONG_DOCUMENT_ERR\"": true
}

View File

@ -1,3 +0,0 @@
{
"If the context node is not a node that can contain children, a NotFoundError exception should be thrown": true
}

View File

@ -1,4 +0,0 @@
{
"Constants for acceptNode on NodeFilter prototype object.": true,
"Constants for whatToShow on NodeFilter prototype object.": true
}

View File

@ -1,5 +0,0 @@
{
"Range.intersectsNode": true,
"Range.intersectsNode 1": true,
"Range.intersectsNode 2": true
}

View File

@ -1,6 +0,0 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
MOCHITEST_FILES := \
test_getElementsByClassName-10.xml.json \
test_getElementsByClassName-11.xml.json \
$(NULL)

View File

@ -1,5 +0,0 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
DIRS += [
]

View File

@ -1,6 +1,15 @@
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
DIRS += [
'html/dom',
'html/dom/collections',
'html/dom/errors',
'html/dom/events',
'html/dom/nodes',
'html/dom/nodes/Document-createElement-namespace-tests',
'html/dom/ranges',
'html/dom/traversal',
'html/dom/traversal/unfinished',
'html/domxpath',
'html/html/browsers/browsing-the-web/read-media',
'html/html/browsers/the-window-object',
@ -22,7 +31,7 @@ DIRS += [
'html/html/webappapis/scripting/processing-model-2',
'html/html/webappapis/timers',
'html/js/builtins',
'html/old-tests/submission/Opera/microdata',
'html/microdata/microdata-dom-api',
'html/typedarrays',
'html/webgl',
]

View File

@ -1,4 +1,5 @@
git|git://github.com/w3c/web-platform-tests.git|html
dom
domxpath
html/browsers/browsing-the-web/read-media
html/browsers/the-window-object
@ -18,6 +19,6 @@ html/webappapis/scripting/events
html/webappapis/scripting/processing-model-2
html/webappapis/timers
js/builtins
old-tests/submission/Opera/microdata
microdata/microdata-dom-api
typedarrays
webgl

View File

@ -0,0 +1,9 @@
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
MOCHITEST_FILES := \
test_historical.html \
test_interface-objects.html \
test_interfaces.html \
common.js \
constants.js \
$(NULL)

View File

@ -0,0 +1,5 @@
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
MOCHITEST_FILES := \
test_HTMLCollection-empty-name.html \
$(NULL)

View File

@ -0,0 +1,65 @@
<!doctype html>
<meta charset=utf-8>
<title>HTMLCollection and empty names</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<div id=test>
<div class=a id></div>
<div class=a name></div>
<a class=a name></a>
</div>
<script>
test(function() {
var c = document.getElementsByTagName("*");
assert_false("" in c, "Empty string should not be in the collection.");
assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
}, "Empty string as a name for Document.getElementsByTagName");
test(function() {
var div = document.getElementById("test");
var c = div.getElementsByTagName("*");
assert_false("" in c, "Empty string should not be in the collection.");
assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
}, "Empty string as a name for Element.getElementsByTagName");
test(function() {
var c = document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "a");
assert_false("" in c, "Empty string should not be in the collection.");
assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
}, "Empty string as a name for Document.getElementsByTagNameNS");
test(function() {
var div = document.getElementById("test");
var c = div.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "a");
assert_false("" in c, "Empty string should not be in the collection.");
assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
}, "Empty string as a name for Element.getElementsByTagNameNS");
test(function() {
var c = document.getElementsByClassName("a");
assert_false("" in c, "Empty string should not be in the collection.");
assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
}, "Empty string as a name for Document.getElementsByClassName");
test(function() {
var div = document.getElementById("test");
var c = div.getElementsByClassName("a");
assert_false("" in c, "Empty string should not be in the collection.");
assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
}, "Empty string as a name for Element.getElementsByClassName");
test(function() {
var div = document.getElementById("test");
var c = div.children;
assert_false("" in c, "Empty string should not be in the collection.");
assert_equals(c[""], undefined, "Named getter should return undefined for empty string.");
assert_equals(c.namedItem(""), null, "namedItem should return null for empty string.");
}, "Empty string as a name for Element.children");
</script>

View File

@ -14,7 +14,7 @@ var testDiv, paras, detachedDiv, detachedPara1, detachedPara2,
detachedComment, foreignComment, detachedForeignComment, xmlComment,
detachedXmlComment, docfrag, foreignDocfrag, xmlDocfrag, doctype,
foreignDoctype, xmlDoctype;
var testRanges, testPoints, testNodes;
var testRangesShort, testRanges, testPoints, testNodesShort, testNodes;
function setupRangeTests() {
selection = getSelection();
@ -121,7 +121,7 @@ function setupRangeTests() {
doctype = document.doctype;
foreignDoctype = foreignDoc.doctype;
testRanges = [
testRangesShort = [
// Various ranges within the text node children of different
// paragraphs. All should be valid.
"[paras[0].firstChild, 0, paras[0].firstChild, 0]",
@ -129,14 +129,10 @@ function setupRangeTests() {
"[paras[0].firstChild, 2, paras[0].firstChild, 8]",
"[paras[0].firstChild, 2, paras[0].firstChild, 9]",
"[paras[1].firstChild, 0, paras[1].firstChild, 0]",
"[paras[1].firstChild, 0, paras[1].firstChild, 1]",
"[paras[1].firstChild, 2, paras[1].firstChild, 8]",
"[paras[1].firstChild, 2, paras[1].firstChild, 9]",
"[detachedPara1.firstChild, 0, detachedPara1.firstChild, 0]",
"[detachedPara1.firstChild, 0, detachedPara1.firstChild, 1]",
"[detachedPara1.firstChild, 2, detachedPara1.firstChild, 8]",
"[foreignPara1.firstChild, 0, foreignPara1.firstChild, 0]",
"[foreignPara1.firstChild, 0, foreignPara1.firstChild, 1]",
"[foreignPara1.firstChild, 2, foreignPara1.firstChild, 8]",
// Now try testing some elements, not just text nodes.
"[document.documentElement, 0, document.documentElement, 1]",
@ -145,11 +141,7 @@ function setupRangeTests() {
"[document.head, 1, document.head, 1]",
"[document.body, 4, document.body, 5]",
"[foreignDoc.documentElement, 0, foreignDoc.documentElement, 1]",
"[foreignDoc.head, 1, foreignDoc.head, 1]",
"[foreignDoc.body, 0, foreignDoc.body, 0]",
"[paras[0], 0, paras[0], 0]",
"[paras[0], 0, paras[0], 1]",
"[detachedPara1, 0, detachedPara1, 0]",
"[detachedPara1, 0, detachedPara1, 1]",
// Now try some ranges that span elements.
"[paras[0].firstChild, 0, paras[1].firstChild, 0]",
@ -158,38 +150,47 @@ function setupRangeTests() {
// How about something that spans a node and its descendant?
"[paras[0], 0, paras[0].firstChild, 7]",
"[testDiv, 2, paras[4], 1]",
"[testDiv, 1, paras[2].firstChild, 5]",
"[document.documentElement, 1, document.body, 0]",
"[foreignDoc.documentElement, 1, foreignDoc.body, 0]",
// Then a few more interesting things just for good measure.
"[document, 0, document, 1]",
"[document, 0, document, 2]",
"[document, 1, document, 2]",
"[comment, 2, comment, 3]",
"[testDiv, 0, comment, 5]",
"[foreignDoc, 1, foreignComment, 2]",
"[foreignDoc.body, 0, foreignTextNode, 36]",
"[xmlDoc, 1, xmlComment, 0]",
"[detachedTextNode, 0, detachedTextNode, 8]",
"[detachedForeignTextNode, 0, detachedForeignTextNode, 8]",
"[detachedXmlTextNode, 0, detachedXmlTextNode, 8]",
"[detachedComment, 3, detachedComment, 4]",
"[detachedForeignComment, 0, detachedForeignComment, 1]",
"[detachedXmlComment, 2, detachedXmlComment, 6]",
"[docfrag, 0, docfrag, 0]",
];
testRanges = testRangesShort.concat([
"[paras[1].firstChild, 0, paras[1].firstChild, 1]",
"[paras[1].firstChild, 2, paras[1].firstChild, 8]",
"[detachedPara1.firstChild, 0, detachedPara1.firstChild, 1]",
"[foreignPara1.firstChild, 0, foreignPara1.firstChild, 1]",
"[foreignDoc.head, 1, foreignDoc.head, 1]",
"[foreignDoc.body, 0, foreignDoc.body, 0]",
"[paras[0], 0, paras[0], 0]",
"[detachedPara1, 0, detachedPara1, 0]",
"[testDiv, 1, paras[2].firstChild, 5]",
"[document.documentElement, 1, document.body, 0]",
"[foreignDoc.documentElement, 1, foreignDoc.body, 0]",
"[document, 1, document, 2]",
"[paras[2].firstChild, 4, comment, 2]",
"[paras[3], 1, comment, 8]",
"[foreignDoc, 0, foreignDoc, 0]",
"[foreignDoc, 1, foreignComment, 2]",
"[foreignDoc.body, 0, foreignTextNode, 36]",
"[xmlDoc, 0, xmlDoc, 0]",
// Opera 11 crashes if you extractContents() a range that ends at offset
// zero in a comment. Comment out this line to run the tests successfully.
"[xmlDoc, 1, xmlComment, 0]",
"[detachedTextNode, 0, detachedTextNode, 8]",
"[detachedForeignTextNode, 7, detachedForeignTextNode, 7]",
"[detachedForeignTextNode, 0, detachedForeignTextNode, 8]",
"[detachedXmlTextNode, 7, detachedXmlTextNode, 7]",
"[detachedXmlTextNode, 0, detachedXmlTextNode, 8]",
"[detachedComment, 3, detachedComment, 4]",
"[detachedComment, 5, detachedComment, 5]",
"[detachedForeignComment, 0, detachedForeignComment, 1]",
"[detachedForeignComment, 4, detachedForeignComment, 4]",
"[detachedXmlComment, 2, detachedXmlComment, 6]",
"[docfrag, 0, docfrag, 0]",
"[foreignDocfrag, 0, foreignDocfrag, 0]",
"[xmlDocfrag, 0, xmlDocfrag, 0]",
];
]);
testPoints = [
// Various positions within the page, some invalid. Remember that
@ -286,45 +287,48 @@ function setupRangeTests() {
"[xmlDoctype, 0]",
];
testNodes = [
testNodesShort = [
"paras[0]",
"paras[0].firstChild",
"paras[1]",
"paras[1].firstChild",
"foreignPara1",
"foreignPara1.firstChild",
"detachedPara1",
"detachedPara1.firstChild",
"detachedPara2",
"detachedPara2.firstChild",
"testDiv",
"document",
"detachedDiv",
"foreignDoc",
"foreignPara2",
"xmlDoc",
"xmlElement",
"detachedXmlElement",
"detachedTextNode",
"foreignTextNode",
"detachedForeignTextNode",
"xmlTextNode",
"detachedXmlTextNode",
"processingInstruction",
"detachedProcessingInstruction",
"comment",
"detachedComment",
"foreignComment",
"detachedForeignComment",
"xmlComment",
"detachedXmlComment",
"docfrag",
"foreignDocfrag",
"xmlDocfrag",
"doctype",
"foreignDoctype",
"xmlDoctype",
];
testNodes = testNodesShort.concat([
"paras[1]",
"detachedPara2",
"detachedPara2.firstChild",
"testDiv",
"detachedXmlElement",
"detachedForeignTextNode",
"xmlTextNode",
"detachedXmlTextNode",
"xmlComment",
"foreignComment",
"detachedForeignComment",
"detachedXmlComment",
"foreignDocfrag",
"xmlDocfrag",
"xmlDoctype",
]);
}
if ("setup" in window) {
setup(setupRangeTests);

View File

@ -0,0 +1,6 @@
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
MOCHITEST_FILES := \
test_DOMException-constants.html \
test_exceptions.html \
$(NULL)

View File

@ -0,0 +1,4 @@
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
DIRS += [
]

View File

@ -0,0 +1,14 @@
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
MOCHITEST_FILES := \
test_Event-constants.html \
test_Event-constructors.html \
test_Event-defaultPrevented.html \
test_Event-initEvent.html \
test_Event-propagation.html \
test_EventTarget-addEventListener.html \
test_EventTarget-dispatchEvent.html \
test_EventTarget-removeEventListener.html \
test_Event-type.html \
test_ProgressEvent.html \
$(NULL)

View File

@ -0,0 +1,4 @@
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
DIRS += [
]

View File

@ -2,7 +2,7 @@
<title>Event constants</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="constants.js"></script>
<script src="../constants.js"></script>
<div id="log"></div>
<script>
var objects = [

View File

@ -0,0 +1,35 @@
<!doctype html>
<title>Event propagation tests</title>
<link rel=author title="Aryeh Gregor" href=ayg@aryeh.name>
<div id=log></div>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
"use strict";
function testPropagationFlag(ev, expected, desc) {
test(function() {
var called = false;
var callback = function() { called = true };
document.head.addEventListener("foo", callback);
document.head.dispatchEvent(ev);
assert_equals(called, expected, "Propagation flag");
document.head.removeEventListener("foo", callback);
}, desc);
}
var ev = document.createEvent("Event");
ev.initEvent("foo", true, false);
testPropagationFlag(ev, true, "Newly-created Event");
ev.stopPropagation();
testPropagationFlag(ev, false, "After stopPropagation()");
ev.initEvent("foo", true, false);
testPropagationFlag(ev, true, "Reinitialized after stopPropagation()");
var ev = document.createEvent("Event");
ev.initEvent("foo", true, false);
ev.stopImmediatePropagation();
testPropagationFlag(ev, false, "After stopImmediatePropagation()");
ev.initEvent("foo", true, false);
testPropagationFlag(ev, true, "Reinitialized after stopImmediatePropagation()");
</script>

View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>EventTarget.addEventListener</title>
<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com">
<link rel="help" href="http://dom.spec.whatwg.org/#dom-eventtarget-addeventlistener">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
// Step 1.
test(function() {
assert_equals(document.addEventListener("x", null, false), undefined);
assert_equals(document.addEventListener("x", null, true), undefined);
assert_equals(document.addEventListener("x", null), undefined);
}, "Adding a null event listener should succeed");
</script>

View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>EventTarget.removeEventListener</title>
<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com">
<link rel="help" href="http://dom.spec.whatwg.org/#dom-eventtarget-removeeventlistener">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
// Step 1.
test(function() {
assert_equals(document.removeEventListener("x", null, false), undefined);
assert_equals(document.removeEventListener("x", null, true), undefined);
assert_equals(document.removeEventListener("x", null), undefined);
}, "removing a null event listener should succeed");
</script>

View File

@ -0,0 +1,25 @@
<!doctype html>
<title>ProgressEvent constructor</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id=log></div>
<script>
test(function() {
var ev = new ProgressEvent("test")
assert_equals(ev.type, "test")
assert_equals(ev.target, null)
assert_equals(ev.currentTarget, null)
assert_equals(ev.eventPhase, Event.NONE)
assert_equals(ev.bubbles, false)
assert_equals(ev.cancelable, false)
assert_equals(ev.defaultPrevented, false)
assert_equals(ev.isTrusted, false)
assert_true(ev.timeStamp > 0)
assert_true("initEvent" in ev)
}, "Default event values.")
test(function() {
assert_throws("NotSupportedError", function() {
document.createEvent("ProgressEvent")
})
}, "document.createEvent() should not work with ProgressEvent.")
</script>

View File

@ -0,0 +1,4 @@
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
DIRS += [
]

View File

@ -0,0 +1,45 @@
# THIS FILE IS AUTOGENERATED BY importTestsuite.py - DO NOT EDIT
MOCHITEST_FILES := \
bare_mathml.html \
bare_mathml.svg \
bare_mathml.xhtml \
bare_mathml.xml \
bare_svg.html \
bare_svg.svg \
bare_svg.xhtml \
bare_svg.xml \
bare_xhtml.html \
bare_xhtml.svg \
bare_xhtml.xhtml \
bare_xhtml.xml \
empty.html \
empty.svg \
empty.xhtml \
empty.xml \
generate.py \
mathml.html \
mathml.svg \
mathml.xhtml \
mathml.xml \
minimal_html.html \
minimal_html.svg \
minimal_html.xhtml \
minimal_html.xml \
svg.html \
svg.svg \
svg.xhtml \
svg.xml \
xhtml.html \
xhtml_ns_changed.html \
xhtml_ns_changed.svg \
xhtml_ns_changed.xhtml \
xhtml_ns_changed.xml \
xhtml_ns_removed.html \
xhtml_ns_removed.svg \
xhtml_ns_removed.xhtml \
xhtml_ns_removed.xml \
xhtml.svg \
xhtml.xhtml \
xhtml.xml \
$(NULL)

View File

@ -0,0 +1 @@
<svg></svg>

After

Width:  |  Height:  |  Size: 11 B

View File

@ -0,0 +1 @@
<svg></svg>

After

Width:  |  Height:  |  Size: 11 B

View File

@ -0,0 +1 @@
<svg></svg>

After

Width:  |  Height:  |  Size: 11 B

View File

@ -0,0 +1 @@
<svg></svg>

After

Width:  |  Height:  |  Size: 11 B

View File

@ -0,0 +1 @@
<html></html>

View File

@ -0,0 +1 @@
<html></html>

Some files were not shown because too many files have changed in this diff Show More