Don't throw on infinity or NaN index in HTMLOptionsCollection.add()
https://bugs.webkit.org/show_bug.cgi?id=112612

Patch by Michael Pruett <michael@68k.org> on 2013-03-19
Reviewed by Kentaro Hara.

Source/WebCore:

HTMLOptionsCollection.add() should not throw a type error when
its optional index argument is infinity or NaN. Such values
should instead be converted to 0 with no error.

Tests: fast/dom/non-numeric-values-numeric-parameters.html
       fast/js/select-options-add.html

* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::add):

LayoutTests:

* fast/dom/non-numeric-values-numeric-parameters-expected.txt:
* fast/js/select-options-add-expected.txt:
* platform/chromium/fast/dom/non-numeric-values-numeric-parameters-expected.txt: Removed.
* platform/chromium/fast/js/select-options-add-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146283 268f45cc-cd09-0410-ab3c-d52691b4dbfc