From: <rb...@us...> - 2014-01-19 13:43:50
|
Revision: 8996 http://sourceforge.net/p/htmlunit/code/8996 Author: rbri Date: 2014-01-19 13:43:47 +0000 (Sun, 19 Jan 2014) Log Message: ----------- CSS: Parsing of the :not pseudo class fixed, only simple selectors are allowed. Modified Paths: -------------- trunk/htmlunit/src/changes/changes.xml trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSelectorTest.java Modified: trunk/htmlunit/src/changes/changes.xml =================================================================== --- trunk/htmlunit/src/changes/changes.xml 2014-01-19 13:12:49 UTC (rev 8995) +++ trunk/htmlunit/src/changes/changes.xml 2014-01-19 13:43:47 UTC (rev 8996) @@ -8,6 +8,10 @@ <body> <release version="2.14" date="???" description="FF24, Bugfixes, initial work on IE11"> + <action type="fix" dev="rbri"> + CSS: Parsing of the :not pseudo class fixed, only simple selectors are allowed. + This was a problem with CSSParser and is fixed in version 0.9.13. + </action> <action type="add" dev="asashour" issue="1570"> JavaScript: ClientRect: add 'width' and 'height' properties. </action> Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSelectorTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSelectorTest.java 2014-01-19 13:12:49 UTC (rev 8995) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/css/CSSSelectorTest.java 2014-01-19 13:43:47 UTC (rev 8996) @@ -814,9 +814,41 @@ } /** + * see http://dev.w3.org/csswg/selectors3/#negation and + * http://dev.w3.org/csswg/selectors3/#simple-selectors-dfn. + * * @throws Exception if an error occurs */ @Test + @Alerts("exception") + public void invalid_not() throws Exception { + final String html = "<html><head><title>First</title>\n" + + "<meta http-equiv='X-UA-Compatible' content='IE=edge'>\n" + + "<script>\n" + + "function test() {\n" + + " if (document.querySelectorAll) {\n" + + " try {\n" + + " alert(document.querySelectorAll('p a:not(a:first-of-type)')[0].id);\n" + + " } catch(e) {alert('exception')}\n" + + " }\n" + + "}\n" + + "</script></head>\n" + + "<body onload='test()'>\n" + + "<p>\n" + + " <strong id='strong'>This</strong> is a short blurb\n" + + " <a id='link_1' href='#'>with a link</a> or\n" + + " <a id='link_2' href='#'>two</a>.\n" + + " Or <cite id='with_title' title='hello world!'>a citation</cite>.\n" + + "</p>\n" + + "</body></html>"; + + loadPageWithAlerts2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test @Alerts(DEFAULT = "id4", IE8 = "exception") public void last_of_type() throws Exception { |