Index: LayoutTests/fast/forms/select/select-add.html |
diff --git a/LayoutTests/fast/forms/select/select-add.html b/LayoutTests/fast/forms/select/select-add.html |
index 5e0a3d1a0bf6a4d9ed7303c597672c600df46bc5..15ff4b00d36e6dd785bafae590dd58b7d15a616f 100644 |
--- a/LayoutTests/fast/forms/select/select-add.html |
+++ b/LayoutTests/fast/forms/select/select-add.html |
@@ -78,6 +78,30 @@ function test(multiple) { |
shouldBeEqualToString('addOption("foo")', 'X,0,1,2'); |
resetSelect(multiple); |
+ shouldBeEqualToString('addOption("0")', 'X,0,1,2'); |
+ |
+ resetSelect(multiple); |
+ shouldBeEqualToString('addOption("1")', '0,X,1,2'); |
+ |
+ resetSelect(multiple); |
+ shouldBeEqualToString('addOption(false)', 'X,0,1,2'); |
+ |
+ resetSelect(multiple); |
+ shouldBeEqualToString('addOption(true)', '0,X,1,2'); |
+ |
+ resetSelect(multiple); |
+ shouldBeEqualToString('addOption(2147483647)', '0,1,2,X'); |
+ |
+ resetSelect(multiple); |
+ shouldBeEqualToString('addOption(-2147483647)', '0,1,2,X'); |
+ |
+ resetSelect(multiple); |
+ shouldBeEqualToString('addOption(2147483648)', '0,1,2,X'); |
bashi
2015/02/13 04:21:49
Is this an expected behavior?
shiva.jm
2015/02/13 04:43:57
I think as in link: http://www.w3.org/html/wg/draf
bashi
2015/02/13 04:50:29
Per the IDL spec, I guess that a TypeError should
|
+ |
+ resetSelect(multiple); |
+ shouldBeEqualToString('addOption(-2147483648)', '0,1,2,X'); |
+ |
+ resetSelect(multiple); |
shouldThrow('select.add()'); |
shouldThrow('select.add("foo")'); |
shouldThrow('select.add("foo", 0)'); |
@@ -85,6 +109,8 @@ function test(multiple) { |
shouldThrow('select.add(undefined, 0)'); |
shouldThrow('select.add(null)'); |
shouldThrow('select.add(null, 0)'); |
+ shouldBeUndefined('select.add(new Option("X", "X", false, false), 0, 1)'); |
+ shouldBeUndefined('select.add(new Option("X", "X", false, false), select.options[0], 2)'); |
resetSelect(multiple); |
var group = document.createElement('optgroup'); |