@@ -179,7 +179,7 @@ public void getText() throws Exception {
179179 * @throws Exception if an error occurs
180180 */
181181 @ Test
182- @ Alerts ({"exception " , "-Hello world-Hello world-0" , "-Hello world-Hello world-0" })
182+ @ Alerts ({"InvalidStateError " , "-Hello world-Hello world-0" , "-Hello world-Hello world-0" })
183183 public void setValueOnChange () throws Exception {
184184 final String html =
185185 "<html>\n "
@@ -190,14 +190,14 @@ public void setValueOnChange() throws Exception {
190190 + " var input = document.getElementById('f');\n "
191191 + " try{\n "
192192 + " input.value = 'HtmlUnit';\n "
193- + " } catch(e) { log('exception' ); }\n "
193+ + " } catch(e) { log(e.name ); }\n "
194194 + " log(input.value + '-' + input.defaultValue "
195195 + "+ '-' + input.getAttribute('value') "
196196 + "+ '-' + input.files.length);\n "
197197
198198 + " try{\n "
199199 + " input.value = '';\n "
200- + " } catch(e) { log('exception' ); }\n "
200+ + " } catch(e) { log(e.name ); }\n "
201201 + " log(input.value + '-' + input.defaultValue "
202202 + "+ '-' + input.getAttribute('value') "
203203 + "+ '-' + input.files.length);\n "
@@ -234,14 +234,14 @@ public void setDefaultValueOnChange() throws Exception {
234234 + " var input = document.getElementById('f');\n "
235235 + " try{\n "
236236 + " input.defaultValue = 'HtmlUnit';\n "
237- + " } catch(e) { log('exception' ); }\n "
237+ + " } catch(e) { log(e.name ); }\n "
238238 + " log(input.value + '-' + input.defaultValue "
239239 + "+ '-' + input.getAttribute('value') "
240240 + "+ '-' + input.files.length);\n "
241241
242242 + " try{\n "
243243 + " input.defaultValue = '';\n "
244- + " } catch(e) { log('exception' ); }\n "
244+ + " } catch(e) { log(e.name ); }\n "
245245 + " log(input.value + '-' + input.defaultValue "
246246 + "+ '-' + input.getAttribute('value') "
247247 + "+ '-' + input.files.length);\n "
@@ -336,7 +336,7 @@ public void defaultValuesAfterClone() throws Exception {
336336 */
337337 @ Test
338338 @ Alerts ({"-initial-initial" , "-initial-initial" ,
339- "exception " , "-initial-initial" , "-initial-initial" ,
339+ "InvalidStateError " , "-initial-initial" , "-initial-initial" ,
340340 "-newDefault-newDefault" , "-newDefault-newDefault" })
341341 public void resetByClick () throws Exception {
342342 final String html = "<html><head>\n "
@@ -351,7 +351,7 @@ public void resetByClick() throws Exception {
351351
352352 + " try{\n "
353353 + " file.value = 'newValue';\n "
354- + " } catch(e) { log('exception' ); }\n "
354+ + " } catch(e) { log(e.name ); }\n "
355355 + " log(file.value + '-' + file.defaultValue + '-' + file.getAttribute('value'));\n "
356356
357357 + " document.getElementById('testReset').click;\n "
@@ -379,7 +379,7 @@ public void resetByClick() throws Exception {
379379 */
380380 @ Test
381381 @ Alerts ({"-initial-initial" , "-initial-initial" ,
382- "exception " , "-initial-initial" , "-initial-initial" ,
382+ "InvalidStateError " , "-initial-initial" , "-initial-initial" ,
383383 "-newDefault-newDefault" , "-newDefault-newDefault" })
384384 public void resetByJS () throws Exception {
385385 final String html = "<html><head>\n "
@@ -394,7 +394,7 @@ public void resetByJS() throws Exception {
394394
395395 + " try{\n "
396396 + " file.value = 'newValue';\n "
397- + " } catch(e) { log('exception' ); }\n "
397+ + " } catch(e) { log(e.name ); }\n "
398398 + " log(file.value + '-' + file.defaultValue + '-' + file.getAttribute('value'));\n "
399399
400400 + " document.forms[0].reset;\n "
@@ -421,7 +421,7 @@ public void resetByJS() throws Exception {
421421 */
422422 @ Test
423423 @ Alerts ({"-initial-initial" , "-default-default" ,
424- "exception " , "-default-default" , "-attribValue-attribValue" ,
424+ "InvalidStateError " , "-default-default" , "-attribValue-attribValue" ,
425425 "-newDefault-newDefault" })
426426 public void value () throws Exception {
427427 final String html = "<html><head>\n "
@@ -436,7 +436,7 @@ public void value() throws Exception {
436436
437437 + " try{\n "
438438 + " file.value = 'newValue';\n "
439- + " } catch(e) { log('exception' ); }\n "
439+ + " } catch(e) { log(e.name ); }\n "
440440 + " log(file.value + '-' + file.defaultValue + '-' + file.getAttribute('value'));\n "
441441
442442 + " file.setAttribute('value', 'attribValue');\n "
@@ -506,7 +506,7 @@ public void selection() throws Exception {
506506 + " } catch(e) { log('ex end'); }\n "
507507 + " try {\n "
508508 + " return element.value.substring(element.selectionStart, element.selectionEnd);\n "
509- + " } catch(e) { log('exception' ); }\n "
509+ + " } catch(e) { log(e.name ); }\n "
510510 + " }\n "
511511 + "</script></head>\n "
512512 + "<body onload='test()'>\n "
@@ -519,9 +519,9 @@ public void selection() throws Exception {
519519 * @throws Exception if test fails
520520 */
521521 @ Test
522- @ Alerts ({"null,null" , "exception value " , "null,null" ,
523- "exception " , "null,null" ,
524- "exception " , "null,null" })
522+ @ Alerts ({"null,null" , "InvalidStateError " , "null,null" ,
523+ "InvalidStateError " , "null,null" ,
524+ "InvalidStateError " , "null,null" })
525525 public void selection2_1 () throws Exception {
526526 selection2 (3 , 10 );
527527 }
@@ -530,9 +530,9 @@ public void selection2_1() throws Exception {
530530 * @throws Exception if test fails
531531 */
532532 @ Test
533- @ Alerts ({"null,null" , "exception value " , "null,null" ,
534- "exception " , "null,null" ,
535- "exception " , "null,null" })
533+ @ Alerts ({"null,null" , "InvalidStateError " , "null,null" ,
534+ "InvalidStateError " , "null,null" ,
535+ "InvalidStateError " , "null,null" })
536536 public void selection2_2 () throws Exception {
537537 selection2 (-3 , 15 );
538538 }
@@ -541,9 +541,9 @@ public void selection2_2() throws Exception {
541541 * @throws Exception if test fails
542542 */
543543 @ Test
544- @ Alerts ({"null,null" , "exception value " , "null,null" ,
545- "exception " , "null,null" ,
546- "exception " , "null,null" })
544+ @ Alerts ({"null,null" , "InvalidStateError " , "null,null" ,
545+ "InvalidStateError " , "null,null" ,
546+ "InvalidStateError " , "null,null" })
547547 public void selection2_3 () throws Exception {
548548 selection2 (10 , 5 );
549549 }
@@ -558,28 +558,28 @@ private void selection2(final int selectionStart, final int selectionEnd) throws
558558
559559 + " try {\n "
560560 + " log(input.selectionStart + ',' + input.selectionEnd);\n "
561- + " } catch(e) { log('exception' ); }\n "
561+ + " } catch(e) { log(e.name ); }\n "
562562
563563 + " try{\n "
564564 + " input.value = '12345678900';\n "
565- + " } catch(e) { log('exception value' ); }\n "
565+ + " } catch(e) { log(e.name ); }\n "
566566 + " try {\n "
567567 + " log(input.selectionStart + ',' + input.selectionEnd);\n "
568- + " } catch(e) { log('exception' ); }\n "
568+ + " } catch(e) { log(e.name ); }\n "
569569
570570 + " try {\n "
571571 + " input.selectionStart = " + selectionStart + ";\n "
572- + " } catch(e) { log('exception' ); }\n "
572+ + " } catch(e) { log(e.name ); }\n "
573573 + " try {\n "
574574 + " log(input.selectionStart + ',' + input.selectionEnd);\n "
575- + " } catch(e) { log('exception' ); }\n "
575+ + " } catch(e) { log(e.name ); }\n "
576576
577577 + " try {\n "
578578 + " input.selectionEnd = " + selectionEnd + ";\n "
579- + " } catch(e) { log('exception' ); }\n "
579+ + " } catch(e) { log(e.name ); }\n "
580580 + " try {\n "
581581 + " log(input.selectionStart + ',' + input.selectionEnd);\n "
582- + " } catch(e) { log('exception' ); }\n "
582+ + " } catch(e) { log(e.name ); }\n "
583583 + "</script>\n "
584584 + "</body>\n "
585585 + "</html>" ;
@@ -591,7 +591,7 @@ private void selection2(final int selectionStart, final int selectionEnd) throws
591591 * @throws Exception if test fails
592592 */
593593 @ Test
594- @ Alerts ({"null,null" , "exception " })
594+ @ Alerts ({"null,null" , "InvalidStateError " })
595595 public void selectionOnUpdate () throws Exception {
596596 final String html = "<html>\n "
597597 + "<body>\n "
@@ -617,7 +617,7 @@ public void selectionOnUpdate() throws Exception {
617617
618618 + " input.value = 'a';\n "
619619 + " log(input.selectionStart + ',' + input.selectionEnd);\n "
620- + " } catch(e) { log('exception' ); }\n "
620+ + " } catch(e) { log(e.name ); }\n "
621621 + "</script>\n "
622622 + "</body>\n "
623623 + "</html>" ;
0 commit comments