Auto merge of #7236 - nox:dictionary-failure-code, r=Ms2ger

Fix dictionary member conversion failure (fixes #7231)



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7236)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-08-16 06:39:56 -06:00
commit a2978f2add
3 changed files with 81 additions and 2 deletions

View file

@ -4696,7 +4696,6 @@ class CGDictionary(CGThing):
descriptorProvider,
isMember="Dictionary",
defaultValue=member.defaultValue,
failureCode="return Err(());",
exceptionCode="return Err(());"))
for member in dictionary.members]

View file

@ -1,3 +1,77 @@
[constructors.html]
type: testharness
disabled: issue 5340
[FocusEvent constructor (no argument)]
expected: FAIL
[FocusEvent constructor (undefined argument)]
expected: FAIL
[FocusEvent constructor (null argument)]
expected: FAIL
[FocusEvent constructor (empty argument)]
expected: FAIL
[FocusEvent constructor (argument with default values)]
expected: FAIL
[FocusEvent constructor (argument with non-default values)]
expected: FAIL
[MouseEvent constructor (no argument)]
expected: FAIL
[MouseEvent constructor (undefined argument)]
expected: FAIL
[MouseEvent constructor (null argument)]
expected: FAIL
[MouseEvent constructor (empty argument)]
expected: FAIL
[MouseEvent constructor (argument with default values)]
expected: FAIL
[MouseEvent constructor (argument with non-default values)]
expected: FAIL
[WheelEvent constructor (no argument)]
expected: FAIL
[WheelEvent constructor (undefined argument)]
expected: FAIL
[WheelEvent constructor (null argument)]
expected: FAIL
[WheelEvent constructor (empty argument)]
expected: FAIL
[WheelEvent constructor (argument with default values)]
expected: FAIL
[WheelEvent constructor (argument with non-default values)]
expected: FAIL
[KeyboardEvent constructor (argument with non-default values)]
expected: FAIL
[CompositionEvent constructor (no argument)]
expected: FAIL
[CompositionEvent constructor (undefined argument)]
expected: FAIL
[CompositionEvent constructor (null argument)]
expected: FAIL
[CompositionEvent constructor (empty argument)]
expected: FAIL
[CompositionEvent constructor (argument with default values)]
expected: FAIL
[CompositionEvent constructor (argument with non-default values)]
expected: FAIL

View file

@ -144,4 +144,10 @@ Object.keys(expected).forEach(function(iface) {
assert_props(iface, event, false);
}, iface + " constructor (argument with non-default values)");
});
test(function () {
assert_throws(new TypeError(), function() {
new UIEvent("x", { view: 7 })
});
}, "UIEvent constructor (view argument with wrong type)")
</script>