File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
src/test/java/org/htmlunit/javascript/host/html Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -1660,19 +1660,28 @@ private void doTestQuerySelectorAll_badSelector(final String selector) throws Ex
16601660 */
16611661 @ Test
16621662 @ Alerts ("SyntaxError/DOMException" )
1663- public void querySelector_badSelector () throws Exception {
1663+ public void querySelector_badSelectorJQueryCustomSelectors () throws Exception {
16641664 for (final String selector : HTMLDocumentTest .JQUERY_CUSTOM_SELECTORS ) {
16651665 doTestQuerySelector_badSelector (selector );
16661666 }
16671667 }
16681668
1669+ /**
1670+ * @throws Exception if the test fails
1671+ */
1672+ @ Test
1673+ @ Alerts ("SyntaxError/DOMException" )
1674+ public void querySelector_badSelectorJQueryBrowserTest () throws Exception {
1675+ doTestQuerySelector_badSelector ("[s!='']:x" );
1676+ }
1677+
16691678 private void doTestQuerySelector_badSelector (final String selector ) throws Exception {
16701679 final String html = DOCTYPE_HTML
16711680 + "<html><body><div id='it'></div><script>\n "
16721681 + LOG_TITLE_FUNCTION
16731682 + "try {\n "
1674- + " document.getElementById('it').querySelector('" + selector + "' );\n "
1675- + " log(' working " + selector + "' );\n "
1683+ + " document.getElementById('it').querySelector(\" " + selector + "\" );\n "
1684+ + " log(\" working " + selector + "\" );\n "
16761685 + "} catch(e) { logEx(e); }\n "
16771686 + "</script></body></html>" ;
16781687
You can’t perform that action at this time.
0 commit comments