[HtmlUnit] SVN: [15446] trunk/htmlunit/src
rbri--- via HtmlUnit-develop <[email protected]>
| Newsgroups | gmane.comp.java.htmlunit.devel |
|---|---|
| Message-ID | <[email protected]> |
Revision: 15446
http://sourceforge.net/p/htmlunit/code/15446
Author: rbri
Date: 2018-07-09 13:29:28 +0000 (Mon, 09 Jul 2018)
Log Message:
-----------
ff60 support (wip)
Modified Paths:
--------------
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEvent.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseEvent.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PointerEvent.java
trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEvent.java
trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/ElementPropertiesTest.java
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2018-07-09 10:23:36 UTC (rev 15445)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2018-07-09 13:29:28 UTC (rev 15446)
@@ -246,6 +246,10 @@
@BrowserFeature(FF)
EVENT_TYPE_KEY_EVENTS,
+ /** Supports vendor specific event type 'MouseWheelEvent'. */
+ @BrowserFeature(IE)
+ EVENT_TYPE_MOUSEWHEELEVENT,
+
/** Supports event type 'PointerEvent'. */
@BrowserFeature(IE)
EVENT_TYPE_POINTEREVENT,
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document.java 2018-07-09 10:23:36 UTC (rev 15445)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/dom/Document.java 2018-07-09 13:29:28 UTC (rev 15446)
@@ -19,6 +19,7 @@
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_TYPE_BEFOREUNLOADEVENT;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_TYPE_HASHCHANGEEVENT;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_TYPE_KEY_EVENTS;
+import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_TYPE_MOUSEWHEELEVENT;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_TYPE_POINTEREVENT;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.EVENT_TYPE_PROGRESSEVENT;
import static com.gargoylesoftware.htmlunit.BrowserVersionFeatures.HTMLDOCUMENT_APPLETS_NODELIST;
@@ -113,12 +114,16 @@
import com.gargoylesoftware.htmlunit.javascript.host.css.StyleSheetList;
import com.gargoylesoftware.htmlunit.javascript.host.event.BeforeUnloadEvent;
import com.gargoylesoftware.htmlunit.javascript.host.event.CloseEvent;
+import com.gargoylesoftware.htmlunit.javascript.host.event.CompositionEvent;
import com.gargoylesoftware.htmlunit.javascript.host.event.CustomEvent;
+import com.gargoylesoftware.htmlunit.javascript.host.event.DragEvent;
import com.gargoylesoftware.htmlunit.javascript.host.event.Event;
+import com.gargoylesoftware.htmlunit.javascript.host.event.FocusEvent;
import com.gargoylesoftware.htmlunit.javascript.host.event.HashChangeEvent;
import com.gargoylesoftware.htmlunit.javascript.host.event.KeyboardEvent;
import com.gargoylesoftware.htmlunit.javascript.host.event.MessageEvent;
import com.gargoylesoftware.htmlunit.javascript.host.event.MouseEvent;
+import com.gargoylesoftware.htmlunit.javascript.host.event.MouseWheelEvent;
import com.gargoylesoftware.htmlunit.javascript.host.event.MutationEvent;
import com.gargoylesoftware.htmlunit.javascript.host.event.PointerEvent;
import com.gargoylesoftware.htmlunit.javascript.host.event.PopStateEvent;
@@ -206,6 +211,9 @@
dom3EventMap.put("UIEvent", UIEvent.class);
dom3EventMap.put("CustomEvent", CustomEvent.class);
dom3EventMap.put("CloseEvent", CloseEvent.class);
+ dom3EventMap.put("CompositionEvent", CompositionEvent.class);
+ dom3EventMap.put("FocusEvent", FocusEvent.class);
+ dom3EventMap.put("DragEvent", DragEvent.class);
SUPPORTED_DOM3_EVENT_TYPE_MAP = Collections.unmodifiableMap(dom3EventMap);
final Map<String, Class<? extends Event>> additionalEventMap = new HashMap<>();
@@ -216,6 +224,7 @@
additionalEventMap.put("PointerEvent", PointerEvent.class);
additionalEventMap.put("PopStateEvent", PopStateEvent.class);
additionalEventMap.put("ProgressEvent", ProgressEvent.class);
+ additionalEventMap.put("MouseWheelEvent", MouseWheelEvent.class);
SUPPORTED_VENDOR_EVENT_TYPE_MAP = Collections.unmodifiableMap(additionalEventMap);
}
@@ -1200,14 +1209,16 @@
&& ("Events".equals(eventType)
|| "KeyEvents".equals(eventType) && getBrowserVersion().hasFeature(EVENT_TYPE_KEY_EVENTS)
|| "HashChangeEvent".equals(eventType)
- && getBrowserVersion().hasFeature(EVENT_TYPE_HASHCHANGEEVENT)
+ && getBrowserVersion().hasFeature(EVENT_TYPE_HASHCHANGEEVENT)
|| "BeforeUnloadEvent".equals(eventType)
- && getBrowserVersion().hasFeature(EVENT_TYPE_BEFOREUNLOADEVENT)
+ && getBrowserVersion().hasFeature(EVENT_TYPE_BEFOREUNLOADEVENT)
+ || "MouseWheelEvent".equals(eventType)
+ && getBrowserVersion().hasFeature(EVENT_TYPE_MOUSEWHEELEVENT)
|| "PointerEvent".equals(eventType)
- && getBrowserVersion().hasFeature(EVENT_TYPE_POINTEREVENT)
+ && getBrowserVersion().hasFeature(EVENT_TYPE_POINTEREVENT)
|| "PopStateEvent".equals(eventType)
|| "ProgressEvent".equals(eventType)
- && getBrowserVersion().hasFeature(EVENT_TYPE_PROGRESSEVENT))) {
+ && getBrowserVersion().hasFeature(EVENT_TYPE_PROGRESSEVENT))) {
clazz = SUPPORTED_VENDOR_EVENT_TYPE_MAP.get(eventType);
if (PopStateEvent.class == clazz
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event.java 2018-07-09 10:23:36 UTC (rev 15445)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/Event.java 2018-07-09 13:29:28 UTC (rev 15446)
@@ -534,7 +534,7 @@
/**
* @return indicates if event propagation is stopped
*/
- @JsxGetter(IE)
+ @JsxGetter
public boolean isCancelBubble() {
return stopPropagation_;
}
@@ -542,7 +542,7 @@
/**
* @param newValue indicates if event propagation is stopped
*/
- @JsxSetter(IE)
+ @JsxSetter
public void setCancelBubble(final boolean newValue) {
stopPropagation_ = newValue;
}
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEvent.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEvent.java 2018-07-09 10:23:36 UTC (rev 15445)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/KeyboardEvent.java 2018-07-09 13:29:28 UTC (rev 15446)
@@ -38,6 +38,7 @@
*
* @author Ahmed Ashour
* @author Frank Danek
+ * @author Ronald Brill
*/
@JsxClass
public class KeyboardEvent extends UIEvent {
@@ -851,6 +852,9 @@
private int charCode_;
private int which_;
+ /** Whether or not the "meta" key was pressed during the firing of the event. */
+ private boolean metaKey_;
+
/**
* Creates a new keyboard event instance.
*/
@@ -1130,4 +1134,19 @@
}
}
+ /**
+ * Returns whether or not the "meta" key was pressed during the event firing.
+ * @return whether or not the "meta" key was pressed during the event firing
+ */
+ @JsxGetter
+ public boolean getMetaKey() {
+ return metaKey_;
+ }
+
+ /**
+ * @param metaKey whether Meta has been pressed during this event or not
+ */
+ protected void setMetaKey(final boolean metaKey) {
+ metaKey_ = metaKey;
+ }
}
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseEvent.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseEvent.java 2018-07-09 10:23:36 UTC (rev 15445)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/MouseEvent.java 2018-07-09 13:29:28 UTC (rev 15446)
@@ -111,6 +111,9 @@
/** Switch to disable label handling if we already processing the event triggered from label processing */
private boolean processLabelAfterBubbling_ = true;
+ /** Whether or not the "meta" key was pressed during the firing of the event. */
+ private boolean metaKey_;
+
/**
* Used to build the prototype.
*/
@@ -137,7 +140,6 @@
setShiftKey(shiftKey);
setCtrlKey(ctrlKey);
setAltKey(altKey);
- setMetaKey(false);
if (button != BUTTON_LEFT && button != BUTTON_MIDDLE && button != BUTTON_RIGHT) {
throw new IllegalArgumentException("Invalid button code: " + button);
@@ -318,7 +320,6 @@
setCtrlKey(ctrlKey);
setAltKey(altKey);
setShiftKey(shiftKey);
- setMetaKey(metaKey);
button_ = button;
// Ignore the relatedTarget parameter; we don't support it yet.
}
@@ -395,4 +396,20 @@
public void disableProcessLabelAfterBubbling() {
processLabelAfterBubbling_ = false;
}
+
+ /**
+ * Returns whether or not the "meta" key was pressed during the event firing.
+ * @return whether or not the "meta" key was pressed during the event firing
+ */
+ @JsxGetter
+ public boolean getMetaKey() {
+ return metaKey_;
+ }
+
+ /**
+ * @param metaKey whether Meta has been pressed during this event or not
+ */
+ protected void setMetaKey(final boolean metaKey) {
+ metaKey_ = metaKey;
+ }
}
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PointerEvent.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PointerEvent.java 2018-07-09 10:23:36 UTC (rev 15445)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/PointerEvent.java 2018-07-09 13:29:28 UTC (rev 15446)
@@ -169,7 +169,7 @@
* @param hwTimestamp the initial value of hwTimestamp
* @param isPrimary the initial value of isPrimary
*/
- @JsxFunction
+ @JsxFunction(IE)
public void initPointerEvent(final String type,
final boolean bubbles,
final boolean cancelable,
Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEvent.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEvent.java 2018-07-09 10:23:36 UTC (rev 15445)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/UIEvent.java 2018-07-09 13:29:28 UTC (rev 15446)
@@ -25,7 +25,6 @@
import com.gargoylesoftware.htmlunit.javascript.configuration.JsxConstructor;
import com.gargoylesoftware.htmlunit.javascript.configuration.JsxFunction;
import com.gargoylesoftware.htmlunit.javascript.configuration.JsxGetter;
-import com.gargoylesoftware.htmlunit.javascript.configuration.JsxSetter;
/**
* JavaScript object representing a UI event. For general information on which properties and functions should be
@@ -34,6 +33,7 @@
* @author Daniel Gredler
* @author Ahmed Ashour
* @author Frank Danek
+ * @author Ronald Brill
*/
@JsxClass
public class UIEvent extends Event {
@@ -49,9 +49,6 @@
/** Specifies some detail information about the event. */
private long detail_;
- /** Whether or not the "meta" key was pressed during the firing of the event. */
- private boolean metaKey_;
-
/**
* Creates a new UI event instance.
*/
@@ -100,24 +97,6 @@
}
/**
- * @return indicates if event propagation is stopped
- */
- @Override
- @JsxGetter
- public boolean isCancelBubble() {
- return super.isCancelBubble();
- }
-
- /**
- * @param newValue indicates if event propagation is stopped
- */
- @Override
- @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
@@ -147,21 +126,4 @@
// Ignore the view parameter; we always use the window.
setDetail(detail);
}
-
- /**
- * Returns whether or not the "meta" key was pressed during the event firing.
- * @return whether or not the "meta" key was pressed during the event firing
- */
- @JsxGetter
- public boolean getMetaKey() {
- return metaKey_;
- }
-
- /**
- * @param metaKey whether Meta has been pressed during this event or not
- */
- protected void setMetaKey(final boolean metaKey) {
- metaKey_ = metaKey;
- }
-
}
Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/ElementPropertiesTest.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/ElementPropertiesTest.java 2018-07-09 10:23:36 UTC (rev 15445)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/general/ElementPropertiesTest.java 2018-07-09 13:29:28 UTC (rev 15446)
@@ -18,6 +18,7 @@
import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.EDGE;
import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF;
import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF52;
+import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF60;
import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE;
import static java.nio.charset.StandardCharsets.ISO_8859_1;
@@ -82,7 +83,12 @@
+ " var unknown = document.createElement('harhar');\n"
+ " var div = document.createElement('div');\n"
+ " var svg = document.getElementById('mySvg');\n"
- + " process(" + string + ");\n"
+ + " try{\n"
+ + " process(" + string + ");\n"
+ + " } catch (e) {\n"
+ + " alert('exception');\n"
+ + " return;"
+ + " }\n"
+ " }\n"
+ "\n"
+ " /*\n"
@@ -3017,12 +3023,211 @@
FF60 = "detail,initUIEvent(),layerX,layerY,pageX,pageY,rangeOffset,rangeParent,"
+ "SCROLL_PAGE_DOWN,SCROLL_PAGE_UP,view,which",
IE = "detail,initUIEvent(),view")
- @NotYetImplemented
+ @NotYetImplemented({CHROME, FF})
public void uiEvent() throws Exception {
testString("document.createEvent('UIEvent'), document.createEvent('Event')");
}
/**
+ * Test {@link com.gargoylesoftware.htmlunit.javascript.host.event.DragEvent}.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(CHROME = "dataTransfer",
+ FF52 = "dataTransfer,initDragEvent()",
+ FF60 = "dataTransfer,initDragEvent()",
+ IE = "dataTransfer,initDragEvent(),msConvertURL()")
+ @NotYetImplemented
+ public void dragEvent() throws Exception {
+ testString("document.createEvent('DragEvent'), document.createEvent('MouseEvent')");
+ }
+
+ /**
+ * Test {@link com.gargoylesoftware.htmlunit.javascript.host.event.PointerEvent}.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(CHROME = "getCoalescedEvents(),height,isPrimary,pointerId,pointerType,pressure,"
+ + "tangentialPressure,tiltX,tiltY,twist,width",
+ FF52 = "exception",
+ FF60 = "getCoalescedEvents(),height,isPrimary,pointerId,pointerType,pressure,"
+ + "tangentialPressure,tiltX,tiltY,twist,width",
+ IE = "exception")
+ @NotYetImplemented({CHROME, FF60})
+ public void pointerEvent() throws Exception {
+ testString("new PointerEvent('click'), document.createEvent('MouseEvent')");
+ }
+
+ /**
+ * Test {@link com.gargoylesoftware.htmlunit.javascript.host.event.PointerEvent}.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(CHROME = "exception",
+ FF52 = "exception",
+ FF60 = "exception",
+ IE = "height,hwTimestamp,initPointerEvent(),isPrimary,pointerId,"
+ + "pointerType,pressure,rotation,tiltX,tiltY,width")
+ @NotYetImplemented(IE)
+ public void pointerEvent2() throws Exception {
+ testString(" document.createEvent('PointerEvent'), document.createEvent('MouseEvent')");
+ }
+
+ /**
+ * Test {@link com.gargoylesoftware.htmlunit.javascript.host.event.WheelEvent}.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(CHROME = "deltaMode,deltaX,deltaY,deltaZ,DOM_DELTA_LINE,DOM_DELTA_PAGE,"
+ + "DOM_DELTA_PIXEL,wheelDelta,wheelDeltaX,wheelDeltaY",
+ FF52 = "exception",
+ FF60 = "exception",
+ IE = "deltaMode,deltaX,deltaY,deltaZ,DOM_DELTA_LINE,DOM_DELTA_PAGE,DOM_DELTA_PIXEL,initWheelEvent()")
+ @NotYetImplemented({CHROME, IE})
+ public void wheelEvent() throws Exception {
+ testString("document.createEvent('WheelEvent'), document.createEvent('MouseEvent')");
+ }
+
+ /**
+ * Test {@link com.gargoylesoftware.htmlunit.javascript.host.event.MouseEvent}.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(CHROME = "altKey,button,buttons,clientX,clientY,ctrlKey,fromElement,getModifierState(),"
+ + "initMouseEvent(),layerX,layerY,metaKey,movementX,movementY,offsetX,offsetY,"
+ + "pageX,pageY,relatedTarget,screenX,screenY,shiftKey,toElement,x,y",
+ FF52 = "altKey,button,buttons,clientX,clientY,ctrlKey,getModifierState(),initMouseEvent(),"
+ + "initNSMouseEvent(),metaKey,movementX,movementY,MOZ_SOURCE_CURSOR,MOZ_SOURCE_ERASER,"
+ + "MOZ_SOURCE_KEYBOARD,MOZ_SOURCE_MOUSE,MOZ_SOURCE_PEN,MOZ_SOURCE_TOUCH,MOZ_SOURCE_UNKNOWN,"
+ + "mozInputSource,mozPressure,offsetX,offsetY,region,relatedTarget,screenX,screenY,shiftKey",
+ FF60 = "altKey,button,buttons,clientX,clientY,ctrlKey,getModifierState(),initMouseEvent(),"
+ + "initNSMouseEvent(),metaKey,movementX,movementY,MOZ_SOURCE_CURSOR,MOZ_SOURCE_ERASER,"
+ + "MOZ_SOURCE_KEYBOARD,MOZ_SOURCE_MOUSE,MOZ_SOURCE_PEN,MOZ_SOURCE_TOUCH,MOZ_SOURCE_UNKNOWN,"
+ + "mozInputSource,mozPressure,offsetX,offsetY,region,relatedTarget,screenX,screenY,shiftKey,x,y",
+ IE = "altKey,button,buttons,clientX,clientY,ctrlKey,fromElement,getModifierState(),initMouseEvent(),"
+ + "layerX,layerY,metaKey,offsetX,offsetY,pageX,pageY,relatedTarget,screenX,screenY,shiftKey,"
+ + "toElement,which,x,y")
+ @NotYetImplemented
+ public void mouseEvent() throws Exception {
+ testString("document.createEvent('MouseEvent'), document.createEvent('UIEvent')");
+ }
+
+ /**
+ * Test {@link com.gargoylesoftware.htmlunit.javascript.host.event.CompositionEvent}.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(CHROME = "data,initCompositionEvent()",
+ FF60 = "data,initCompositionEvent(),locale",
+ FF52 = "data,initCompositionEvent(),locale",
+ IE = "data,initCompositionEvent(),locale")
+ @NotYetImplemented
+ public void compositionEvent() throws Exception {
+ testString("document.createEvent('CompositionEvent'), document.createEvent('UIEvent')");
+ }
+
+ /**
+ * Test {@link com.gargoylesoftware.htmlunit.javascript.host.event.FocusEvent}.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(CHROME = "relatedTarget",
+ FF52 = "exception",
+ FF60 = "relatedTarget",
+ IE = "initFocusEvent(),relatedTarget")
+ @NotYetImplemented
+ public void focusEvent() throws Exception {
+ testString("document.createEvent('FocusEvent'), document.createEvent('UIEvent')");
+ }
+
+ /**
+ * Test {@link com.gargoylesoftware.htmlunit.javascript.host.event.InputEvent}.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(CHROME = "data,dataTransfer,getTargetRanges(),inputType,isComposing",
+ FF52 = "isComposing",
+ FF60 = "isComposing",
+ IE = "exception")
+ @NotYetImplemented({CHROME, FF})
+ public void inputEvent() throws Exception {
+ testString("new InputEvent('input'), document.createEvent('UIEvent')");
+ }
+
+ /**
+ * Test {@link com.gargoylesoftware.htmlunit.javascript.host.event.MouseWheelEvent}.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(CHROME = "exception",
+ FF52 = "exception",
+ FF60 = "exception",
+ IE = "altKey,button,buttons,clientX,clientY,ctrlKey,fromElement,getModifierState(),initMouseEvent(),"
+ + "initMouseWheelEvent(),layerX,layerY,metaKey,offsetX,offsetY,pageX,pageY,relatedTarget,"
+ + "screenX,screenY,shiftKey,toElement,wheelDelta,which,x,y")
+ @NotYetImplemented(IE)
+ public void mouseWheelEvent() throws Exception {
+ testString("document.createEvent('MouseWheelEvent'), document.createEvent('UIEvent')");
+ }
+
+ /**
+ * Test {@link com.gargoylesoftware.htmlunit.javascript.host.event.SVGZoomEvent}.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(CHROME = "exception",
+ FF52 = "newScale,newTranslate,previousScale,previousTranslate",
+ FF60 = "exception",
+ IE = "exception")
+ @NotYetImplemented(FF52)
+ public void svgZoomEvent() throws Exception {
+ testString("document.createEvent('SVGZoomEvent'), document.createEvent('UIEvent')");
+ }
+
+ /**
+ * Test {@link com.gargoylesoftware.htmlunit.javascript.host.event.TextEvent}.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(CHROME = "data,initTextEvent()",
+ FF52 = "data,initCompositionEvent(),locale",
+ FF60 = "data,initCompositionEvent(),locale",
+ IE = "data,DOM_INPUT_METHOD_DROP,DOM_INPUT_METHOD_HANDWRITING,DOM_INPUT_METHOD_IME,"
+ + "DOM_INPUT_METHOD_KEYBOARD,DOM_INPUT_METHOD_MULTIMODAL,DOM_INPUT_METHOD_OPTION,"
+ + "DOM_INPUT_METHOD_PASTE,DOM_INPUT_METHOD_SCRIPT,DOM_INPUT_METHOD_UNKNOWN,"
+ + "DOM_INPUT_METHOD_VOICE,initTextEvent(),inputMethod,locale")
+ @NotYetImplemented
+ public void textEvent() throws Exception {
+ testString("document.createEvent('TextEvent'), document.createEvent('UIEvent')");
+ }
+
+ /**
+ * Test {@link com.gargoylesoftware.htmlunit.javascript.host.event.TouchEvent}.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(CHROME = "altKey,changedTouches,ctrlKey,metaKey,shiftKey,targetTouches,touches",
+ FF52 = "exception",
+ FF60 = "exception",
+ IE = "exception")
+ @NotYetImplemented(CHROME)
+ public void touchEvent2() throws Exception {
+ testString("new TouchEvent('touch'), document.createEvent('UIEvent')");
+ }
+
+ /**
* Test {@link com.gargoylesoftware.htmlunit.html.HtmlSlot}.
*
* @throws Exception if the test fails
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot