Index: LayoutTests/fast/dom/idl-union-type-unittest.html |
diff --git a/LayoutTests/fast/dom/idl-union-type-unittest.html b/LayoutTests/fast/dom/idl-union-type-unittest.html |
index 399a37d72f74eb5e6c190ed010aa588cd511e42b..b55991ced2ed3b7f694a0d73abfd6a10105737e0 100644 |
--- a/LayoutTests/fast/dom/idl-union-type-unittest.html |
+++ b/LayoutTests/fast/dom/idl-union-type-unittest.html |
@@ -36,5 +36,20 @@ if (window.internals) { |
// Just check that doubleOrStringArg() doesn't throw an exception. |
shouldBeEqualToString('typeof unionTypesTest.doubleOrStringArg(new Date)', 'string'); |
shouldThrow('unionTypesTest.doubleOrStringArg()'); |
+ debug(''); |
+ |
+ debug('Tests for method arguments with defaults'); |
+ shouldBeEqualToString('unionTypesTest.doubleOrStringDefaultDoubleArg()', 'double is passed: 3.14'); |
+ shouldBeEqualToString('unionTypesTest.doubleOrStringDefaultDoubleArg(undefined)', 'double is passed: 3.14'); |
+ shouldBeEqualToString('unionTypesTest.doubleOrStringDefaultDoubleArg("foo")', 'string is passed: foo'); |
+ shouldBeEqualToString('unionTypesTest.doubleOrStringDefaultStringArg()', 'string is passed: foo'); |
+ shouldBeEqualToString('unionTypesTest.doubleOrStringDefaultStringArg(undefined)', 'string is passed: foo'); |
+ shouldBeEqualToString('unionTypesTest.doubleOrStringDefaultStringArg(3.14)', 'double is passed: 3.14'); |
+ shouldBeEqualToString('unionTypesTest.doubleOrStringDefaultNullArg()', 'null is passed'); |
+ shouldBeEqualToString('unionTypesTest.doubleOrStringDefaultNullArg(undefined)', 'null is passed'); |
+ shouldBeEqualToString('unionTypesTest.doubleOrStringDefaultNullArg(null)', 'null is passed'); |
+ shouldBeEqualToString('unionTypesTest.doubleOrStringDefaultNullArg(3.14)', 'double is passed: 3.14'); |
+ shouldBeEqualToString('unionTypesTest.doubleOrStringDefaultNullArg("foo")', 'string is passed: foo'); |
+ |
} |
</script> |