From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- testing/web-platform/tests/uievents/META.yml | 5 + testing/web-platform/tests/uievents/README.md | 3 + .../tests/uievents/click/auxclick_event.html | 81 +++ .../click/click_event_target_child_parent.html | 85 +++ .../click/click_event_target_siblings.html | 102 ++++ .../uievents/click/click_events_on_input.html | 62 ++ .../tests/uievents/click/contextmenu_event.html | 51 ++ .../tests/uievents/click/dblclick_event_mouse.html | 44 ++ .../tests/uievents/constructors/README.md | 4 + .../constructors/inputevent-constructor.html | 25 + .../tests/uievents/hierarchy/README.md | 34 ++ .../web-platform/tests/uievents/historical.html | 11 + .../tests/uievents/idlharness.window.js | 21 + .../tests/uievents/interface/README.md | 13 + .../uievents/interface/click-event-manual.htm | 21 + .../tests/uievents/interface/click-event.htm | 32 + .../uievents/interface/dblclick-event-manual.htm | 21 + .../interface/keyboard-accesskey-click-event.html | 56 ++ .../uievents/interface/keyboard-click-event.html | 50 ++ .../web-platform/tests/uievents/keyboard/README.md | 3 + .../uievents/keyboard/key-101en-us-manual.html | 91 +++ .../uievents/keyboard/key-102fr-fr-manual.html | 93 +++ .../web-platform/tests/uievents/keyboard/key.css | 118 ++++ .../web-platform/tests/uievents/keyboard/key.js | 671 +++++++++++++++++++++ .../keyboard/modifier-keys-combinations.html | 43 ++ .../tests/uievents/keyboard/modifier-keys.html | 35 ++ .../uievents/legacy-domevents-tests/Status.html | 26 + ...essingInstruction.DOMCharacterDataModified.html | 32 + .../approved/dispatchEvent.click.checkbox.html | 80 +++ .../approved/domnodeinserted.html | 26 + .../approved/stopImmediatePropagation.effect.html | 71 +++ .../approved/stopPropagation.deferred.effect.html | 70 +++ ...cessingInstruction.DOMCharacterDataModified.xml | 32 + .../submissions/Microsoft/CompositionEvent.html | 69 +++ .../Microsoft/DOMAttrModified.attrChange.html | 65 ++ .../Microsoft/DOMAttrModified.attrName.html | 66 ++ .../submissions/Microsoft/DOMAttrModified.html | 66 ++ .../Microsoft/DOMAttrModified.newValue.html | 65 ++ .../Microsoft/DOMAttrModified.prevValue.html | 65 ++ .../Microsoft/DOMAttrModified.relatedNode.html | 66 ++ .../Microsoft/DOMCharacterDataModified.html | 62 ++ .../submissions/Microsoft/DOMNodeInserted.html | 64 ++ .../submissions/Microsoft/DOMNodeRemoved.html | 62 ++ .../submissions/Microsoft/DOMSubtreeModified.html | 72 +++ .../Microsoft/Event.defaultPrevented.html | 68 +++ .../submissions/Microsoft/Event.eventPhase.html | 77 +++ .../Microsoft/Event.stopPropagation.html | 85 +++ .../submissions/Microsoft/KeyboardEvent.key.html | 56 ++ .../Microsoft/KeyboardEvent.location.html | 74 +++ .../Microsoft/KeyboardEvent.modifiers.html | 66 ++ .../submissions/Microsoft/MouseEvent.button.html | 65 ++ .../Microsoft/MouseEvent.image.map.area.html | 70 +++ .../Microsoft/MouseEvent.preventDefault.html | 94 +++ .../Microsoft/MutationEvent.hasFeature.html | 67 ++ .../Microsoft/MutationEvent.initMutationEvent.html | 72 +++ .../Microsoft/MutationEvent.relatedNode.html | 76 +++ ...gInstruction.DOMCharacterDataModified.fail.html | 18 + ...cessingInstruction.DOMCharacterDataModified.xml | 63 ++ .../Microsoft/TextEvent.hasFeature.html | 60 ++ .../Microsoft/TextEvent.initTextEvent.html | 66 ++ .../Microsoft/TextEvent.inputMode.IME.html | 69 +++ .../Microsoft/TextEvent.inputMode.drop.html | 71 +++ .../Microsoft/TextEvent.inputMode.keyboard.html | 67 ++ .../Microsoft/TextEvent.inputMode.paste.html | 71 +++ .../Microsoft/TextEvent.inputMode.script.html | 63 ++ .../Microsoft/UIEvent.load.stylesheet.html | 59 ++ .../Microsoft/WheelEvent.Capture.Bubble.html | 90 +++ .../Microsoft/WheelEvent.ctrlKey.zoom.html | 93 +++ .../Microsoft/WheelEvent.deltaMode.html | 76 +++ .../Microsoft/WheelEvent.hasFeature.html | 60 ++ .../Microsoft/WheelEvent.initWheelEvent.html | 76 +++ .../WheelEvent.preventDefault.scroll.html | 91 +++ .../submissions/Microsoft/abort.img.html | 74 +++ .../submissions/Microsoft/abort.testresult.html | 30 + .../submissions/Microsoft/blur.html | 57 ++ .../Microsoft/compositionstart.data.html | 66 ++ .../Microsoft/compositionstart.keydown.html | 76 +++ .../Microsoft/compositionstart.preventDefault.html | 73 +++ .../EventListener.dispatch.new.event.html | 77 +++ ...cessingInstruction.DOMCharacterDataModified.xml | 32 + .../Microsoft/dispatchEvent.click.checkbox.html | 93 +++ .../submissions/Microsoft/error.image.html | 65 ++ .../submissions/Microsoft/focusin.html | 61 ++ .../Microsoft/focusin.relatedTarget.html | 64 ++ .../Microsoft/focusout.relatedTarget.html | 64 ++ .../submissions/Microsoft/hasFeature.Events.html | 52 ++ .../Microsoft/hasFeature.feature.string.html | 80 +++ .../submissions/Microsoft/load.image.html | 82 +++ .../submissions/Microsoft/mouseenter.ctrlKey.html | 64 ++ .../Microsoft/mouseenter.relatedTarget.html | 69 +++ .../Microsoft/mouseleave.relatedTarget.html | 69 +++ .../submissions/Microsoft/support/16kb.js | 140 +++++ .../Microsoft/support/InvalidBitMap.png | 1 + .../submissions/Microsoft/support/iepreview.png | Bin 0 -> 76515 bytes .../submissions/Microsoft/support/style01.css | 3 + .../uievents/legacy/Event-subclasses-init.html | 17 + .../tests/uievents/mouse/attributes.html | 61 ++ .../mouse/cancel-mousedown-in-subframe.html | 64 ++ .../mouse/layout_change_should_fire_mouseover.html | 97 +++ .../uievents/mouse/mouse_buttons_back_forward.html | 56 ++ .../mouse/mouseenter-mouseleave-on-drag.html | 187 ++++++ .../uievents/mouse/mouseevent_move_button.html | 102 ++++ ...mousemove_prevent_default_action.tentative.html | 93 +++ .../resources/mouse-event-reporter-subframe.html | 37 ++ .../tests/uievents/mouse/resources/utils.js | 27 + .../tests/uievents/order-of-events/README.md | 15 + .../focus-events/focus-automated-blink-webkit.html | 159 +++++ .../focus-events/focus-contained.html | 94 +++ .../focus-management-expectations.html | 48 ++ .../order-of-events/focus-events/focus.html | 94 +++ .../focus-events/legacy-manual.html | 84 +++ .../order-of-events/mouse-events/click-cancel.html | 37 ++ .../mouse-events/click-on-body.html | 57 ++ .../order-of-events/mouse-events/click-on-div.html | 47 ++ .../mouse-events/click-on-html.html | 67 ++ .../order-of-events/mouse-events/click-order.html | 86 +++ .../mouse-events/mouseevents-mousemove.htm | 92 +++ .../mouse-events/mousemove-across.html | 162 +++++ .../mouse-events/mousemove-between.html | 132 ++++ .../mouse-events/mouseover-out.html | 141 +++++ .../order-of-events/mouse-events/wheel-basic.html | 91 +++ .../mouse-events/wheel-scrolling.html | 109 ++++ .../tests/uievents/resources/eventrecorder.js | 315 ++++++++++ 123 files changed, 8760 insertions(+) create mode 100644 testing/web-platform/tests/uievents/META.yml create mode 100644 testing/web-platform/tests/uievents/README.md create mode 100644 testing/web-platform/tests/uievents/click/auxclick_event.html create mode 100644 testing/web-platform/tests/uievents/click/click_event_target_child_parent.html create mode 100644 testing/web-platform/tests/uievents/click/click_event_target_siblings.html create mode 100644 testing/web-platform/tests/uievents/click/click_events_on_input.html create mode 100644 testing/web-platform/tests/uievents/click/contextmenu_event.html create mode 100644 testing/web-platform/tests/uievents/click/dblclick_event_mouse.html create mode 100644 testing/web-platform/tests/uievents/constructors/README.md create mode 100644 testing/web-platform/tests/uievents/constructors/inputevent-constructor.html create mode 100644 testing/web-platform/tests/uievents/hierarchy/README.md create mode 100644 testing/web-platform/tests/uievents/historical.html create mode 100644 testing/web-platform/tests/uievents/idlharness.window.js create mode 100644 testing/web-platform/tests/uievents/interface/README.md create mode 100644 testing/web-platform/tests/uievents/interface/click-event-manual.htm create mode 100644 testing/web-platform/tests/uievents/interface/click-event.htm create mode 100644 testing/web-platform/tests/uievents/interface/dblclick-event-manual.htm create mode 100644 testing/web-platform/tests/uievents/interface/keyboard-accesskey-click-event.html create mode 100644 testing/web-platform/tests/uievents/interface/keyboard-click-event.html create mode 100644 testing/web-platform/tests/uievents/keyboard/README.md create mode 100644 testing/web-platform/tests/uievents/keyboard/key-101en-us-manual.html create mode 100644 testing/web-platform/tests/uievents/keyboard/key-102fr-fr-manual.html create mode 100644 testing/web-platform/tests/uievents/keyboard/key.css create mode 100644 testing/web-platform/tests/uievents/keyboard/key.js create mode 100644 testing/web-platform/tests/uievents/keyboard/modifier-keys-combinations.html create mode 100644 testing/web-platform/tests/uievents/keyboard/modifier-keys.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/Status.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/approved/ProcessingInstruction.DOMCharacterDataModified.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/approved/dispatchEvent.click.checkbox.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/approved/domnodeinserted.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/approved/stopImmediatePropagation.effect.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/approved/stopPropagation.deferred.effect.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/approved/support/ProcessingInstruction.DOMCharacterDataModified.xml create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/CompositionEvent.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.attrChange.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.attrName.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.newValue.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.prevValue.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.relatedNode.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMCharacterDataModified.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMNodeInserted.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMNodeRemoved.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMSubtreeModified.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/Event.defaultPrevented.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/Event.eventPhase.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/Event.stopPropagation.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/KeyboardEvent.key.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/KeyboardEvent.location.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/KeyboardEvent.modifiers.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MouseEvent.button.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MouseEvent.image.map.area.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MouseEvent.preventDefault.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MutationEvent.hasFeature.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MutationEvent.initMutationEvent.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MutationEvent.relatedNode.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.fail.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.xml create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.hasFeature.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.initTextEvent.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.IME.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.drop.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.keyboard.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.paste.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.script.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/UIEvent.load.stylesheet.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.Capture.Bubble.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.ctrlKey.zoom.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.deltaMode.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.hasFeature.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.initWheelEvent.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.preventDefault.scroll.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/abort.img.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/abort.testresult.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/blur.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/compositionstart.data.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/compositionstart.keydown.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/compositionstart.preventDefault.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/converted/EventListener.dispatch.new.event.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/converted/support/ProcessingInstruction.DOMCharacterDataModified.xml create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/dispatchEvent.click.checkbox.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/error.image.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.relatedTarget.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusout.relatedTarget.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.Events.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.feature.string.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/load.image.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/mouseenter.ctrlKey.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/mouseenter.relatedTarget.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/mouseleave.relatedTarget.html create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/16kb.js create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/InvalidBitMap.png create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/iepreview.png create mode 100644 testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/style01.css create mode 100644 testing/web-platform/tests/uievents/legacy/Event-subclasses-init.html create mode 100644 testing/web-platform/tests/uievents/mouse/attributes.html create mode 100644 testing/web-platform/tests/uievents/mouse/cancel-mousedown-in-subframe.html create mode 100644 testing/web-platform/tests/uievents/mouse/layout_change_should_fire_mouseover.html create mode 100644 testing/web-platform/tests/uievents/mouse/mouse_buttons_back_forward.html create mode 100644 testing/web-platform/tests/uievents/mouse/mouseenter-mouseleave-on-drag.html create mode 100644 testing/web-platform/tests/uievents/mouse/mouseevent_move_button.html create mode 100644 testing/web-platform/tests/uievents/mouse/mousemove_prevent_default_action.tentative.html create mode 100644 testing/web-platform/tests/uievents/mouse/resources/mouse-event-reporter-subframe.html create mode 100644 testing/web-platform/tests/uievents/mouse/resources/utils.js create mode 100644 testing/web-platform/tests/uievents/order-of-events/README.md create mode 100644 testing/web-platform/tests/uievents/order-of-events/focus-events/focus-automated-blink-webkit.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/focus-events/focus-contained.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/focus-events/focus-management-expectations.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/focus-events/focus.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/focus-events/legacy-manual.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/click-cancel.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-body.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-div.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-html.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/click-order.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseevents-mousemove.htm create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/mousemove-across.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/mousemove-between.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseover-out.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/wheel-basic.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/wheel-scrolling.html create mode 100644 testing/web-platform/tests/uievents/resources/eventrecorder.js (limited to 'testing/web-platform/tests/uievents') diff --git a/testing/web-platform/tests/uievents/META.yml b/testing/web-platform/tests/uievents/META.yml new file mode 100644 index 0000000000..2f1ec58efe --- /dev/null +++ b/testing/web-platform/tests/uievents/META.yml @@ -0,0 +1,5 @@ +spec: https://w3c.github.io/uievents/ +suggested_reviewers: + - jdm + - NavidZ + - zqzhang diff --git a/testing/web-platform/tests/uievents/README.md b/testing/web-platform/tests/uievents/README.md new file mode 100644 index 0000000000..a5112c52a2 --- /dev/null +++ b/testing/web-platform/tests/uievents/README.md @@ -0,0 +1,3 @@ +To run the UIEvents tests, go to: + +http://wpt.live/uievents/order-of-events/mouse-events/ diff --git a/testing/web-platform/tests/uievents/click/auxclick_event.html b/testing/web-platform/tests/uievents/click/auxclick_event.html new file mode 100644 index 0000000000..8bb2e137f5 --- /dev/null +++ b/testing/web-platform/tests/uievents/click/auxclick_event.html @@ -0,0 +1,81 @@ + + + + + Clicking with primary vs non-primary buttons + + + + + + + + + +

