Skip to content

Commit 6dfc873

Browse files
committed
streamline error test
1 parent 2e89928 commit 6dfc873

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/test/java/org/htmlunit/javascript/host/css/CSSSelector2Test.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ public class CSSSelector2Test extends WebDriverTestCase {
3535
+ LOG_TITLE_FUNCTION
3636
+ " try {\n"
3737
+ " log(document.querySelector(':placeholder-shown'));\n"
38-
+ " } catch (exception) {\n"
39-
+ " log(exception.name);\n"
40-
+ " }\n"
38+
+ " } catch (e) { logEx(e); }\n"
4139
+ " }\n"
4240
+ "</script>\n"
4341
+ "</head>\n";
@@ -50,9 +48,7 @@ public class CSSSelector2Test extends WebDriverTestCase {
5048
+ LOG_TITLE_FUNCTION
5149
+ " try {\n"
5250
+ " log(document.querySelector(':-ms-input-placeholder'));\n"
53-
+ " } catch (exception) {\n"
54-
+ " log(exception.name);\n"
55-
+ " }\n"
51+
+ " } catch (e) { logEx(e); }\n"
5652
+ " }\n"
5753
+ "</script>\n"
5854
+ "</head>\n";
@@ -133,7 +129,7 @@ public void placeholderShown_noInput() throws Exception {
133129
* @throws Exception if the test fails
134130
*/
135131
@Test
136-
@Alerts("SyntaxError")
132+
@Alerts("SyntaxError/DOMException")
137133
public void msPlaceholder() throws Exception {
138134
final String html = MS_PLACEHOLDER_HTML_HEAD
139135
+ "<body onload='test();'>\n"
@@ -148,7 +144,7 @@ public void msPlaceholder() throws Exception {
148144
* @throws Exception if the test fails
149145
*/
150146
@Test
151-
@Alerts("SyntaxError")
147+
@Alerts("SyntaxError/DOMException")
152148
public void msPlaceholder_number() throws Exception {
153149
final String html = MS_PLACEHOLDER_HTML_HEAD
154150
+ "<body onload='test();'>\n"
@@ -163,7 +159,7 @@ public void msPlaceholder_number() throws Exception {
163159
* @throws Exception if the test fails
164160
*/
165161
@Test
166-
@Alerts("SyntaxError")
162+
@Alerts("SyntaxError/DOMException")
167163
public void msPlaceholder_displayNone() throws Exception {
168164
final String html = MS_PLACEHOLDER_HTML_HEAD
169165
+ "<body onload='test();'>\n"
@@ -177,7 +173,7 @@ public void msPlaceholder_displayNone() throws Exception {
177173
* @throws Exception if the test fails
178174
*/
179175
@Test
180-
@Alerts("SyntaxError")
176+
@Alerts("SyntaxError/DOMException")
181177
public void msPlaceholder_hasValue() throws Exception {
182178
final String html = MS_PLACEHOLDER_HTML_HEAD
183179
+ "<body onload='test();'>\n"
@@ -191,7 +187,7 @@ public void msPlaceholder_hasValue() throws Exception {
191187
* @throws Exception if the test fails
192188
*/
193189
@Test
194-
@Alerts("SyntaxError")
190+
@Alerts("SyntaxError/DOMException")
195191
public void msPlaceholder_noInput() throws Exception {
196192
final String html = MS_PLACEHOLDER_HTML_HEAD
197193
+ "<body onload='test();'>\n"

0 commit comments

Comments
 (0)