@@ -135,7 +135,7 @@ public void async() throws Exception {
135135 * @throws Exception if the test fails
136136 */
137137 @ Test
138- @ Alerts ("exception " )
138+ @ Alerts ("TypeError " )
139139 public void load () throws Exception {
140140 final String html = "<html><head>\n "
141141 + "<script>\n "
@@ -150,7 +150,7 @@ public void load() throws Exception {
150150 + " log(doc.childNodes[0].childNodes.length);\n "
151151 + " log(doc.childNodes[0].childNodes[0].nodeName);\n "
152152 + " log(doc.getElementsByTagName('books').item(0).attributes.length);\n "
153- + " } catch(e) { log('exception' ); }\n "
153+ + " } catch(e) { log(e.name ); }\n "
154154 + " }\n "
155155 + "</script></head>\n "
156156 + "<body onload='test()'>\n "
@@ -172,7 +172,7 @@ public void load() throws Exception {
172172 * @throws Exception if the test fails
173173 */
174174 @ Test
175- @ Alerts ("exception " )
175+ @ Alerts ("TypeError " )
176176 // TODO what is the difference to load()?
177177 public void load_relativeURL () throws Exception {
178178 final String html = "<html><head>\n "
@@ -188,7 +188,7 @@ public void load_relativeURL() throws Exception {
188188 + " log(doc.childNodes[0].childNodes.length);\n "
189189 + " log(doc.childNodes[0].childNodes[0].nodeName);\n "
190190 + " log(doc.getElementsByTagName('books').item(0).attributes.length);\n "
191- + " } catch(e) { log('exception' ); }\n "
191+ + " } catch(e) { log(e.name ); }\n "
192192 + " }\n "
193193 + "</script></head>\n "
194194 + "<body onload='test()'>\n "
@@ -229,7 +229,7 @@ public void preserveWhiteSpace() throws Exception {
229229 * @throws Exception if the test fails
230230 */
231231 @ Test
232- @ Alerts ("exception " )
232+ @ Alerts ("TypeError " )
233233 public void setProperty () throws Exception {
234234 final String html = "<html><head>\n "
235235 + "<script>\n "
@@ -239,7 +239,7 @@ public void setProperty() throws Exception {
239239 + " try {\n "
240240 + " doc.setProperty('SelectionNamespaces', \" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'\" );\n "
241241 + " doc.setProperty('SelectionLanguage', 'XPath');\n "
242- + " } catch(e) { log('exception' ); }\n "
242+ + " } catch(e) { log(e.name ); }\n "
243243 + " }\n "
244244 + "</script></head><body onload='test()'>\n "
245245 + "</body></html>" ;
@@ -250,7 +250,7 @@ public void setProperty() throws Exception {
250250 * @throws Exception if the test fails
251251 */
252252 @ Test
253- @ Alerts ("exception " )
253+ @ Alerts ("TypeError " )
254254 public void selectNodes () throws Exception {
255255 final String html = "<html><head>\n "
256256 + "<script>\n "
@@ -261,7 +261,7 @@ public void selectNodes() throws Exception {
261261 + " var nodes = doc.selectNodes('/books');\n "
262262 + " log(nodes.length);\n "
263263 + " log(nodes[0].tagName);\n "
264- + " } catch(e) { log('exception' ); }\n "
264+ + " } catch(e) { log(e.name ); }\n "
265265 + " }\n "
266266 + LOAD_XML_DOCUMENT_FROM_FILE_FUNCTION
267267 + "</script></head>\n "
@@ -284,7 +284,7 @@ public void selectNodes() throws Exception {
284284 * @throws Exception if the test fails
285285 */
286286 @ Test
287- @ Alerts ("exception " )
287+ @ Alerts ("TypeError " )
288288 public void selectNodes_caseSensitive () throws Exception {
289289 final String html = "<html><head>\n "
290290 + "<script>\n "
@@ -294,7 +294,7 @@ public void selectNodes_caseSensitive() throws Exception {
294294 + " try {\n "
295295 + " log(doc.selectNodes('/bOoKs').length);\n "
296296 + " log(doc.selectNodes('/books').length);\n "
297- + " } catch(e) { log('exception' ); }\n "
297+ + " } catch(e) { log(e.name ); }\n "
298298 + " }\n "
299299 + LOAD_XML_DOCUMENT_FROM_FILE_FUNCTION
300300 + "</script></head>\n "
@@ -317,7 +317,7 @@ public void selectNodes_caseSensitive() throws Exception {
317317 * @throws Exception if the test fails
318318 */
319319 @ Test
320- @ Alerts ("exception " )
320+ @ Alerts ("TypeError " )
321321 public void selectNodes_namespace () throws Exception {
322322 final String html = "<html><head>\n "
323323 + "<script>\n "
@@ -327,7 +327,7 @@ public void selectNodes_namespace() throws Exception {
327327 + " try {\n "
328328 + " log(doc.selectNodes('//ns1:title').length);\n "
329329 + " log(doc.selectNodes('//ns2:title').length);\n "
330- + " } catch(e) { log('exception' ); }\n "
330+ + " } catch(e) { log(e.name ); }\n "
331331 + " }\n "
332332 + LOAD_XML_DOCUMENT_FROM_FILE_FUNCTION
333333 + "</script></head>\n "
@@ -357,7 +357,7 @@ public void selectNodes_namespace() throws Exception {
357357 * @throws Exception if the test fails
358358 */
359359 @ Test
360- @ Alerts ("exception " )
360+ @ Alerts ("TypeError " )
361361 public void selectNodes_nextNodeAndReset () throws Exception {
362362 final String html = "<html><head>\n "
363363 + "<script>\n "
@@ -371,7 +371,7 @@ public void selectNodes_nextNodeAndReset() throws Exception {
371371 + " nodes.reset();\n "
372372 + " log(nodes.nextNode().nodeName);\n "
373373 + " log(nodes.nextNode());\n "
374- + " } catch(e) { log('exception' ); }\n "
374+ + " } catch(e) { log(e.name ); }\n "
375375 + " }\n "
376376 + LOAD_XML_DOCUMENT_FROM_FILE_FUNCTION
377377 + "</script></head>\n "
@@ -412,7 +412,7 @@ public void selectNodes_fromRoot() throws Exception {
412412 + " try {\n "
413413 + " log(child.selectNodes('title').length);\n "
414414 + " } catch(e) { log('exception title'); }\n "
415- + " } catch(e) { log('exception' ); }\n "
415+ + " } catch(e) { log(e.name ); }\n "
416416 + " }\n "
417417 + LOAD_XML_DOCUMENT_FROM_FILE_FUNCTION
418418 + "</script></head>\n "
@@ -428,7 +428,7 @@ public void selectNodes_fromRoot() throws Exception {
428428 * @throws Exception if the test fails
429429 */
430430 @ Test
431- @ Alerts ("exception " )
431+ @ Alerts ("TypeError " )
432432 public void selectSingleNode () throws Exception {
433433 final String html = "<html><head>\n "
434434 + "<script>\n "
@@ -441,7 +441,7 @@ public void selectSingleNode() throws Exception {
441441 + " log(doc.selectNodes('/')[0].nodeName);\n "
442442 + " log(doc.selectSingleNode('*').nodeName);\n "
443443 + " log(doc.selectNodes('*')[0].selectSingleNode('/').nodeName);\n "
444- + " } catch(e) { log('exception' ); }\n "
444+ + " } catch(e) { log(e.name ); }\n "
445445 + " }\n "
446446 + LOAD_XML_DOCUMENT_FROM_STRING_FUNCTION
447447 + "</script></head><body onload='test()'>\n "
@@ -505,7 +505,7 @@ public void loadXML_XMLSpaceAttribute() throws Exception {
505505 * @throws Exception if the test fails
506506 */
507507 @ Test
508- @ Alerts ("exception " )
508+ @ Alerts ("ReferenceError " )
509509 public void parseError () throws Exception {
510510 final String html = "<html><head>\n "
511511 + "<script>\n "
@@ -531,7 +531,7 @@ public void parseError() throws Exception {
531531 + " log(doc.parseError.reason !== '');\n "
532532 + " log(doc.parseError.srcText !== '');\n "
533533 + " log(doc.parseError.url !== '');\n "
534- + " } catch(e) { log('exception' ); }\n "
534+ + " } catch(e) { log(e.name ); }\n "
535535 + " }\n "
536536 + "</script></head>\n "
537537 + "<body onload='test()'>\n "
@@ -581,15 +581,15 @@ public void createNSResolver() throws Exception {
581581 * @throws Exception if the test fails
582582 */
583583 @ Test
584- @ Alerts ("exception " )
584+ @ Alerts ("TypeError " )
585585 public void xmlInsideHtml () throws Exception {
586586 final String html = "<html><head>\n "
587587 + "<script>\n "
588588 + LOG_TITLE_FUNCTION
589589 + " function test() {\n "
590590 + " try {\n "
591591 + " log(messageTableHeaders.documentElement.nodeName);\n "
592- + " } catch(e) {log('exception' ); }\n "
592+ + " } catch(e) {log(e.name ); }\n "
593593 + " }\n "
594594 + "</script>\n "
595595 + "</head>\n "
@@ -617,7 +617,7 @@ public void instanceOf() throws Exception {
617617 + " var x = " + callLoadXMLDocumentFromString ("'<x/>'" ) + ";\n "
618618 + " try {\n "
619619 + " log(x instanceof XMLDocument);\n "
620- + " }catch(e) {log('exception' )}\n "
620+ + " }catch(e) {log(e.name )}\n "
621621 + " }\n "
622622 + LOAD_XML_DOCUMENT_FROM_STRING_FUNCTION
623623 + "</script>\n "
@@ -828,7 +828,7 @@ public void getElementById_xml() throws Exception {
828828 + " log(doc.getElementById('item2') != null);\n "
829829 + " log(doc.getElementById('item3') != null);\n "
830830 + " log(doc.getElementById('item4') != null);\n "
831- + " } catch(e) { log('exception' ); }\n "
831+ + " } catch(e) { log(e.name ); }\n "
832832 + " }\n "
833833 + LOAD_XML_DOCUMENT_FROM_STRING_FUNCTION
834834 + "</script></head>\n "
@@ -855,7 +855,7 @@ public void getElementById_html() throws Exception {
855855 + " var doc = " + callLoadXMLDocumentFromString ("text" ) + ";\n "
856856 + " log(doc.getElementById('form1') != null);\n "
857857 + " log(doc.getElementById('div1') != null);\n "
858- + " } catch(e) { log('exception' ); }\n "
858+ + " } catch(e) { log(e.name ); }\n "
859859 + " }\n "
860860 + LOAD_XML_DOCUMENT_FROM_STRING_FUNCTION
861861 + "</script></head>\n "
@@ -881,7 +881,7 @@ public void getElementById_xhtml() throws Exception {
881881 + " var doc = " + callLoadXMLDocumentFromString ("text" ) + ";\n "
882882 + " log(doc.getElementById('form1') != null);\n "
883883 + " log(doc.getElementById('div1') != null);\n "
884- + " } catch(e) { log('exception' ); }\n "
884+ + " } catch(e) { log(e.name ); }\n "
885885 + " }\n "
886886 + LOAD_XML_DOCUMENT_FROM_STRING_FUNCTION
887887 + "</script></head>\n "
@@ -908,7 +908,7 @@ public void xpathWithNamespaces() throws Exception {
908908 + " log(doc.evaluate('count(//book)', doc.documentElement, "
909909 + "null, XPathResult.NUMBER_TYPE, null).numberValue);\n "
910910 + " } catch (e) {\n "
911- + " log('exception' );\n "
911+ + " log(e.name );\n "
912912 + " }\n "
913913 + " }\n "
914914 + " }\n "
0 commit comments