Clicking with primary vs non-primary buttons

+

Double-click on the green box with a non-primary button. When using mouse any button other than the left button is non-primary. If a "PASS" result appears, the test passes; otherwise, it fails.

+
+ + + diff --git a/testing/web-platform/tests/uievents/click/click_event_target_child_parent.html b/testing/web-platform/tests/uievents/click/click_event_target_child_parent.html new file mode 100644 index 0000000000..a09e5532af --- /dev/null +++ b/testing/web-platform/tests/uievents/click/click_event_target_child_parent.html @@ -0,0 +1,85 @@ + + + + + Click targets the nearest common ancestor + + + + + + + + +

Click targeting when targets of down and up are child and parents

+ This test verifies that click event always goes to the first common ancestor of down and up event targets. + + + + + + + + + + diff --git a/testing/web-platform/tests/uievents/click/click_event_target_siblings.html b/testing/web-platform/tests/uievents/click/click_event_target_siblings.html new file mode 100644 index 0000000000..24d64dc9ac --- /dev/null +++ b/testing/web-platform/tests/uievents/click/click_event_target_siblings.html @@ -0,0 +1,102 @@ + + + + + Click targets the nearest common ancestor + + + + + + + + +

Click targeting when targets of down and up are sibling elements

+ This test verifies that click event always goes to the first common ancestor of down and up event targets. + + + +
+
+
+
+ +
+ + +
+ +
+ + +
+ + + + + + + diff --git a/testing/web-platform/tests/uievents/click/click_events_on_input.html b/testing/web-platform/tests/uievents/click/click_events_on_input.html new file mode 100644 index 0000000000..2f380eb451 --- /dev/null +++ b/testing/web-platform/tests/uievents/click/click_events_on_input.html @@ -0,0 +1,62 @@ + + + + + Clicking with primary vs non-primary buttons + + + + + + + +

Clicking on input type=text element when placeholder changes

+ + + + + diff --git a/testing/web-platform/tests/uievents/click/contextmenu_event.html b/testing/web-platform/tests/uievents/click/contextmenu_event.html new file mode 100644 index 0000000000..7a33d0aa38 --- /dev/null +++ b/testing/web-platform/tests/uievents/click/contextmenu_event.html @@ -0,0 +1,51 @@ + + + + + Contextmenu event + + + + + + + +

Test contextmenu event

+

Tests that right-clicking fires a contextmenu event.

+
    +
  1. Right-click here. +
+ + + diff --git a/testing/web-platform/tests/uievents/click/dblclick_event_mouse.html b/testing/web-platform/tests/uievents/click/dblclick_event_mouse.html new file mode 100644 index 0000000000..50324f6dfd --- /dev/null +++ b/testing/web-platform/tests/uievents/click/dblclick_event_mouse.html @@ -0,0 +1,44 @@ + + + + + dblclick event for the mouse pointer type + + + + + + + + + +

Double-click on the green box with the left mouse button.

+
+ + + diff --git a/testing/web-platform/tests/uievents/constructors/README.md b/testing/web-platform/tests/uievents/constructors/README.md new file mode 100644 index 0000000000..097a510395 --- /dev/null +++ b/testing/web-platform/tests/uievents/constructors/README.md @@ -0,0 +1,4 @@ +Constructors and States tests +============================== + +These test that each of the defined interfaces can be constructed synthetically, and that all attributes can be set to the appropriate state via the constructors. diff --git a/testing/web-platform/tests/uievents/constructors/inputevent-constructor.html b/testing/web-platform/tests/uievents/constructors/inputevent-constructor.html new file mode 100644 index 0000000000..3876abcd43 --- /dev/null +++ b/testing/web-platform/tests/uievents/constructors/inputevent-constructor.html @@ -0,0 +1,25 @@ + +InputEvent Constructor Tests + + + diff --git a/testing/web-platform/tests/uievents/hierarchy/README.md b/testing/web-platform/tests/uievents/hierarchy/README.md new file mode 100644 index 0000000000..3bf23b4c23 --- /dev/null +++ b/testing/web-platform/tests/uievents/hierarchy/README.md @@ -0,0 +1,34 @@ +Verify the Class Hierarchy +========================== + +Make sure the events inherit from the correct interfaces: + e.g., UIEvent > MouseEvent + +Requires manual and automated tests +* manually create event and verify hierarchy +* WebDriver create the event and verify hierarchy + +UIEvent + * load, unload, abort, error, select, resize, scroll + * Note: some event types may be dropped given that they don't appear to be UIEvents by other specs that define them. + +FocusEvent + * blur, focus, focusin, focusout + * blur and focus are handled in HTML5 + * but they aren't sure if focusin/out are needed: see bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=25877 + +MouseEvent + * click, dblclick, mousedown, mouseenter, mouseleave, mousemove, mouseout, mouseover, mouseup + +WheelEvent + * wheel + +KeyboardEvent + * keydown, keyup + * need to show interaction with beforeinput and input, which are in the Editing spec + +CompositionEvent + * compositionstart + * compositionupdate + * compositionend + * need to show interaction with the keyboard events: keydown, keyup diff --git a/testing/web-platform/tests/uievents/historical.html b/testing/web-platform/tests/uievents/historical.html new file mode 100644 index 0000000000..d2d33b44c7 --- /dev/null +++ b/testing/web-platform/tests/uievents/historical.html @@ -0,0 +1,11 @@ + + +Historical UI events features + + + diff --git a/testing/web-platform/tests/uievents/idlharness.window.js b/testing/web-platform/tests/uievents/idlharness.window.js new file mode 100644 index 0000000000..c3919e3558 --- /dev/null +++ b/testing/web-platform/tests/uievents/idlharness.window.js @@ -0,0 +1,21 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js +// META: timeout=long + +'use strict'; + +idl_test( + ['uievents'], + ['html', 'dom'], + idl_array => { + idl_array.add_objects({ + FocusEvent: ['new FocusEvent("event")'], + MouseEvent: ['new MouseEvent("event")'], + WheelEvent: ['new WheelEvent("event")'], + KeyboardEvent: ['new KeyboardEvent("event")'], + CompositionEvent: ['new CompositionEvent("event")'], + UIEvent: ['new UIEvent("event")'], + InputEvent: ['new InputEvent("event")'], + }); + } +); diff --git a/testing/web-platform/tests/uievents/interface/README.md b/testing/web-platform/tests/uievents/interface/README.md new file mode 100644 index 0000000000..970fdd4df3 --- /dev/null +++ b/testing/web-platform/tests/uievents/interface/README.md @@ -0,0 +1,13 @@ +Interface tests +============================== + +These test that the basic UI Events interfaces exist, specifically: + +1. Does the interface exist +2. Are all the members defined on the interface accounted for: + * UIEvent + * MouseEvent + * FocusEvent + * KeyboardEvent + * WheelEvent + * CompositionEvent diff --git a/testing/web-platform/tests/uievents/interface/click-event-manual.htm b/testing/web-platform/tests/uievents/interface/click-event-manual.htm new file mode 100644 index 0000000000..88db98d591 --- /dev/null +++ b/testing/web-platform/tests/uievents/interface/click-event-manual.htm @@ -0,0 +1,21 @@ + + + + Click event is a MouseEvent + + + + + +
Click in this box.
+
+ + + diff --git a/testing/web-platform/tests/uievents/interface/click-event.htm b/testing/web-platform/tests/uievents/interface/click-event.htm new file mode 100644 index 0000000000..b45dc29063 --- /dev/null +++ b/testing/web-platform/tests/uievents/interface/click-event.htm @@ -0,0 +1,32 @@ + + + + Click event is a PointerEvent + + + + + +
+
+ + + diff --git a/testing/web-platform/tests/uievents/interface/dblclick-event-manual.htm b/testing/web-platform/tests/uievents/interface/dblclick-event-manual.htm new file mode 100644 index 0000000000..7ea0bdbf13 --- /dev/null +++ b/testing/web-platform/tests/uievents/interface/dblclick-event-manual.htm @@ -0,0 +1,21 @@ + + + + Double click (dblclick) event is a MouseEvent + + + + + +
Double Click in this box.
+
+ + + diff --git a/testing/web-platform/tests/uievents/interface/keyboard-accesskey-click-event.html b/testing/web-platform/tests/uievents/interface/keyboard-accesskey-click-event.html new file mode 100644 index 0000000000..f90101e31e --- /dev/null +++ b/testing/web-platform/tests/uievents/interface/keyboard-accesskey-click-event.html @@ -0,0 +1,56 @@ + + + + + + + +

Tests that a keyboard access key to press a button will fire only the click event

+ + + + + diff --git a/testing/web-platform/tests/uievents/interface/keyboard-click-event.html b/testing/web-platform/tests/uievents/interface/keyboard-click-event.html new file mode 100644 index 0000000000..2b5e06d9c1 --- /dev/null +++ b/testing/web-platform/tests/uievents/interface/keyboard-click-event.html @@ -0,0 +1,50 @@ + + + + + + +

Tests that a button pressed by using Space or Enter will fire only the click event

