mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Throw a TypeError when a non-object is passed where one is expected.
This commit is contained in:
parent
ea621676f2
commit
83cc23089a
7 changed files with 83 additions and 18 deletions
|
@ -497,7 +497,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
|
|||
return CGWrapper(
|
||||
CGGeneric(
|
||||
failureCode or
|
||||
('//XXXjdm ThrowErrorMessage(cx, MSG_NOT_OBJECT, "%s");\n'
|
||||
('throw_type_error(cx, "%s is not an object.");\n'
|
||||
'%s' % (firstCap(sourceDescription), exceptionCode))),
|
||||
post="\n")
|
||||
def onFailureBadType(failureCode, typeName):
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
[open-url-javascript-window-2.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[XMLHttpRequest: open() - resolving URLs (javascript: ]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
[open-url-javascript-window.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[XMLHttpRequest: open() - resolving URLs (javascript: ]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[responsetext-decoding.htm]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[XMLHttpRequest: responseText decoding (text/plain %FE%FF)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,9 +1,83 @@
|
|||
[DOMImplementation-createDocument.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[DOMImplementation.createDocument(namespace, qualifiedName, doctype)]
|
||||
expected: TIMEOUT
|
||||
[createDocument test 2: null,undefined,null,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 0: null,null,false,object "TypeError"]
|
||||
expected: TIMEOUT
|
||||
[createDocument test 4: null,"foo",null,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 6: null,"f1oo",null,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 7: null,"foo1",null,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 11: null,"xml",null,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 12: null,"xmlns",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 13: null,"xmlfoo",null,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 18: undefined,undefined,undefined,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 20: undefined,"foo",undefined,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 22: undefined,"f1oo",undefined,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 23: undefined,"foo1",undefined,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 27: undefined,"xml",undefined,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 28: undefined,"xmlns",undefined,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 29: undefined,"xmlfoo",undefined,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 41: "http://example.com/","foo:",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 43: "http://example.com/","xmlns",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 46: "http://example.com/","xmlns:foo",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 56: "/","foo:",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 58: "/","xmlns",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 61: "/","xmlns:foo",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 71: "http://www.w3.org/XML/1998/namespace","foo:",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 73: "http://www.w3.org/XML/1998/namespace","xmlns",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 76: "http://www.w3.org/XML/1998/namespace","xmlns:foo",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 101: "foo:","foo:",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 103: "foo:","xmlns",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 106: "foo:","xmlns:foo",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 113: null,"foo",DocumentType node,null]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[Element-childElementCount-dynamic-remove.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Dynamic Removal of Elements]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[Node-replaceChild.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Passing null to replaceChild should throw a TypeError.]
|
||||
expected: TIMEOUT
|
||||
[If child\'s parent is not the context node, a NotFoundError exception should be thrown]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue