From: <rb...@us...> - 2013-11-04 22:27:55
|
Revision: 8738 http://sourceforge.net/p/htmlunit/code/8738 Author: rbri Date: 2013-11-04 22:27:52 +0000 (Mon, 04 Nov 2013) Log Message: ----------- revert some of the last changes for IE10 [patch frank danek] Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Event.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/UIEvent.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Event3Test.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/EventTest.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Event.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Event.java 2013-11-03 16:22:06 UTC (rev 8737) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/Event.java 2013-11-04 22:27:52 UTC (rev 8738) @@ -628,7 +628,8 @@ * Returns the return value associated with the event. * @return the return value associated with the event */ - @JsxGetter(@WebBrowser(value = IE, maxVersion = 9)) + //TODO [IE10] returnValue exists only on BeforeUnloadEvent for IE10 and FF17 + @JsxGetter public Object getReturnValue() { return returnValue_; } @@ -637,7 +638,8 @@ * Sets the return value associated with the event. * @param returnValue the return value associated with the event */ - @JsxSetter(@WebBrowser(value = IE, maxVersion = 9)) + @JsxSetter + //TODO [IE10] returnValue exists only on BeforeUnloadEvent for IE10 and FF17 public void setReturnValue(final Object returnValue) { returnValue_ = returnValue; } Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/UIEvent.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/UIEvent.java 2013-11-03 16:22:06 UTC (rev 8737) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/UIEvent.java 2013-11-04 22:27:52 UTC (rev 8738) @@ -22,6 +22,7 @@ import com.gargoylesoftware.htmlunit.javascript.configuration.JsxClass; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxFunction; import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter; +import com.gargoylesoftware.htmlunit.javascript.configuration.JsxSetter; import com.gargoylesoftware.htmlunit.javascript.configuration.WebBrowser; /** @@ -90,6 +91,22 @@ } /** + * @return indicates if event propagation is stopped + */ + @JsxGetter + public boolean getCancelBubble() { + return super.getCancelBubble(); + } + + /** + * @param newValue indicates if event propagation is stopped + */ + @JsxSetter + public void setCancelBubble(final boolean newValue) { + super.setCancelBubble(newValue); + } + + /** * Returns the view from which the event was generated. In browsers, this is the originating window. * * @return the view from which the event was generated Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java 2013-11-03 16:22:06 UTC (rev 8737) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HTMLParser2Test.java 2013-11-04 22:27:52 UTC (rev 8738) @@ -796,17 +796,6 @@ @Test @Alerts(DEFAULT = { "3", "2", "2", "3", "2", "3" }, IE8 = { "3", "3", "2", "4", "4", "3" }) - @NotYetImplemented(IE8) - public void childNodes_imgage() throws Exception { - loadPageWithAlerts2(createHtmlForChildNodes("img")); - } - - /** - * @throws Exception if the test fails - */ - @Test - @Alerts(DEFAULT = { "3", "2", "2", "3", "2", "3" }, - IE8 = { "3", "3", "2", "4", "4", "3" }) @NotYetImplemented({ IE8, FF17 }) public void childNodes_image() throws Exception { loadPageWithAlerts2(createHtmlForChildNodes("image")); Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Event3Test.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Event3Test.java 2013-11-03 16:22:06 UTC (rev 8737) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/Event3Test.java 2013-11-04 22:27:52 UTC (rev 8738) @@ -16,6 +16,7 @@ import static com.gargoylesoftware.htmlunit.BrowserRunner.Browser.FF; import static com.gargoylesoftware.htmlunit.BrowserRunner.Browser.IE; +import static com.gargoylesoftware.htmlunit.BrowserRunner.Browser.IE10; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertSame; @@ -282,7 +283,7 @@ * @throws Exception if the test fails */ @Test - @Browsers(FF) + @Browsers({ FF, IE10 }) public void testFF_StopPropagation() throws Exception { testFF_StopPropagation("stopPropagation()"); testFF_StopPropagation("cancelBubble=true"); Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/EventTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/EventTest.java 2013-11-03 16:22:06 UTC (rev 8737) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/EventTest.java 2013-11-04 22:27:52 UTC (rev 8738) @@ -387,8 +387,9 @@ * @throws Exception if an error occurs */ @Test - @Alerts(DEFAULT = { "[object Event]", "false" }, + @Alerts(DEFAULT = { "[object Event]", "true" }, IE8 = { "[object]", "undefined" }) + // TODO [IE10] must be true for IE10 (and FF17) public void testBubbles() throws Exception { final String html = "<html><body onload='test(event)'><script>\n" |