+ + + + diff --git a/testing/web-platform/tests/uievents/keyboard/README.md b/testing/web-platform/tests/uievents/keyboard/README.md new file mode 100644 index 0000000000..38c454dd7c --- /dev/null +++ b/testing/web-platform/tests/uievents/keyboard/README.md @@ -0,0 +1,3 @@ +# Keyboard event tests + +These tests focus on testing the |key|, |code| and other attributes of KeyboardEvents. diff --git a/testing/web-platform/tests/uievents/keyboard/key-101en-us-manual.html b/testing/web-platform/tests/uievents/keyboard/key-101en-us-manual.html new file mode 100644 index 0000000000..3228c65a83 --- /dev/null +++ b/testing/web-platform/tests/uievents/keyboard/key-101en-us-manual.html @@ -0,0 +1,91 @@ + + + + +Keyboard Event Manual Test + + + + + + + + + + + + diff --git a/testing/web-platform/tests/uievents/keyboard/key-102fr-fr-manual.html b/testing/web-platform/tests/uievents/keyboard/key-102fr-fr-manual.html new file mode 100644 index 0000000000..c5b51c47bd --- /dev/null +++ b/testing/web-platform/tests/uievents/keyboard/key-102fr-fr-manual.html @@ -0,0 +1,93 @@ + + + + +Keyboard Event Manual Test + + + + + + + + + + + + diff --git a/testing/web-platform/tests/uievents/keyboard/key.css b/testing/web-platform/tests/uievents/keyboard/key.css new file mode 100644 index 0000000000..b2add2a754 --- /dev/null +++ b/testing/web-platform/tests/uievents/keyboard/key.css @@ -0,0 +1,118 @@ +.keyboard { + display: table; + border-collapse: separate; + border-spacing: 2px; + width: 800px; + border: 2px solid black; + border-radius: 10px; + padding: 5px; +} + +.key-row { + display: table; + margin: 0; + padding: 0; +} + +.key { + display: table-cell; + border: 2px solid black; + border-radius: 8px; + width: 50px; + height: 40px; + vertical-align: middle; + text-align: center; + margin: 0; + padding: 0; +} + +.wide1 { + width: 70px; +} + +.wide2 { + width: 90px; +} + +.wide3 { + width: 110px; +} + +.wide4 { + width: 130px; +} + +.wide5 { + width: 300px; +} + +.nextKey { + background-color: yellow; +} + +.goodKey { + background-color: #80ff08; +} + +.badKey { + background-color: #ff8080; +} + +.activeModifierKey { + background-color: #a0a0ff; +} + +.skippedKey { + background-color: #e0e0e0; +} + +#options { + display: none; + margin: 20px; +} + +#optionstoggle, #helptoggle { + font-size: 10pt; +} + +.opttable { + border: 1px solid black; +} + +.optcell { + vertical-align: top; + padding: 0 10px; +} + +.opttitle { + font-weight: bold; +} + +.error { + border: 1px solid red; + margin: 5px; + padding: 5px; +} + +.error1 { + font-size: 12pt; + margin: 0 0 0 10px; + padding: 0; +} + +.error2 { + font-size: 10pt; + margin: 0 0 0 20px; + padding: 0; +} + +.help { + font-size: 11pt; + margin: 0 0 5px 20px; + padding: 0; +} + +body { + margin: 10px; + padding: 0 20px; +} diff --git a/testing/web-platform/tests/uievents/keyboard/key.js b/testing/web-platform/tests/uievents/keyboard/key.js new file mode 100644 index 0000000000..175258bd88 --- /dev/null +++ b/testing/web-platform/tests/uievents/keyboard/key.js @@ -0,0 +1,671 @@ +var _testing = false; + +// The index into _keyTable of the key currently being tested. +var _currKey = 0; + +var _keysTotal = 0; +var _keysGood = 0; +var _keysBad = 0; +var _keysSkipped = 0; + +var _modifierMode = "None"; + +var _keydownCapture = []; +var _keyupCapture = []; + +var CAPTURE_KEYCODE = 0; +var CAPTURE_CODE = 1; +var CAPTURE_KEY = 2; +var CAPTURE_SHIFTKEY = 3; +var CAPTURE_CONTROLKEY = 4; +var CAPTURE_ALTKEY = 5; +var CAPTURE_METAKEY = 6; + +// An array of KeyInfo for each key to be tested. +var _keyTable = []; + +// KeyInfo fields. +var KEYINFO_CODE = 0; // |code| for this key +var KEYINFO_ROW = 1; // Keyboard row +var KEYINFO_TYPE = 2; // Key type (see below) +var KEYINFO_WIDTH = 3; // Width of key: 0=normal +var KEYINFO_KEYCAP = 4; // Keycap string to display +var KEYINFO_KEY = 5; // Unmodified key value +var KEYINFO_KEY_SHIFT = 6; // Shifted key value + +var KEYTYPE_NORMAL = 0; +var KEYTYPE_DISABLED = 1; // Key cannot be tested: e.g., CapsLock +var KEYTYPE_END = 2; // Used to mark end of KeyTable +var KEYTYPE_MODIFIER = 3; // Modifer key + +function clearChildren(e) { + while (e.firstChild !== null) { + e.removeChild(e.firstChild); + } +} + +function setText(e, text) { + clearChildren(e); + e.appendChild(document.createTextNode(text)); +} + +function setUserAgent() { + var userAgent = navigator.userAgent; + uaDiv = document.getElementById("useragent"); + setText(uaDiv, userAgent); +} + +function addEventListener(obj, etype, handler) { + if (obj.addEventListener) { + obj.addEventListener(etype, handler, false); + } else if (obj.attachEvent) { + obj.attachEvent("on"+etype, handler); + } else { + obj["on"+etype] = handler; + } +} + +function addClass(obj, className) { + obj.classList.add(className); +} + +function removeClass(obj, className) { + obj.classList.remove(className); +} + +function addInnerText(obj, text) { + obj.appendChild(document.createTextNode(text)); +} + +function calcLocation(loc) { + if (loc == 1) return "LEFT"; + if (loc == 2) return "RIGHT"; + if (loc == 3) return "NUMPAD"; + return loc; +} + +function isModifierKey(e) { + // Shift, Control, Alt + if (e.keyCode >= 16 && e.keyCode <= 18) { + return true; + } + // Windows, Command or Meta key. + if (e.keyCode == 224 // Right/Left: Gecko + || e.keyCode == 91 // Left: WebKit/Blink + || e.keyCode == 93 // Right: WebKit/Blink + ) { + return true; + } + return false; +} + +function init(title, keytable) { + _keyTable = keytable; + + createBody(title, keytable); + + setUserAgent(); + + var input = document.getElementById("input"); + input.disabled = true; + addEventListener(input, "keydown", onKeyDown); + addEventListener(input, "keyup", onKeyUp); + //addEventListener(input, "beforeInput", onBeforeInput); + //addEventListener(input, "input", onInput); +} + +function onKeyDown(e) { + // Ignore modifier keys when checking modifier combinations. + if (_modifierMode != "None" && isModifierKey(e)) { + return; + } + + _keydownInfo = [e.keyCode, e.code, e.key, e.shiftKey, e.ctrlKey, e.altKey, e.metaKey]; + if (e.keyCode == 9 || e.code == "Tab") { + e.preventDefault(); + } +} + +function onKeyUp(e) { + // Ignore modifier keys when checking modifier combinations. + if (_modifierMode != "None" && isModifierKey(e)) { + return; + } + + _keyupInfo = [e.keyCode, e.code, e.key, e.shiftKey, e.ctrlKey, e.altKey, e.metaKey]; + + if (_testing) { + verifyKey(); + nextKey(); + } +} + +function onBeforeInput(e) { +} + +function onInput(e) { +} + +function addError(elem, str) { + var p = document.createElement('p'); + p.classList.add("error2"); + p.textContent = str; + elem.appendChild(p); +} + +function addErrorIncorrect(elem, eventName, attrName, keyEventInfo, attr, expected) { + addError(elem, "Incorrect " + eventName + + " |" + attrName + "| = " + keyEventInfo[attr] + + " - Expected " + expected); +} + +function verifyKeyEventFields(eventName, keyEventInfo, code, key, error) { + var verifyCode = document.getElementById("opt_attr_code").checked; + var verifyKey = document.getElementById("opt_attr_key").checked; + var verifyModifiers = document.getElementById("opt_attr_modifiers").checked; + var good = true; + + if (!verifyCode && !verifyKey && !verifyModifiers) { + good = false; + addError(error, "Invalid test: At least one attribute must be selected for testing."); + } + if (verifyCode && keyEventInfo[CAPTURE_CODE] != code) { + good = false; + addErrorIncorrect(error, eventName, "code", keyEventInfo, CAPTURE_CODE, code); + } + if (verifyKey && keyEventInfo[CAPTURE_KEY] != key) { + good = false; + addErrorIncorrect(error, eventName, "key", keyEventInfo, CAPTURE_KEY, key); + } + if (verifyModifiers) { + if (keyEventInfo[CAPTURE_SHIFTKEY] != (_modifierMode == "Shift")) { + good = false; + addErrorIncorrect(error, eventName, "shiftKey", keyEventInfo, CAPTURE_SHIFTKEY, false); + } + if (keyEventInfo[CAPTURE_CONTROLKEY]) { + good = false; + addErrorIncorrect(error, eventName, "controlKey", keyEventInfo, CAPTURE_CONTROLKEY, false); + } + if (keyEventInfo[CAPTURE_ALTKEY]) { + good = false; + addErrorIncorrect(error, eventName, "altKey", keyEventInfo, CAPTURE_ALTKEY, false); + } + if (keyEventInfo[CAPTURE_METAKEY]) { + good = false; + addErrorIncorrect(error, eventName, "metaKey", keyEventInfo, CAPTURE_METAKEY, false); + } + } + + return good; +} + +function verifyKey() { + _keysTotal++; + + var keyInfo = _keyTable[_currKey]; + var code = keyInfo[KEYINFO_CODE]; + var key = keyInfo[KEYINFO_KEY]; + var keyShift = keyInfo[KEYINFO_KEY_SHIFT]; + + var keyCheck = key; + if (_modifierMode == "Shift") { + keyCheck = keyShift; + } + + var verifyKeydown = document.getElementById("opt_event_keydown").checked; + var verifyKeyup = document.getElementById("opt_event_keyup").checked; + + var error = document.createElement('div'); + error.classList.add("error"); + var good = true; + + if (verifyKeydown) { + good = verifyKeyEventFields("keydown", _keydownInfo, code, keyCheck, error); + } + if (verifyKeyup) { + good = verifyKeyEventFields("keyup", _keyupInfo, code, keyCheck, error); + } + + if (!verifyKeydown && !verifyKeyup) { + good = false; + addError(error, "Invalid test: At least one event must be selected for testing."); + } + + // Allow Escape key to skip the current key. + var skipped = false; + if (_keydownInfo[CAPTURE_KEYCODE] == 27 || _keydownInfo[CAPTURE_CODE] == "Escape") { + good = true; + skipped = true; + } + + if (!good) { + var p = document.createElement('p'); + p.classList.add("error1"); + p.textContent = "Error : " + code; + error.insertBefore(p, error.firstChild); + } + + removeNextKeyHilight(); + if (skipped) { + _keysSkipped++; + document.getElementById(code).classList.add("skippedKey") + } else if (good) { + _keysGood++; + document.getElementById(code).classList.add("goodKey") + } else { + _keysBad++; + document.getElementById(code).classList.add("badKey") + } + updateTestSummary(good ? null : error); +} + +function updateTestSummary(error) { + document.getElementById("keys-total").textContent = _keysTotal; + document.getElementById("keys-good").textContent = _keysGood; + document.getElementById("keys-bad").textContent = _keysBad; + document.getElementById("keys-skipped").textContent = _keysSkipped; + + if (error) { + var errors = document.getElementById("errors"); + errors.insertBefore(error, errors.firstChild); + } +} + +function resetTest() { + _keysTotal = 0; + _keysGood = 0; + _keysBad = 0; + + _currKey = -1; + nextKey(); + + updateTestSummary(); + + // Remove previous test results. + clearChildren(document.getElementById("errors")); + + // Remove highlighting from keys. + for (var i = 0; i < _keyTable.length; i++) { + var code = _keyTable[i][KEYINFO_CODE]; + var type = _keyTable[i][KEYINFO_TYPE]; + if (type != KEYTYPE_END) { + var key = document.getElementById(code); + key.classList.remove("goodKey"); + key.classList.remove("badKey"); + key.classList.remove("skippedKey"); + } + } +} + +function startTest() { + if (_testing) { + // Cancel the currently running test. + endTest(); + return; + } + + resetTest(); + _testing = true; + document.getElementById("start").value = "Stop Test" + + var input = document.getElementById("input"); + input.value = ""; + input.disabled = false; + input.focus(); + + // Show test instructions and info. + document.getElementById("test-info").style.display = 'block'; + document.getElementById("instructions").style.display = 'block'; + document.getElementById("test-done").style.display = 'none'; +} + +function endTest() { + _testing = false; + removeNextKeyHilight(); + document.getElementById("start").value = "Restart Test" + document.getElementById("input").disabled = true; + document.getElementById("instructions").style.display = 'none'; + document.getElementById("test-done").style.display = 'block'; +} + +function removeNextKeyHilight() { + var curr = document.getElementById(_keyTable[_currKey][KEYINFO_CODE]); + if (curr) { + removeClass(curr, "nextKey") + } +} + +function addNextKeyHilight() { + var curr = document.getElementById(_keyTable[_currKey][KEYINFO_CODE]); + if (curr) { + addClass(curr, "nextKey") + } +} + +function nextKey() { + var keyInfo; + var keepLooking = true; + do { + _currKey++; + keyInfo = _keyTable[_currKey]; + var type = keyInfo[KEYINFO_TYPE]; + + // Skip over disabled keys. + keepLooking = (type == KEYTYPE_DISABLED); + + // Skip over modifier keys if we're testing modifier combinations. + if (_modifierMode != "None" && type == KEYTYPE_MODIFIER) { + keepLooking = true; + } + + // Skip over keys in disabled rows. + if (type != KEYTYPE_END) { + var row = keyInfo[KEYINFO_ROW]; + var rowEnabled = document.getElementById("opt_row_" + row).checked; + keepLooking = keepLooking || !rowEnabled; + } + } while (keepLooking); + + if (keyInfo[KEYINFO_TYPE] == KEYTYPE_END) { + endTest(); + } else { + addNextKeyHilight(); + } +} + +function toggleOptions() { + var link = document.getElementById("optionstoggle"); + var options = document.getElementById("options"); + clearChildren(link); + if (options.style.display == "block") { + options.style.display = "none"; + addInnerText(link, "Show Options"); + } + else { + options.style.display = "block"; + addInnerText(link, "Hide Options"); + } +} + +function toggleHelp() { + var link = document.getElementById("helptoggle"); + var help = document.getElementById("help"); + clearChildren(link); + if (help.style.display == "block") { + help.style.display = "none"; + addInnerText(link, "Show Help"); + } + else { + help.style.display = "block"; + addInnerText(link, "Hide Help"); + } +} + +function createBody(title, keytable) { + var body = document.getElementsByTagName("body")[0]; + var p; + var span; + + var h1 = document.createElement('h1'); + h1.textContent = "Keyboard Event Manual Test - " + title; + body.appendChild(h1); + + // Display useragent. + p = document.createElement('p'); + p.textContent = "UserAgent: "; + var useragent = document.createElement('span'); + useragent.id = "useragent"; + p.appendChild(useragent); + body.appendChild(p); + + // Display input textedit. + p = document.createElement('p'); + p.textContent = "Test Input: "; + var input1 = document.createElement('input'); + input1.id = "input"; + input1.type = "text"; + input1.size = 80; + p.appendChild(input1); + p.appendChild(document.createTextNode(" ")); + var input2 = document.createElement('input'); + input2.id = "start"; + input2.type = "button"; + input2.onclick = function() { startTest(); return false; } + input2.value = "Start Test"; + p.appendChild(input2); + p.appendChild(document.createTextNode(" ")); + var optionsToggle = document.createElement('a'); + optionsToggle.id = "optionstoggle"; + optionsToggle.href = "javascript:toggleOptions()"; + optionsToggle.textContent = "Show Options"; + p.appendChild(optionsToggle); + p.appendChild(document.createTextNode(" ")); + var helpToggle = document.createElement('a'); + helpToggle.id = "helptoggle"; + helpToggle.href = "javascript:toggleHelp()"; + helpToggle.textContent = "Show Help"; + p.appendChild(helpToggle); + body.appendChild(p); + + createOptions(body); + + createHelp(body); + + createKeyboard(body, keytable); + + // Test info and summary. + var test_info = document.createElement('div'); + test_info.id = "test-info"; + test_info.style.display = "none"; + + var instructions = document.createElement('div'); + instructions.id = "instructions"; + p = document.createElement('p'); + p.textContent = "Press the highlighted key."; + instructions.appendChild(p); + test_info.appendChild(instructions); + + var test_done = document.createElement('div'); + test_done.id = "test-done"; + p = document.createElement('p'); + p.textContent = "Test complete!"; + test_done.appendChild(p); + test_info.appendChild(test_done); + + var summary = document.createElement('div'); + summary.id = "summary"; + p = document.createElement('p'); + summary.appendChild(document.createTextNode("Keys Tested: ")); + span = document.createElement('span'); + span.id = "keys-total"; + span.textContent = 0; + summary.appendChild(span); + summary.appendChild(document.createTextNode("; Passed ")); + span = document.createElement('span'); + span.id = "keys-good"; + span.textContent = 0; + summary.appendChild(span); + summary.appendChild(document.createTextNode("; Failed ")); + span = document.createElement('span'); + span.id = "keys-bad"; + span.textContent = 0; + summary.appendChild(span); + summary.appendChild(document.createTextNode("; Skipped ")); + span = document.createElement('span'); + span.id = "keys-skipped"; + span.textContent = 0; + summary.appendChild(span); + test_info.appendChild(summary); + + var errors = document.createElement('div'); + errors.id = "errors"; + test_info.appendChild(errors); + + body.appendChild(test_info); +} + +function addOptionTitle(cell, title) { + var span = document.createElement('span'); + span.classList.add("opttitle"); + span.textContent = title; + cell.appendChild(span); + cell.appendChild(document.createElement("br")); +} + +function addOptionCheckbox(cell, id, text) { + var label = document.createElement("label"); + + var input = document.createElement("input"); + input.type = "checkbox"; + input.id = id; + input.checked = true; + label.appendChild(input); + + label.appendChild(document.createTextNode(" " + text)); + cell.appendChild(label); + + cell.appendChild(document.createElement("br")); +} + +function addOptionRadio(cell, group, text, handler, checked) { + var label = document.createElement("label"); + + var input = document.createElement("input"); + input.type = "radio"; + input.name = group; + input.value = text; + input.onclick = handler; + input.checked = checked; + label.appendChild(input); + + label.appendChild(document.createTextNode(" " + text)); + cell.appendChild(label); + + cell.appendChild(document.createElement("br")); +} + +function handleModifierGroup() { + var radio = document.querySelector("input[name=opt_modifier]:checked"); + var oldMode = _modifierMode; + _modifierMode = radio.value; + + if (oldMode == "Shift") { + document.getElementById("ShiftLeft").classList.remove("activeModifierKey"); + document.getElementById("ShiftRight").classList.remove("activeModifierKey"); + } + + if (_modifierMode == "Shift") { + document.getElementById("ShiftLeft").classList.add("activeModifierKey"); + document.getElementById("ShiftRight").classList.add("activeModifierKey"); + } +} + +function createOptions(body) { + var options = document.createElement('div'); + options.id = "options"; + options.style.display = "none"; + + var table = document.createElement('table'); + table.classList.add("opttable"); + var row = document.createElement('tr'); + var cell; + + cell = document.createElement('td'); + cell.classList.add("optcell"); + addOptionTitle(cell, "Keyboard Rows"); + addOptionCheckbox(cell, "opt_row_0", "Row E (top)"); + addOptionCheckbox(cell, "opt_row_1", "Row D"); + addOptionCheckbox(cell, "opt_row_2", "Row C"); + addOptionCheckbox(cell, "opt_row_3", "Row B"); + addOptionCheckbox(cell, "opt_row_4", "Row A (bottom)"); + row.appendChild(cell); + + cell = document.createElement('td'); + cell.classList.add("optcell"); + addOptionTitle(cell, "Events"); + addOptionCheckbox(cell, "opt_event_keydown", "keydown"); + addOptionCheckbox(cell, "opt_event_keyup", "keyup"); + row.appendChild(cell); + + cell = document.createElement('td'); + cell.classList.add("optcell"); + addOptionTitle(cell, "Attributes"); + addOptionCheckbox(cell, "opt_attr_code", "code"); + addOptionCheckbox(cell, "opt_attr_key", "key"); + addOptionCheckbox(cell, "opt_attr_modifiers", "modifiers"); + row.appendChild(cell); + + cell = document.createElement('td'); + cell.classList.add("optcell"); + addOptionTitle(cell, "Modifiers"); + addOptionRadio(cell, "opt_modifier", "None", handleModifierGroup, true); + addOptionRadio(cell, "opt_modifier", "Shift", handleModifierGroup, false); + row.appendChild(cell); + + table.appendChild(row); + options.appendChild(table); + + body.appendChild(options); +} + +function addHelpText(div, text) { + var p = document.createElement('p'); + p.classList.add("help"); + p.textContent = text; + div.appendChild(p); +} + +function createHelp(body) { + var help = document.createElement('div'); + help.id = "help"; + help.style.display = "none"; + + addHelpText(help, "Click on the \"Start Test\" button to begin testing."); + addHelpText(help, "Press the hilighted key to test it."); + addHelpText(help, "Clicking anywhere outside the \"Test Input\" editbox will pause testing. To resume, click back inside the editbox."); + addHelpText(help, "To skip a key while testing, press Escape."); + addHelpText(help, "When testing with modifier keys, the modifier must be pressed before the keydown and released after the keyup of the key being tested."); + + body.appendChild(help); +} + +function createKeyboard(body, keytable) { + var keyboard = document.createElement('div'); + keyboard.classList.add("keyboard"); + + var currRow = 0; + var row = document.createElement('div'); + row.classList.add("key-row"); + + for (var i = 0; i < keytable.length; i++) { + var code = keytable[i][KEYINFO_CODE]; + var rowId = keytable[i][KEYINFO_ROW]; + var type = keytable[i][KEYINFO_TYPE]; + var width = keytable[i][KEYINFO_WIDTH]; + var keyCap = keytable[i][KEYINFO_KEYCAP]; + + if (type == KEYTYPE_END) { + continue; + } + + if (rowId != currRow) { + keyboard.appendChild(row); + row = document.createElement('div'); + row.classList.add("key-row"); + currRow = rowId; + } + + var key = document.createElement('div'); + key.id = code; + key.classList.add("key"); + if (width != 0) { + key.classList.add("wide" + width); + } + key.textContent = keyCap; + + row.appendChild(key); + } + + keyboard.appendChild(row); + body.appendChild(keyboard); +} diff --git a/testing/web-platform/tests/uievents/keyboard/modifier-keys-combinations.html b/testing/web-platform/tests/uievents/keyboard/modifier-keys-combinations.html new file mode 100644 index 0000000000..1b364ff72c --- /dev/null +++ b/testing/web-platform/tests/uievents/keyboard/modifier-keys-combinations.html @@ -0,0 +1,43 @@ + + +UI Events Test: Modifier keys combinations + + + + + + + +
Target
+ diff --git a/testing/web-platform/tests/uievents/keyboard/modifier-keys.html b/testing/web-platform/tests/uievents/keyboard/modifier-keys.html new file mode 100644 index 0000000000..635e5d3b77 --- /dev/null +++ b/testing/web-platform/tests/uievents/keyboard/modifier-keys.html @@ -0,0 +1,35 @@ + + +UI Events Test: Modifier keys + + + + + + + +
Target
+ diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/Status.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/Status.html new file mode 100644 index 0000000000..392f68edc1 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/Status.html @@ -0,0 +1,26 @@ + + + + DOM Level 3 Events Test Status + + + +

DOM Level 3 Events Test Suite Status

+ +

This test suite is part of the +Web Application WG's +Test Repository as described in WebApps' +Testing Wiki. +

+ +

The test suite is for the +DOM Level 3 Events specification. +

+ + + + + diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/ProcessingInstruction.DOMCharacterDataModified.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/ProcessingInstruction.DOMCharacterDataModified.html new file mode 100644 index 0000000000..2da0a389e2 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/ProcessingInstruction.DOMCharacterDataModified.html @@ -0,0 +1,32 @@ + + + + ProcessingInstruction.data and DOMCharacterDataModified event + + + + +
+ + + + + + diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/dispatchEvent.click.checkbox.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/dispatchEvent.click.checkbox.html new file mode 100644 index 0000000000..8cb548f84c --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/dispatchEvent.click.checkbox.html @@ -0,0 +1,80 @@ + + + + MouseEvent: Default action and synthetic click event + + + + +
+ +
+ + +
+ + + + diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/domnodeinserted.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/domnodeinserted.html new file mode 100644 index 0000000000..e5064d8d46 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/domnodeinserted.html @@ -0,0 +1,26 @@ + +MutationEvent: DOMNodeInserted Event Type + + +
+ + + + diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/stopImmediatePropagation.effect.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/stopImmediatePropagation.effect.html new file mode 100644 index 0000000000..a414d60298 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/stopImmediatePropagation.effect.html @@ -0,0 +1,71 @@ + + + + Event.stopImmediatePropagation() immediate effect + + + + +
+ + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/stopPropagation.deferred.effect.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/stopPropagation.deferred.effect.html new file mode 100644 index 0000000000..93489c63b4 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/stopPropagation.deferred.effect.html @@ -0,0 +1,70 @@ + + + + Event.stopPropagation() deferred effect + + + + +
+ + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/support/ProcessingInstruction.DOMCharacterDataModified.xml b/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/support/ProcessingInstruction.DOMCharacterDataModified.xml new file mode 100644 index 0000000000..4c95ae29df --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/approved/support/ProcessingInstruction.DOMCharacterDataModified.xml @@ -0,0 +1,32 @@ + + + + ProcessingInstruction.data and DOMCharacterDataModified event + +
+ + + + +
\ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/CompositionEvent.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/CompositionEvent.html new file mode 100644 index 0000000000..0f8242b07d --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/CompositionEvent.html @@ -0,0 +1,69 @@ + + + + Composition Event Types: compositionstart, compositionupdate, compositionend + + + +

DOM Events

+

+ Test Description: The composition events occur in a set order relative to one another: + 1. compositionstart, 2. compositionupdate (multiple events), 3. compositionend. +

+ +
+            
+
+            Steps:
+            1) Open Japanese Microsoft IME and select Hiragana input method
+            2) Click at the above textbox and then type 'a' using keyboard
+            3) Press the '{Enter}' key to complete the IME composition
+            4) Click here to test again if not following the steps exactly
+        
+ +

Test passes if the word "PASS" appears below and nothing is typed to the textbox after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.attrChange.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.attrChange.html new file mode 100644 index 0000000000..12c45fc848 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.attrChange.html @@ -0,0 +1,65 @@ + + + + MutationEvent.attrChange for DOMAttrModified Event + + + +

DOM Events

+

+ Test Description: MutationEvent.attrChange indicates the type of change which triggered the DOMAttrModified event. +

+ +
+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.attrName.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.attrName.html new file mode 100644 index 0000000000..ca1ad97d24 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.attrName.html @@ -0,0 +1,66 @@ + + + + MutationEvent.attrName for DOMAttrModified Event + + + +

DOM Events

+

+ Test Description: MutationEvent.attrName indicates the name of the changed Attr node + in a DOMAttrModified event. +

+ +
+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.html new file mode 100644 index 0000000000..c229abe96e --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.html @@ -0,0 +1,66 @@ + + + + Mutation Event Type: DOMAttrModified + + + +

DOM Events

+

+ Test Description: DOMAttrModified event fires after an Attr.value has been + modified and after an Attr node has been added to or removed from an Element. +

+ +
+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.newValue.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.newValue.html new file mode 100644 index 0000000000..77b8a41e1a --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.newValue.html @@ -0,0 +1,65 @@ + + + + MutationEvent.newValue for DOMAttrModified Event + + + +

DOM Events

+

+ Test Description: MutationEvent.newValue indicates the new value of the Attr node in DOMAttrModified events. +

+ +
+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.prevValue.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.prevValue.html new file mode 100644 index 0000000000..31fbec7764 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.prevValue.html @@ -0,0 +1,65 @@ + + + + MutationEvent.prevValue for DOMAttrModified Event + + + +

DOM Events

+

+ Test Description: MutationEvent.prevValue indicates the previous value of the Attr node in DOMAttrModified events. +

+ +
+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.relatedNode.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.relatedNode.html new file mode 100644 index 0000000000..5c30dabe22 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMAttrModified.relatedNode.html @@ -0,0 +1,66 @@ + + + + MutationEvent.relatedNode for DOMAttrModified Event + + + +

DOM Events

+

+ Test Description: In the case of the DOMAttrModified event, MutationEvent.relatedNode + indicates the Attr node which was modified, added, or removed. +

+ +
+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMCharacterDataModified.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMCharacterDataModified.html new file mode 100644 index 0000000000..31d4fbf08f --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMCharacterDataModified.html @@ -0,0 +1,62 @@ + + + + MutationEvent: DOMCharacterDataModified Event Type + + + +

DOM Events

+

+ Test Description: DOMCharacterDataModified event fires after CharacterData.data has been modified. +

+ + +
Hello
+
+

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMNodeInserted.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMNodeInserted.html new file mode 100644 index 0000000000..0e0d26d1aa --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMNodeInserted.html @@ -0,0 +1,64 @@ + + + + MutationEvent: DOMNodeInserted Event Type + + + +

DOM Events

+

+ Test Description: DOMNodeInserted event fires when a node has been added as a child of another node. +

+ + +
+
+
+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMNodeRemoved.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMNodeRemoved.html new file mode 100644 index 0000000000..34d7112027 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMNodeRemoved.html @@ -0,0 +1,62 @@ + + + + MutationEvent: DOMNodeRemoved Event Type + + + +

DOM Events

+

+ Test Description: DOMNodeRemoved event fires when a node is being removed from its parent node. +

+ + +
+
+
+

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMSubtreeModified.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMSubtreeModified.html new file mode 100644 index 0000000000..1819f563da --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/DOMSubtreeModified.html @@ -0,0 +1,72 @@ + + + + MutationEvent: DOMSubtreeModified Event Type + + + +

DOM Events

+

+ Test Description: DOMSubtreeModified event fires after any other events + caused by the mutation(s) have occurred. +

+ + +
+ +
+
+

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/Event.defaultPrevented.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/Event.defaultPrevented.html new file mode 100644 index 0000000000..8acd3cb979 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/Event.defaultPrevented.html @@ -0,0 +1,68 @@ + + + + W3C DOM Level 3 Event Object Property: defaultPrevented + + + +

+ Test Description: + Event listeners can cancel default actions of cancelable event objects by invoking the Event.preventDefault() + method, and determine whether an event has been canceled through the Event.defaultPrevented attribute. +

+ + Click the hyperlink: + http://samples.msdn.microsoft.com/ietestcenter + +

Test passes if the word "PASS" appears below after clicking the hyperlink and the page does not navigate away.

+
Test result:
+
FAIL
+ + diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/Event.eventPhase.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/Event.eventPhase.html new file mode 100644 index 0000000000..4bd3b51b46 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/Event.eventPhase.html @@ -0,0 +1,77 @@ + + + + W3C DOM Level 2 Event Object Property: eventPhase + + + +

+ Test Description: + eventPhase is used to indicate which phase of event flow is currently being accomplished. +

+ +
+ Double click here: +
+ +

Test passes if the word "PASS" appears below after double clicking the above textbox.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/Event.stopPropagation.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/Event.stopPropagation.html new file mode 100644 index 0000000000..019143e366 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/Event.stopPropagation.html @@ -0,0 +1,85 @@ + + + + W3C DOM Level 3 Event Object method: stopPropagation + + + +

+ Test Description: + stopPropagation prevents other event listeners from being triggered. +

+ +
+ Click the button: +
+ +

Test passes if the word "PASS" appears below after clicking the above button using mouse.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/KeyboardEvent.key.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/KeyboardEvent.key.html new file mode 100644 index 0000000000..ea1adb0751 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/KeyboardEvent.key.html @@ -0,0 +1,56 @@ + + + + KeyboardEvent Object Property: key + + + +

Test Description: KeyboardEvent Object Property key holds the key value of the key pressed

+ + Type 'a' here: + +

Test passes if the word "PASS" appears below after typing 'a' in the above textbox using keyboard.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/KeyboardEvent.location.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/KeyboardEvent.location.html new file mode 100644 index 0000000000..63fe460f3d --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/KeyboardEvent.location.html @@ -0,0 +1,74 @@ + + + + KeyboardEvent.location + + + +

DOM Events

+

+ Test Description: KeyboardEvent.location attribute contains an indication of the + location of the key on the device. +

+ +
+            
+
+            Steps:
+            1) Type 'a' in the above textbox using keyboard
+            2) Press '{CTRL}' key on the left side of the keyboard
+            3) Press '{SHIFT}' key on the right side of the keyboard
+            4) Click here to test again if not following the steps exactly
+        
+ +

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/KeyboardEvent.modifiers.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/KeyboardEvent.modifiers.html new file mode 100644 index 0000000000..ee490b47ec --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/KeyboardEvent.modifiers.html @@ -0,0 +1,66 @@ + + + + KeyboardEvent.getModifierState() and 'AltGraph' modifier key + + + +

DOM Events

+

+ Test Description: Some operating systems simulate the 'AltGraph' modifier key + with the combination of the 'Alt' and 'Control' modifier keys. Implementations + are encouraged to use the 'AltGraph' modifier key. +

+ +
+            
+
+            Steps:
+            1) Click in the above textbox using mouse
+            2) Press and hold down '{CTRL}' key and then press '{ALT}' key on the keyboard
+        
+ +

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MouseEvent.button.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MouseEvent.button.html new file mode 100644 index 0000000000..605565a781 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MouseEvent.button.html @@ -0,0 +1,65 @@ + + + + MouseEvent.button for mouseup Event + + + +

+ Test Description: MouseEvent.button value for mouseup event is based on current button pressed. +

+ +
+            
+
+            Steps:
+            1) Move the mouse pointer to the above textbox
+            2) Click the mouse button in this order: Left Button, Middle Button, Right Button
+            3) Click here to test again if not following the steps exactly
+        
+ +

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MouseEvent.image.map.area.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MouseEvent.image.map.area.html new file mode 100644 index 0000000000..17b7dd5cce --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MouseEvent.image.map.area.html @@ -0,0 +1,70 @@ + + + + MouseEvent event on IMG element with MAP and AREA elements + + + +

DOM Events

+

+ Test Description: MouseEvent event fires on the AREA element when click the MAP AREA on an image +

+ + + + + + + +

+ Steps: +

    +
  1. Click at the arrow pointer symbol on the bottom-right corner of the image. +
+

+ +

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MouseEvent.preventDefault.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MouseEvent.preventDefault.html new file mode 100644 index 0000000000..e6cb57806d --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MouseEvent.preventDefault.html @@ -0,0 +1,94 @@ + + + + MouseEvent: mousedown - preventDefault() for text selection + + + +

DOM Events

+

+ Test Description: MouseEvent - Text selection is disabled after cancelling mousedown event. +

+ +   Use mouse to select the whole line here   + +

+ Steps: +

    +
  1. Make sure text in the above green box can be selected using mouse +
  2. Dismiss the selection, if any, by clicking at the green box with mouse +
  3. Now, click the button: +
  4. Drag mouse to select the whole line of the text inside the above green box +
  5. Click the button: +
+

+

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MutationEvent.hasFeature.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MutationEvent.hasFeature.html new file mode 100644 index 0000000000..f550a5366d --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MutationEvent.hasFeature.html @@ -0,0 +1,67 @@ + + + + MutationEvent: feature detection with hasFeature() + + + +

DOM Events

+

+ Test Description: MutationEvent - feature support detection using DOMImplementation.hasFeature() method +

+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MutationEvent.initMutationEvent.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MutationEvent.initMutationEvent.html new file mode 100644 index 0000000000..3b2bceabf4 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MutationEvent.initMutationEvent.html @@ -0,0 +1,72 @@ + + + + MutationEvent.initMutationEvent() and Event.trusted + + + +

DOM Events

+

+ Test Description: initMutationEvent initializes attributes of a MutationEvent object. +

+ + +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MutationEvent.relatedNode.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MutationEvent.relatedNode.html new file mode 100644 index 0000000000..6b92079ef6 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/MutationEvent.relatedNode.html @@ -0,0 +1,76 @@ + + + + MutationEvent.relatedNode for DOMNodeInserted and DOMNodeRemoved + + + +

DOM Events

+

+ Test Description: MutationEvent.relatedNode is the parent node of the node being removed for DOMNodeRemoved event; + and, it is the parent node of the node that has been inserted for DOMNodeInserted event +

+ + +
+
+
+

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.fail.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.fail.html new file mode 100644 index 0000000000..9b0843c115 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.fail.html @@ -0,0 +1,18 @@ + + + + ProcessingInstruction.data and DOMCharacterDataModified event + + +

DOM Events

+

+ Test Description: DOMCharacterDataModified event fires after ProcessingInstruction.data have been modified, + but the node itself has not been inserted or deleted. The proximal event target of this event shall be the + ProcessingInstruction node. +

+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.xml b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.xml new file mode 100644 index 0000000000..34ad59064f --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/ProcessingInstruction.DOMCharacterDataModified.xml @@ -0,0 +1,63 @@ + + + + ProcessingInstruction.data and DOMCharacterDataModified event + + +

+

DOM Events

+

+ Test Description: DOMCharacterDataModified event fires after ProcessingInstruction.data have been modified, + but the node itself has not been inserted or deleted. The proximal event target of this event shall be the + ProcessingInstruction node. +

+ + + +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + +

+
\ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.hasFeature.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.hasFeature.html new file mode 100644 index 0000000000..853cc7c435 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.hasFeature.html @@ -0,0 +1,60 @@ + + + + TextEvent: feature detection with hasFeature() + + + +

DOM Events

+

+ Test Description: TextEvent - feature support detection using DOMImplementation.hasFeature() method +

+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.initTextEvent.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.initTextEvent.html new file mode 100644 index 0000000000..52eae11aa9 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.initTextEvent.html @@ -0,0 +1,66 @@ + + + + TextEvent.initTextEvent() and Event.trusted + + + +

DOM Events

+

+ Test Description: initTextEvent initializes attributes of a TextEvent object. +

+ + +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.IME.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.IME.html new file mode 100644 index 0000000000..af5c736242 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.IME.html @@ -0,0 +1,69 @@ + + + + TextEvent: inputMode with DOM_INPUT_METHOD_IME + + + +

DOM Events

+

+ Test Description: TextEvent.inputMode is DOM_INPUT_METHOD_IME (0x04) + when the text string was entered through an Input Method Editor. +

+ + + + + +

+ Steps: +

    +
  1. Open Japanese Microsoft IME and select Hiragana input method +
  2. Click at the above textbox and then type 'a' using keyboard +
  3. Press '{ENTER}' key to complete the IME composition +
+

+

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.drop.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.drop.html new file mode 100644 index 0000000000..14ffc19765 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.drop.html @@ -0,0 +1,71 @@ + + + + TextEvent: inputMode with DOM_INPUT_METHOD_DROP + + + +

DOM Events

+

+ Test Description: TextEvent.inputMode is DOM_INPUT_METHOD_DROP (0x03) + when the text string was inserted as part of a drag-and-drop operation. +

+ + +
Hello World
+
+ +
+ +

+ Steps: +

    +
  1. Select "Hello World" inside the green editbox +
  2. Drag-and-drop it ("Hello World") to the textbox below the green editbox +
+

+

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.keyboard.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.keyboard.html new file mode 100644 index 0000000000..472dd96ddb --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.keyboard.html @@ -0,0 +1,67 @@ + + + + TextEvent: inputMode with DOM_INPUT_METHOD_KEYBOARD + + + +

DOM Events

+

+ Test Description: TextEvent.inputMode is DOM_INPUT_METHOD_KEYBOARD (0x01) + when the text string was input through a keyboard. +

+ + + + +

+ Steps: +

    +
  1. Type 'a' in the above texbox using keyboard +
+

+

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.paste.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.paste.html new file mode 100644 index 0000000000..a93259cd60 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.paste.html @@ -0,0 +1,71 @@ + + + + TextEvent: inputMode with DOM_INPUT_METHOD_PASTE + + + +

DOM Events

+

+ Test Description: TextEvent.inputMode is DOM_INPUT_METHOD_PASTE (0x02) + when the text string was pasted in from a clipboard. +

+ + +
Hello World
+
+ +
+ +

+ Steps: +

    +
  1. Select and copy "Hello World" inside the green editbox +
  2. Paste it ("Hello World") to the textbox below the green editbox +
+

+

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.script.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.script.html new file mode 100644 index 0000000000..c1327ebae5 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/TextEvent.inputMode.script.html @@ -0,0 +1,63 @@ + + + + TextEvent: inputMode with DOM_INPUT_METHOD_SCRIPT + + + +

DOM Events

+

+ Test Description: TextEvent.inputMode is DOM_INPUT_METHOD_SCRIPT (0x09) + when the text string was inserted via a script operation on the DOM. +

+ + +
+
+
+

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/UIEvent.load.stylesheet.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/UIEvent.load.stylesheet.html new file mode 100644 index 0000000000..a948a2f71a --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/UIEvent.load.stylesheet.html @@ -0,0 +1,59 @@ + + + + UIEvent: load event for style sheets + + + +

DOM Events

+

+ Test Description: UIEvent - load event fires when the DOM Implementation finishes loading + dependent resources, such as style sheets. +

+ + + +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.Capture.Bubble.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.Capture.Bubble.html new file mode 100644 index 0000000000..4dfe246136 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.Capture.Bubble.html @@ -0,0 +1,90 @@ + + + + WheelEvent: wheel Event capturing/bubbling + + + +

DOM Events

+

+ Test Description: WheelEvent - wheel event bubbles. +

+ + + + +

+ Steps: +

    +
  1. Note: an input device with scroll wheel support (e.g., mouse wheel) is required +
  2. Move the mouse pointer over the above textarea +
  3. Scroll down the mouse wheel 1 or more units +
+

+

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.ctrlKey.zoom.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.ctrlKey.zoom.html new file mode 100644 index 0000000000..52b17ced96 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.ctrlKey.zoom.html @@ -0,0 +1,93 @@ + + + + WheelEvent: wheel - MouseEvent.ctrlKey and Zooming + + + +

DOM Events

+

+ Test Description: The typical default action of the wheel event type, in some cases, is to + zoom the document. If this event is canceled, the implementation must not zoom the document. +

+ +
+ +

+ Steps: +

    +
  1. Note: an input device with scroll wheel support (e.g., mouse wheel) is required +
  2. Make sure the page can be zoomed in/out by holding down '{CTRL}' key + scrolling the mouse wheel on the page +
  3. Now, click the button: +
  4. Press and hold down '{CTRL}' key on the keyboard +
  5. Move the mouse pointer to the center of the page +
  6. Scroll down/up the mouse wheel some units +
  7. Click the button: +
+

+

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.deltaMode.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.deltaMode.html new file mode 100644 index 0000000000..11761f4083 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.deltaMode.html @@ -0,0 +1,76 @@ + + + + WheelEvent: wheel - WheelEvent.deltaMode + + + +

DOM Events

+

+ Test Description: WheelEvent.deltaMode attribute contains an indication of the units of + measurement for the delta values. Its value may be different based on system configuration. +

+ + +
+ TOP TOP TOP TOP TOP TOP TOP + Scroll mouse wheel over here + Scroll mouse wheel over here + Scroll mouse wheel over here + Scroll mouse wheel over here + Scroll mouse wheel over here + Scroll mouse wheel over here + END END END END END END END +
+
+

+ Steps: +

    +
  1. Note: an input device with scroll wheel support (e.g., mouse wheel) is required +
  2. Move the mouse pointer over the above green box +
  3. Scroll down the mouse wheel 1 or more units +
+

+

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.hasFeature.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.hasFeature.html new file mode 100644 index 0000000000..8bd224fa98 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.hasFeature.html @@ -0,0 +1,60 @@ + + + + WheelEvent: feature detection with hasFeature() + + + +

DOM Events

+

+ Test Description: WheelEvent - feature support detection using DOMImplementation.hasFeature() method +

+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.initWheelEvent.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.initWheelEvent.html new file mode 100644 index 0000000000..cd8c192e41 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.initWheelEvent.html @@ -0,0 +1,76 @@ + + + + WheelEvent.initWheelEvent() and Event.trusted + + + +

DOM Events

+

+ Test Description: initWheelEvent initializes attributes of a WheelEvent object. +

+ + +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.preventDefault.scroll.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.preventDefault.scroll.html new file mode 100644 index 0000000000..6cb55a071f --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/WheelEvent.preventDefault.scroll.html @@ -0,0 +1,91 @@ + + + + WheelEvent: wheel - preventDefault() for Scrolling + + + +

DOM Events

+

+ Test Description: The typical default action of the wheel event type is to scroll the document/element + by the indicated amount. If this event is canceled, the implementation must not scroll document/element. +

+ + + + +

+ Steps: +

    +
  1. Note: an input device with scroll wheel support (e.g., mouse wheel) is required +
  2. Make sure the above textarea can be scrolled by scrolling the mouse wheel over it +
  3. Now, click the button: +
  4. Move the mouse pointer over the above textarea +
  5. Scroll down the mouse wheel 1 or more units +
  6. Click the button: +
+

+

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/abort.img.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/abort.img.html new file mode 100644 index 0000000000..c0fb1eaf97 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/abort.img.html @@ -0,0 +1,74 @@ + + + + W3C DOM Level 3 Event: abort + + + +

+ Test Description: + The abort event fires when the loading of a resource has been aborted. +

+ +

Before image is loaded below, click here.

+ +
Loading...
+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + + + diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/abort.testresult.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/abort.testresult.html new file mode 100644 index 0000000000..e0f6243b8a --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/abort.testresult.html @@ -0,0 +1,30 @@ + + + +

+ Test Description: + The abort event fires when the loading of a resource has been aborted. +

+ +

Click here to go back to the test page

+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
+ +
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/blur.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/blur.html new file mode 100644 index 0000000000..cef282bfe5 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/blur.html @@ -0,0 +1,57 @@ + + + + W3C DOM Level 3 Event: blur + + + +

Test Description: blur event fires when an event target loses focus.

+ +
+ Click the textbox and then the button:
+ +
+ +

Test passes if the word "PASS" appears below after clicking the above textbox and then the button.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/compositionstart.data.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/compositionstart.data.html new file mode 100644 index 0000000000..177c37e8d7 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/compositionstart.data.html @@ -0,0 +1,66 @@ + + + + CompositionEvent.data for compositionstart Event + + + +

DOM Events

+

+ Test Description: The value of the data attribute of the compositionstart event + shall be null for new IME input. +

+ +
+            
+
+            Steps:
+            1) Open Japanese Microsoft IME and select Hiragana input method
+            2) Click at the above textbox and then type 'a' using keyboard
+        
+ +

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/compositionstart.keydown.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/compositionstart.keydown.html new file mode 100644 index 0000000000..7316d1a8a3 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/compositionstart.keydown.html @@ -0,0 +1,76 @@ + + + + compositionstart Event and keydown Event + + + +

DOM Events

+

+ Test Description: When a keyboard is used to feed an input method editor, + compositionstart event type is generated after a keydown event. +

+ +
+            
+
+            Steps:
+            1) Open Japanese Microsoft IME and select Hiragana input method
+            2) Type 'a' in the above textbox using keyboard
+            3) Click here to test again if not following the steps exactly
+        
+ +

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/compositionstart.preventDefault.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/compositionstart.preventDefault.html new file mode 100644 index 0000000000..74fc52b579 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/compositionstart.preventDefault.html @@ -0,0 +1,73 @@ + + + + Cancelling compositionstart Event via Event.preventDefault() + + + +

DOM Events

+

+ Test Description: The default action of compositionstart event is to launch the appropriate text + composition system. If this event is canceled, the text composition system must not be launched. +

+ +
+            
+
+            Steps:
+            1) Open Japanese Microsoft IME and select Hiragana input method
+            2) Click at the above textbox and then type 'a' using keyboard
+        
+ +

Test passes if the word "PASS" appears below and nothing is typed to the textbox after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/converted/EventListener.dispatch.new.event.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/converted/EventListener.dispatch.new.event.html new file mode 100644 index 0000000000..e0ab7e0d3e --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/converted/EventListener.dispatch.new.event.html @@ -0,0 +1,77 @@ + + + + Dispatch additional events inside an event listener + + + + +
+ + + + + + + + + + + + + + + + + diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/converted/support/ProcessingInstruction.DOMCharacterDataModified.xml b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/converted/support/ProcessingInstruction.DOMCharacterDataModified.xml new file mode 100644 index 0000000000..4c95ae29df --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/converted/support/ProcessingInstruction.DOMCharacterDataModified.xml @@ -0,0 +1,32 @@ + + + + ProcessingInstruction.data and DOMCharacterDataModified event + +
+ + + + +
\ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/dispatchEvent.click.checkbox.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/dispatchEvent.click.checkbox.html new file mode 100644 index 0000000000..757bb12646 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/dispatchEvent.click.checkbox.html @@ -0,0 +1,93 @@ + + + + MouseEvent: Default action and synthetic click event + + + +

DOM Events

+

+ Test Description: MouseEvent: Default action is performed when a synthetic click event is dispatched on a checkbox element +

+ + + + +

+ Steps: +

    +
  1. Click the button "Click Here" +
+

+ +

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/error.image.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/error.image.html new file mode 100644 index 0000000000..a629652d4f --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/error.image.html @@ -0,0 +1,65 @@ + + + + W3C DOM Level 3 Event: error + + + +

Test Description: error event fires when an IMG resource failed to load.

+ + ERROR + +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.html new file mode 100644 index 0000000000..a6eb1b6638 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.html @@ -0,0 +1,61 @@ + + + + W3C DOM Level 3 Event: focusin + + + +

+ Test Description: + focusin event fires when an event target is about to receive focus. +

+ +
+ Click here: +
+ +

Test passes if the word "PASS" appears below after clicking the above textbox using mouse.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.relatedTarget.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.relatedTarget.html new file mode 100644 index 0000000000..a36d254666 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.relatedTarget.html @@ -0,0 +1,64 @@ + + + + FocusEvent.relatedTarget for focusin Event + + + +

DOM Events

+

+ Test Description: FocusEvent.relatedTarget for focusin event is the event target losing focus. +

+ +
+             
+
+            Steps:
+            1) Click in the above textbox using mouse
+            2) Then click the above button using mouse
+        
+ +

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusout.relatedTarget.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusout.relatedTarget.html new file mode 100644 index 0000000000..bc02267ed7 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusout.relatedTarget.html @@ -0,0 +1,64 @@ + + + + FocusEvent.relatedTarget for focusout Event + + + +

DOM Events

+

+ Test Description: FocusEvent.relatedTarget for focusout event is the event target receiving focus. +

+ +
+             
+
+            Steps:
+            1) Click in the above textbox using mouse
+            2) Then click the above button using mouse
+        
+ +

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.Events.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.Events.html new file mode 100644 index 0000000000..e0c9ba18d8 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.Events.html @@ -0,0 +1,52 @@ + + + + DOMImplementation.hasFeature() with Events, 3.0 and 2.0 + + + +

DOM Events

+

+ Test Description: Since DOM Level 3 Events is built on top of DOM Level 2 Events, an + implementation that returns true for "Events" and "3.0" shall also return true for the + parameters "Events" and "2.0". +

+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.feature.string.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.feature.string.html new file mode 100644 index 0000000000..e96c39c855 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/hasFeature.feature.string.html @@ -0,0 +1,80 @@ + + + + DOMImplementation.hasFeature() and Extended Feature String + + + +

DOM Events

+

+ Test Description: each interface defined in DOM Level 3 Events has a feature string, + which may act as a base feature string or as an extended feature string. +

+ +

Test passes if the word "PASS" appears below.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/load.image.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/load.image.html new file mode 100644 index 0000000000..19414eaf02 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/load.image.html @@ -0,0 +1,82 @@ + + + + W3C DOM Level 3 Event: load + + + +

+ Test Description: + load event fires when the DOM implementation finishes loading the resource (such as the document) + and any dependent resources (such as images, style sheets, or scripts). +

+ +

+ + + +

Test passes if the word "PASS" appears below after the above image is loaded.

+
Test result:
+
FAIL
+ + + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/mouseenter.ctrlKey.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/mouseenter.ctrlKey.html new file mode 100644 index 0000000000..dac16046cf --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/mouseenter.ctrlKey.html @@ -0,0 +1,64 @@ + + + + MouseEvent.ctrlKey for mouseenter Event + + + +

DOM Events

+

+ Test Description: MouseEvent.ctrlKey returns true if 'Control' key is depressed, otherwise false. +

+ +
+            
+
+            Steps:
+            1) Press and hold down the '{CTRL}' key
+            2) Move the mouse pointer into the image
+        
+ +

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/mouseenter.relatedTarget.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/mouseenter.relatedTarget.html new file mode 100644 index 0000000000..f2d449dae8 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/mouseenter.relatedTarget.html @@ -0,0 +1,69 @@ + + + + MouseEvent.relatedTarget for mouseenter Event + + + +

DOM Events

+

+ Test Description: MouseEvent.relatedTarget for mouseenter event indicates + the event target a pointing device is exiting, if any. +

+ +
+            
+ + + +
+ + Steps: + 1) Move the mouse pointer into the above green rectangle + 2) Then move the mouse pointer onto the button +
+ +

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/mouseleave.relatedTarget.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/mouseleave.relatedTarget.html new file mode 100644 index 0000000000..37ca719750 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/mouseleave.relatedTarget.html @@ -0,0 +1,69 @@ + + + + MouseEvent.relatedTarget for mouseleave Event + + + +

DOM Events

+

+ Test Description: MouseEvent.relatedTarget for mouseleave event indicates + the event target a pointing device is entering, if any. +

+ +
+            
+ + + +
+ + Steps: + 1) Move the mouse pointer onto the above button + 2) Then move the mouse pointer out of it +
+ +

Test passes if the word "PASS" appears below after following the above steps.

+
Test result:
+
FAIL
+ + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/16kb.js b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/16kb.js new file mode 100644 index 0000000000..fb3c0d64b1 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/16kb.js @@ -0,0 +1,140 @@ +var text = +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " + +"This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! This is a test! " ; +ActualResult.push("SCRIPT:loaded"); diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/InvalidBitMap.png b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/InvalidBitMap.png new file mode 100644 index 0000000000..0a15a8e10d --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/InvalidBitMap.png @@ -0,0 +1 @@ +Invalid BitMap \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/iepreview.png b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/iepreview.png new file mode 100644 index 0000000000..63959a0562 Binary files /dev/null and b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/iepreview.png differ diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/style01.css b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/style01.css new file mode 100644 index 0000000000..961757bf3d --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/support/style01.css @@ -0,0 +1,3 @@ +BODY { + PADDING-BOTTOM: 0px; BACKGROUND-COLOR: #eef0eb; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px +} diff --git a/testing/web-platform/tests/uievents/legacy/Event-subclasses-init.html b/testing/web-platform/tests/uievents/legacy/Event-subclasses-init.html new file mode 100644 index 0000000000..a79a9f18ad --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy/Event-subclasses-init.html @@ -0,0 +1,17 @@ + + + + diff --git a/testing/web-platform/tests/uievents/mouse/attributes.html b/testing/web-platform/tests/uievents/mouse/attributes.html new file mode 100644 index 0000000000..bbc388445c --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/attributes.html @@ -0,0 +1,61 @@ + +MouseEvent attributes + + + + + + + +Left Right + + diff --git a/testing/web-platform/tests/uievents/mouse/cancel-mousedown-in-subframe.html b/testing/web-platform/tests/uievents/mouse/cancel-mousedown-in-subframe.html new file mode 100644 index 0000000000..0735037735 --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/cancel-mousedown-in-subframe.html @@ -0,0 +1,64 @@ + + + + + + + + +
+ Dragging the mouse from child frame to parent frame causes both mousedown and + mouseup events being dispatched to child frame, regardless of whether the + mousedown event is canceled or not. +
+ + + diff --git a/testing/web-platform/tests/uievents/mouse/layout_change_should_fire_mouseover.html b/testing/web-platform/tests/uievents/mouse/layout_change_should_fire_mouseover.html new file mode 100644 index 0000000000..49257ae60d --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/layout_change_should_fire_mouseover.html @@ -0,0 +1,97 @@ + + + + Mouseover/enter is sent on layout change + + + + + + + + + +
+
+

Test Description: Tests that the mouseover event is fired and the element has a hover effect when the element underneath the mouse cursor is changed. +
    +
  1. Put your mouse over the red rectangle
  2. +
  3. Click the primary mouse button
  4. +
+

+ + + diff --git a/testing/web-platform/tests/uievents/mouse/mouse_buttons_back_forward.html b/testing/web-platform/tests/uievents/mouse/mouse_buttons_back_forward.html new file mode 100644 index 0000000000..2323bc1026 --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/mouse_buttons_back_forward.html @@ -0,0 +1,56 @@ + + + + + Mouse Button Back/Forward + + + + + + + + + + +

Test Description: Tests that the mouseup event is prevented. +
    +
  1. Click the back mouse button
  2. +
  3. Click the back mouse forward
  4. +
+

+ + diff --git a/testing/web-platform/tests/uievents/mouse/mouseenter-mouseleave-on-drag.html b/testing/web-platform/tests/uievents/mouse/mouseenter-mouseleave-on-drag.html new file mode 100644 index 0000000000..c36a1501c0 --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/mouseenter-mouseleave-on-drag.html @@ -0,0 +1,187 @@ + + + + Test for redundant mouseenter or mouseleave events + + + + + + + + + + +
+
+
+ + + diff --git a/testing/web-platform/tests/uievents/mouse/mouseevent_move_button.html b/testing/web-platform/tests/uievents/mouse/mouseevent_move_button.html new file mode 100644 index 0000000000..edde11d022 --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/mouseevent_move_button.html @@ -0,0 +1,102 @@ + + + + Mouse Events with button depressed + + + + + + + + + + +

Mouse Events

+

Test Description: This test checks if mouse events set button property correctly +
    +
  1. Put your mouse over the green rectangle
  2. +
  3. Press a non-primary button and hold it
  4. +
  5. Drag mouse to blue rectangle
  6. +
  7. Release mouse button
  8. +
+

+
+
+
+
+ + + diff --git a/testing/web-platform/tests/uievents/mouse/mousemove_prevent_default_action.tentative.html b/testing/web-platform/tests/uievents/mouse/mousemove_prevent_default_action.tentative.html new file mode 100644 index 0000000000..376a110fa5 --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/mousemove_prevent_default_action.tentative.html @@ -0,0 +1,93 @@ + + +mousemove event: preventDefault() + + + + + + + + + + +
div a
+
div b
+
div c
+ + + diff --git a/testing/web-platform/tests/uievents/mouse/resources/mouse-event-reporter-subframe.html b/testing/web-platform/tests/uievents/mouse/resources/mouse-event-reporter-subframe.html new file mode 100644 index 0000000000..f12f429491 --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/resources/mouse-event-reporter-subframe.html @@ -0,0 +1,37 @@ + + + + +
Child frame
+ + diff --git a/testing/web-platform/tests/uievents/mouse/resources/utils.js b/testing/web-platform/tests/uievents/mouse/resources/utils.js new file mode 100644 index 0000000000..669a2e2edd --- /dev/null +++ b/testing/web-platform/tests/uievents/mouse/resources/utils.js @@ -0,0 +1,27 @@ +// Sends to Window |w| the object |{type, param}|. +function sendMessage(w, type, param) { + w.postMessage({"type": type, "param": param}, "*"); +} + +// Returns a |Promise| that gets resolved with the event object when |target| +// receives an event of type |event_type|. +function getEvent(event_type, target) { + return new Promise(resolve => { + target.addEventListener(event_type, e => resolve(e), {once: true}); + }); +} + +// Returns a |Promise| that gets resolved with |event.data| when |window| +// receives from |source| a "message" event whose |event.data.type| matches the string +// |message_data_type|. +function getMessageData(message_data_type, source) { + return new Promise(resolve => { + function waitAndRemove(e) { + if (e.source != source || !e.data || e.data.type != message_data_type) + return; + window.removeEventListener("message", waitAndRemove); + resolve(e.data); + } + window.addEventListener("message", waitAndRemove); + }); +} diff --git a/testing/web-platform/tests/uievents/order-of-events/README.md b/testing/web-platform/tests/uievents/order-of-events/README.md new file mode 100644 index 0000000000..a6ef35eb0b --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/README.md @@ -0,0 +1,15 @@ +Order of events +============================ + +Testing of how events fire in relation to one another + +(this is the big work item) + +Expecting to need: + * braindead test (does it work at all?) + * specific functional tests + * specific edge cases + +Notes: + * small tests so that they can be given specific names for what's broken if it fails + * include a link to the corresponding test in the spec. diff --git a/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-automated-blink-webkit.html b/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-automated-blink-webkit.html new file mode 100644 index 0000000000..41de454136 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-automated-blink-webkit.html @@ -0,0 +1,159 @@ + + + + + + + Focus-related events should fire in the correct order + + + + + + + +
+ + +
+ + + diff --git a/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-contained.html b/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-contained.html new file mode 100644 index 0000000000..8df612c108 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-contained.html @@ -0,0 +1,94 @@ + + + + + Focus-related events should fire in the correct order + + + + + + + + + + +
    +
  1. Click into the text input.
  2. +
  3. Click just below the text input.
  4. +
  5. Click into the text input again.
  6. +
  7. Click the "Done" button.
  8. +
+
+


+
+ + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-management-expectations.html b/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-management-expectations.html new file mode 100644 index 0000000000..1845c15d71 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-management-expectations.html @@ -0,0 +1,48 @@ + + + + + + Focus management event expectations + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/order-of-events/focus-events/focus.html b/testing/web-platform/tests/uievents/order-of-events/focus-events/focus.html new file mode 100644 index 0000000000..7942674a70 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/focus-events/focus.html @@ -0,0 +1,94 @@ + + + + + Focus-related events should fire in the correct order + + + + + + + + + + + +
    +
  1. Click into the first text input.
  2. +
  3. Click into the second text input.
  4. +
  5. Click the "Done" button.
  6. +
+ +
+ +
+ + + + + diff --git a/testing/web-platform/tests/uievents/order-of-events/focus-events/legacy-manual.html b/testing/web-platform/tests/uievents/order-of-events/focus-events/legacy-manual.html new file mode 100644 index 0000000000..e71273973e --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/focus-events/legacy-manual.html @@ -0,0 +1,84 @@ + + + + + Focus-related events (including legacy events) should fire in the correct order + + + + + + + +
    +
  1. Click into the first text input.
  2. +
  3. Click into the second text input.
  4. +
  5. Click the "Done" button.
  6. +
+ + +
+ +
+ + + + + diff --git a/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-cancel.html b/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-cancel.html new file mode 100644 index 0000000000..082c2a0cc3 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-cancel.html @@ -0,0 +1,37 @@ + + + + + Default action is canceled if the click event is canceled. + + + + + + + + Check me!
+ + + + diff --git a/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-body.html b/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-body.html new file mode 100644 index 0000000000..45453c75ca --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-body.html @@ -0,0 +1,57 @@ + + + + + Clicking on the body element itself fires a click event + + + + + + + + + + +

Click on the blue area below.

+

 

+ + + diff --git a/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-div.html b/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-div.html new file mode 100644 index 0000000000..bf06d8251c --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-div.html @@ -0,0 +1,47 @@ + + + + + Clicking on a div element that has no click event handler fires a click event + + + + + + + + + + + +

Click on the blue square below.

+
Click me
+ + + diff --git a/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-html.html b/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-html.html new file mode 100644 index 0000000000..e93acc6749 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-html.html @@ -0,0 +1,67 @@ + + + + + Clicking on the html element itself fires a click event + + + + + + + + + + +

Click on the blue area below.

+

 

+ + + diff --git a/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-order.html b/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-order.html new file mode 100644 index 0000000000..1285a31efc --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-order.html @@ -0,0 +1,86 @@ + + + + + Click-related events should fire in the correct order + + + + + + + + + +
    +
  1. Double-click into the blue area.
  2. +
  3. Click the "Done" button.
  4. +
+
+ + + + diff --git a/testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseevents-mousemove.htm b/testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseevents-mousemove.htm new file mode 100644 index 0000000000..98a35bbcf6 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseevents-mousemove.htm @@ -0,0 +1,92 @@ + + + + MouseEvent - mousemove event order + + + + + + + + + + +

Description: Verifies that mousemove events track the pointer position and transition from top-most + visible element to top-most visible element, changing targets + in the DOM along the way.

+ +

Instructions:

+
    +
  1. Move the pointer to the upper-left red box and then move it directly toward and into the lower-right red box. +
+

Test Passes if both boxes turn green and the word 'PASS' appears below

+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/order-of-events/mouse-events/mousemove-across.html b/testing/web-platform/tests/uievents/order-of-events/mouse-events/mousemove-across.html new file mode 100644 index 0000000000..52d5a93cf9 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/mousemove-across.html @@ -0,0 +1,162 @@ + + +Mousemove handling across elements + + + + + + + +

+ Steps: +

    +
  1. Move your mouse across the yellow/red <div> element quickly from right to left. +
  2. Move your mouse across the black/blue <div> element quickly from right to left. +
  3. If the test fails, redo it again and move faster on the black/blue <div> element next time. +
+

+ +
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/testing/web-platform/tests/uievents/order-of-events/mouse-events/mousemove-between.html b/testing/web-platform/tests/uievents/order-of-events/mouse-events/mousemove-between.html new file mode 100644 index 0000000000..f9c422cc93 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/mousemove-between.html @@ -0,0 +1,132 @@ + + +Mousemove handling between elements + + + + + + + +

+ Steps: + +

    +
  1. Move your mouse over the blue <div> element, later + over the green one, later back to the blue one. +
  2. Move the mouse from the blue element to the yellow one, later to the + white background. +
+

+ + +
+
+
+
+ + diff --git a/testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseover-out.html b/testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseover-out.html new file mode 100644 index 0000000000..f10518c7f1 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseover-out.html @@ -0,0 +1,141 @@ + + +Mouseover/mouseout handling + + + + + + +

+ Steps: + +

    +
  1. Move your mouse over the blue <div> element, later + over the green one, later over the yellow one. +
  2. Move the mouse from the yellow element to the green one, later to the + blue one, and later over this paragraph. +
+

+ + +
+
+
+
+ +
+ + diff --git a/testing/web-platform/tests/uievents/order-of-events/mouse-events/wheel-basic.html b/testing/web-platform/tests/uievents/order-of-events/mouse-events/wheel-basic.html new file mode 100644 index 0000000000..1a43022d29 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/wheel-basic.html @@ -0,0 +1,91 @@ + + + + WheelEvent - basic wheel event + + + + + + + + + + + +

Description: Verifies that wheel events are captured and sent

+

Instructions:

+
    +
  1. Place your mouse pointer over the top box
  2. +
  3. Scroll the mouse wheel to change the box color
  4. +
  5. Move the mouse pointer to the second box
  6. +
  7. Scroll the mouse wheel again to change this box's color
  8. +
+

Test Passes if the box turns green and the word 'PASS' appears below

+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/testing/web-platform/tests/uievents/order-of-events/mouse-events/wheel-scrolling.html b/testing/web-platform/tests/uievents/order-of-events/mouse-events/wheel-scrolling.html new file mode 100644 index 0000000000..44e76bff6c --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/wheel-scrolling.html @@ -0,0 +1,109 @@ + + + + WheelEvent - scrolling wheel event + + + + + + + + + + + +

Description: Verifies that we can scroll the page when wheel events are captured

+

Instructions:

+
    +
  1. Place your mouse over the box
  2. +
  3. Scroll the mouse wheel to change the box color
  4. +
+

Test Passes if the box turns green and the word 'PASS' appears below

+ +
+
+
+ + + +
+

+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras non sodales nunc. Nunc interdum laoreet magna, quis faucibus mi malesuada ut. Donec eu dictum nibh. Quisque consectetur velit arcu, ac bibendum lacus interdum eget. Sed gravida consequat lectus feugiat feugiat. Nunc finibus lacus sit amet ultrices pulvinar. Integer ultrices nulla ut ligula porttitor aliquet. Nulla dapibus dignissim cursus. Morbi euismod accumsan dapibus. Nullam rutrum neque eu finibus luctus. Praesent ultricies pellentesque bibendum. +

+

+Cras faucibus facilisis justo, sit amet euismod nulla posuere sit amet. Donec odio justo, egestas ornare tristique vitae, convallis ac diam. Cras rutrum, massa nec feugiat sodales, diam ex faucibus diam, ac imperdiet dolor lacus eu nisi. Fusce feugiat ex vitae ex fermentum convallis. Pellentesque vulputate cursus lorem, vel sollicitudin eros feugiat a. Morbi egestas neque erat, eget semper nisi tempor id. Etiam eleifend fermentum convallis. Proin sem ipsum, porttitor a condimentum vel, malesuada ac est. +

+

+Curabitur at porttitor ipsum, nec aliquam sapien. Quisque aliquet dapibus nulla. Donec consequat ornare dui, quis efficitur metus fringilla vitae. Fusce ut ultricies neque. In rutrum efficitur mi ut rhoncus. In ornare, justo quis volutpat dapibus, nulla ligula tincidunt dui, vitae porttitor lectus est eget metus. Integer convallis leo vitae dui auctor, at consectetur sem sollicitudin. Ut condimentum enim non tellus finibus mattis. +

+

+Aenean pharetra, erat rutrum lacinia iaculis, ligula quam efficitur nibh, sit amet porttitor est ligula semper sapien. Morbi cursus finibus justo blandit commodo. Pellentesque at diam scelerisque, varius dolor a, tempus tortor. Nam placerat mi id elit eleifend scelerisque. Fusce imperdiet ac augue id fringilla. Quisque luctus nec sapien in tempor. Vestibulum faucibus metus nulla, nec faucibus metus rutrum sit amet. Nulla facilisi. Aliquam varius dignissim laoreet. Morbi gravida, velit sed efficitur iaculis, enim lectus hendrerit diam, ac aliquam mauris enim ut nulla. Vivamus quis aliquet libero. Vivamus accumsan elit et dolor posuere, ac volutpat nulla blandit. Proin vitae tortor rutrum, hendrerit odio vitae, ultricies metus. Pellentesque mattis sem ac lorem lacinia vestibulum. Ut orci est, placerat vitae imperdiet ac, dictum a nisi. +

+

+Proin elementum faucibus neque, sed varius est rhoncus nec. Ut nec porttitor velit, a viverra lorem. Nam lectus arcu, malesuada non suscipit at, efficitur eget diam. Morbi at purus vitae nisl mollis suscipit ac at dolor. Nam vel ullamcorper est. Sed efficitur ligula quis elit viverra, at ornare velit posuere. Maecenas porta risus velit, eu pharetra ex vehicula rutrum. Mauris eu tortor vestibulum, tristique arcu et, euismod velit. Donec et mattis ligula. Pellentesque lacinia elit sit amet libero rhoncus convallis. Aenean porta, enim eget consequat blandit, leo ante finibus massa, gravida viverra dolor massa porta neque. +

+

+ Mauris vitae tortor quis nibh tempus tempor et quis eros. Quisque massa libero, pulvinar nec fringilla non, molestie eget justo. Maecenas mollis est et felis auctor, eu sodales erat fermentum. Curabitur porttitor nibh magna, non porta mi dictum et. Aliquam nec auctor nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi nec porttitor ante, a rutrum ante. Vivamus faucibus et augue sit amet auctor. Nulla nec risus lacus. Quisque mattis vitae neque sit amet aliquet. Nam placerat mattis iaculis. +

+

+Quisque ultrices varius nisi eu feugiat. Sed a aliquam risus. Nulla fermentum erat odio, ultricies fermentum arcu tristique a. Phasellus vulputate sapien in augue sollicitudin auctor. Aenean eu lectus placerat, bibendum leo et, efficitur diam. Quisque in lacus in justo volutpat convallis. Sed vitae rhoncus tellus. Curabitur elementum mi id diam volutpat interdum. Proin urna orci, vehicula non mattis dictum, dignissim a sem. Vivamus in ultricies quam, id auctor arcu. In lacinia ex ac dui fermentum pulvinar. Donec luctus auctor ultrices. Suspendisse semper eros a dolor vulputate aliquam. +

+

+Nullam in tempor tellus, ac ullamcorper tortor. Cras vel aliquet magna, in congue nisi. Nam turpis quam, consectetur at vehicula ut, pellentesque eu risus. In vestibulum neque a ex fringilla tempor quis ac dui. Praesent dictum venenatis scelerisque. Proin ut lectus lobortis, eleifend ipsum blandit, tristique mi. Etiam lacus est, scelerisque at lectus at, interdum mattis ex. Nulla neque mauris, suscipit tempus elementum quis, viverra eu ligula. Etiam at velit vulputate, pulvinar metus eu, hendrerit odio. Sed nec feugiat tortor. Fusce nunc sapien, pretium non viverra et, volutpat eu arcu. Nullam libero justo, varius at suscipit at, scelerisque ut lectus. In leo lorem, tempor sed pellentesque nec, vulputate non lectus. Pellentesque volutpat sit amet lectus in finibus. Aliquam tristique, arcu sit amet venenatis commodo, ligula dolor efficitur ante, at faucibus mi diam ac sapien. +

+

+Ut porttitor metus et mauris euismod iaculis. Ut in lorem neque. Nam a sollicitudin ligula, non lobortis sapien. Curabitur ullamcorper justo quis vulputate cursus. Aliquam rhoncus volutpat quam non condimentum. Donec dictum aliquam metus tempor vehicula. Curabitur lorem urna, venenatis vel tellus et, mollis ornare sapien. Aliquam erat elit, tristique at suscipit efficitur, condimentum eget quam. Quisque vel metus nisl. Integer eget cursus neque, sed auctor purus. Sed ac urna nec lectus elementum laoreet. Donec posuere diam ut nibh vestibulum efficitur. Nam ut rhoncus enim, semper sollicitudin libero. +

+
+ + diff --git a/testing/web-platform/tests/uievents/resources/eventrecorder.js b/testing/web-platform/tests/uievents/resources/eventrecorder.js new file mode 100644 index 0000000000..1e306c0d0a --- /dev/null +++ b/testing/web-platform/tests/uievents/resources/eventrecorder.js @@ -0,0 +1,315 @@ +// interface EventRecorder { +// static void start(); +// static void stop(); +// static void clearRecords(); +// static sequence getRecords(); +// static void configure(EventRecorderOptions options); +// }; +// * getRecords +// * returns an array of EventRecord objects; the array represents the sequence of events captured at anytime after the last clear() +// call, between when the recorder was started and stopped (including multiple start/stop pairs) +// * configure +// * sets options that should apply to the recorder. If the recorder has any existing records, than this API throws an exception. +// * start +// * starts/un-pauses the recorder +// * stop +// * stops/pauses the recorder +// * clear +// * purges all recorded records + +// ---------------------- + +// dictionary EventRecorderOptions { +// sequence mergeEventTypes; +// ObjectNamedMap objectMap; +// }; +// * mergeEventTypes +// * a list of event types that should be consolidated into one record when all of the following conditions are true: +// 1) The events are of the same type and follow each other chronologically +// 2) The events' currentTarget is the same +// * The default is an empty list (no event types are merged). +// * objectMap +// * Sets up a series + +// dictionary ObjectNamedMap { +// // +// }; +// * targetTestID = the string identifier that the associated target object should be known as (for purposes of unique identification. This +// need not be the same as the Node's id attribute if it has one. If no 'targetTestID' string mapping is provided via this +// map, but is encountered later when recording specific events, a generic targetTestID of 'UNKNOWN_OBJECT' is used. + +// ---------------------- + +// dictionary EventRecord { +// unsigned long chronologicalOrder; +// unsigned long sequentialOccurrences; +// sequence? nestedEvents; +// DOMString interfaceType; +// EventRecordDetails event; +// }; +// * chronologicalOrder +// * Since some events may be dispatched re-entrantly (e.g., while existing events are being dispatched), and others may be merged +// given the 'mergeEventTypes' option in the EventRecorder, this value is the actual chronological order that the event fired +// * sequentialOccurrences +// * If this event was fired multiple times in a row (see the 'mergeEventTypes' option), this value is the count of occurrences. +// A value of 1 means this was the only occurrence of this event (that no events were merged with it). A value greater than 1 +// indicates that the event occurred that many times in a row. +// * nestedEvents +// * The holds all the events that were sequentially dispatched synchronously while the current event was still being dispatched +// (e.g., between the time that this event listener was triggered and when it returned). +// * Has the value null if no nested events were recorded during the invocation of this listener. +// * interfaceType +// * The string indicating which Event object (or derived Event object type) the recorded event object instance is based on. +// * event +// * Access to the recorded event properties for the event instance (not the actual event instance itself). A snapshot of the +// enumerable properties of the event object instance at the moment the listener was first triggered. + +// ---------------------- + +// dictionary EventRecordDetails { +// // +// }; +// * EventRecordDetails +// * For records with 'sequentialOccurrences' > 1, only the first occurence is recorded (subsequent event details are dropped). +// * Object reference values (e.g., event.target, event.currentTarget, etc.) are replaced with their mapped 'targetTestID' string. +// If no 'targetTestID' string mapping is available for a particular object, the value 'UNKNOWN_OBJECT' is returned. + +// ---------------------- + +// partial interface Node { +// void addRecordedEventListener(SupportedEventTypes type, EventListener? handler, optional boolean capturePhase = false); +// void removeRecordedEventListener(SupportedEventTypes type, EventListener? handler, optional boolean capturePhase = false); +// }; +// +// enum SupportedEventTypes = { +// "mousemove", +// etc... +// }; +// * addRecordedEventListener +// * handler = pass null if you want only a default recording of the event (and don't need any other special handling). Otherwise, +// the handler will be invoked normally as part of the event's dispatch. +// * are the same as those defined on addEventListener/removeEventListenter APIs (see DOM4) +// * Use this API *instead of* addEventListener to record your events for testing purposes. + +(function EventRecorderScope(global) { + "use strict"; + + if (global.EventRecorder) + return; // Already initialized. + + // WeakMap polyfill + if (!global.WeakMap) { + throw new Error("EventRecorder depends on WeakMap! Please polyfill for completeness to run in this user agent!"); + } + + // Globally applicable variables + var allRecords = []; + var recording = false; + var rawOrder = 1; + var mergeTypesTruthMap = {}; // format of { eventType: true, ... } + var eventsInScope = []; // Tracks synchronous event dispatches + var handlerMap = new WeakMap(); // Keeps original handlers (so that they can be used to un-register for events. + + // Find all Event Object Constructors on the global and add them to the map along with their name (sans 'Event') + var eventConstructorsNameMap = new WeakMap(); // format of key: hostObject, value: alias to use. + var regex = /[A-Z][A-Za-z0-9]+Event$/; + Object.getOwnPropertyNames(global).forEach(function (propName) { + if (regex.test(propName)) + eventConstructorsNameMap.set(global[propName], propName); + }); + var knownObjectsMap = eventConstructorsNameMap; + + Object.defineProperty(global, "EventRecorder", { + writable: true, + configurable: true, + value: Object.create(null, { + start: { + enumerable: true, configurable: true, writable: true, value: function start() { recording = true; } + }, + stop: { + enumerable: true, configurable: true, writable: true, value: function stop() { recording = false; } + }, + clearRecords: { + enumerable: true, configurable: true, writable: true, value: function clearRecords() { + rawOrder = 1; + allRecords = []; + } + }, + getRecords: { + enumerable: true, configurable: true, writable: true, value: function getRecords() { return allRecords; } + }, + checkRecords: { + enumerable: true, configurable: true, writable: true, value: function checkRecords(expected) { + if (expected.length < allRecords.length) { + return false; + } + var j = 0; + for (var i = 0; i < expected.length; ++i) { + if (j >= allRecords.length) { + if (expected[i].optional) { + continue; + } + return false; + } + if (expected[i].type == allRecords[j].event.type && expected[i].target == allRecords[j].event.currentTarget) { + ++j; + continue; + } + if (expected[i].optional) { + continue; + } + return false; + } + return true; + } + }, + configure: { + enumerable: true, configurable: true, writable: true, value: function configure(options) { + if (allRecords.length > 0) + throw new Error("Wrong time to call me: EventRecorder.configure must only be called when no recorded events are present. Try 'clearRecords' first."); + + // Un-configure existing options by calling again with no options set... + mergeTypesTruthMap = {}; + knownObjectsMap = eventConstructorsNameMap; + + if (!(options instanceof Object)) + return; + // Sanitize the passed object (tease-out getter functions) + var sanitizedOptions = {}; + for (var x in options) { + sanitizedOptions[x] = options[x]; + } + if (sanitizedOptions.mergeEventTypes && Array.isArray(sanitizedOptions.mergeEventTypes)) { + sanitizedOptions.mergeEventTypes.forEach(function (eventType) { + if (typeof eventType == "string") + mergeTypesTruthMap[eventType] = true; + }); + } + if (sanitizedOptions.objectMap && (sanitizedOptions.objectMap instanceof Object)) { + for (var y in sanitizedOptions.objectMap) { + knownObjectsMap.set(sanitizedOptions.objectMap[y], y); + } + } + } + }, + addEventListenersForNodes: { + enumerable: true, configurable: true, writable: true, value: function addEventListenersForNodes(events, nodes, handler) { + for (var i = 0; i < nodes.length; ++i) { + for (var j = 0; j < events.length; ++j) { + nodes[i].addRecordedEventListener(events[j], handler); + } + } + } + } + }) + }); + + function EventRecord(rawEvent) { + this.chronologicalOrder = rawOrder++; + this.sequentialOccurrences = 1; + this.nestedEvents = null; // potentially a [] + this.interfaceType = knownObjectsMap.get(rawEvent.constructor); + if (!this.interfaceType) // In case (somehow) this event's constructor is not named something with an 'Event' suffix... + this.interfaceType = rawEvent.constructor.toString(); + this.event = new CloneObjectLike(rawEvent); + } + + // Only enumerable props including prototype-chain (non-recursive), w/no functions. + function CloneObjectLike(object) { + for (var prop in object) { + var val = object[prop]; + if (Array.isArray(val)) + this[prop] = CloneArray(val); + else if (typeof val == "function") + continue; + else if ((typeof val == "object") && (val != null)) { + this[prop] = knownObjectsMap.get(val); + if (this[prop] === undefined) + this[prop] = "UNKNOWN_OBJECT (" + val.toString() + ")"; + } + else + this[prop] = val; + } + } + + function CloneArray(array) { + var dup = []; + for (var i = 0, len = array.length; i < len; i++) { + var val = array[i] + if (typeof val == "undefined") + throw new Error("Ugg. Sparce arrays are not supported. Sorry!"); + else if (Array.isArray(val)) + dup[i] = "UNKNOWN_ARRAY"; + else if (typeof val == "function") + dup[i] = "UNKNOWN_FUNCTION"; + else if ((typeof val == "object") && (val != null)) { + dup[i] = knownObjectsMap.get(val); + if (dup[i] === undefined) + dup[i] = "UNKNOWN_OBJECT (" + val.toString() + ")"; + } + else + dup[i] = val; + } + return dup; + } + + function generateRecordedEventHandlerWithCallback(callback) { + return function(e) { + if (recording) { + // Setup the scope for any synchronous events + eventsInScope.push(recordEvent(e)); + callback.call(this, e); + eventsInScope.pop(); + } + } + } + + function recordedEventHandler(e) { + if (recording) + recordEvent(e); + } + + function recordEvent(e) { + var record = new EventRecord(e); + var recordList = allRecords; + // Adjust which sequential list to use depending on scope + if (eventsInScope.length > 0) { + recordList = eventsInScope[eventsInScope.length - 1].nestedEvents; + if (recordList == null) // This top-of-stack event record hasn't had any nested events yet. + recordList = eventsInScope[eventsInScope.length - 1].nestedEvents = []; + } + if (mergeTypesTruthMap[e.type] && (recordList.length > 0)) { + var tail = recordList[recordList.length-1]; + // Same type and currentTarget? + if ((tail.event.type == record.event.type) && (tail.event.currentTarget == record.event.currentTarget)) { + tail.sequentialOccurrences++; + return; + } + } + recordList.push(record); + return record; + } + + Object.defineProperties(Node.prototype, { + addRecordedEventListener: { + enumerable: true, writable: true, configurable: true, + value: function addRecordedEventListener(type, handler, capture) { + if (handler == null) + this.addEventListener(type, recordedEventHandler, capture); + else { + var subvertedHandler = generateRecordedEventHandlerWithCallback(handler); + handlerMap.set(handler, subvertedHandler); + this.addEventListener(type, subvertedHandler, capture); + } + } + }, + removeRecordedEventListener: { + enumerable: true, writable: true, configurable: true, + value: function addRecordedEventListener(type, handler, capture) { + var alternateHandlerUsed = handlerMap.get(handler); + this.removeEventListenter(type, alternateHandlerUsed ? alternateHandlerUsed : recordedEventHandler, capture); + } + } + }); + +})(window); \ No newline at end of file -- cgit v1.2.3