From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- testing/web-platform/tests/uievents/OWNERS | 3 + testing/web-platform/tests/uievents/README.md | 3 + .../tests/uievents/constructors/README.md | 4 + .../tests/uievents/hierarchy/README.md | 34 ++ .../tests/uievents/interface/README.md | 13 + .../web-platform/tests/uievents/keyboard/README.md | 3 + .../uievents/keyboard/key-101en-us-manual.html | 91 +++ .../uievents/keyboard/key-102fr-fr-manual.html | 93 +++ .../tests/uievents/keyboard/key-manual.css | 118 ++++ .../tests/uievents/keyboard/key-manual.js | 671 +++++++++++++++++++++ .../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 + .../tests/uievents/order-of-events/README.md | 15 + .../focus-events/focus-automated-blink-webkit.html | 170 ++++++ .../order-of-events/focus-events/focus-manual.html | 81 +++ .../focus-events/legacy-manual.html | 84 +++ .../mouse-events/click-on-body-manual.html | 53 ++ .../mouse-events/click-on-div-manual.html | 43 ++ .../mouse-events/click-on-html-manual.html | 58 ++ .../mouse-events/mouseevents-mousemove-manual.htm | 76 +++ .../mouse-events/mouseover-out-manual.html | 125 ++++ .../tests/uievents/resources/eventrecorder.js | 283 +++++++++ 89 files changed, 6435 insertions(+) create mode 100644 testing/web-platform/tests/uievents/OWNERS create mode 100644 testing/web-platform/tests/uievents/README.md create mode 100644 testing/web-platform/tests/uievents/constructors/README.md create mode 100644 testing/web-platform/tests/uievents/hierarchy/README.md create mode 100644 testing/web-platform/tests/uievents/interface/README.md 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-manual.css create mode 100644 testing/web-platform/tests/uievents/keyboard/key-manual.js 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/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-manual.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-on-body-manual.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-div-manual.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-html-manual.html create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseevents-mousemove-manual.htm create mode 100644 testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseover-out-manual.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/OWNERS b/testing/web-platform/tests/uievents/OWNERS new file mode 100644 index 000000000..50802902f --- /dev/null +++ b/testing/web-platform/tests/uievents/OWNERS @@ -0,0 +1,3 @@ +@jdm +@zqzhang +@Ms2ger diff --git a/testing/web-platform/tests/uievents/README.md b/testing/web-platform/tests/uievents/README.md new file mode 100644 index 000000000..065c0c788 --- /dev/null +++ b/testing/web-platform/tests/uievents/README.md @@ -0,0 +1,3 @@ +To run the UIEvents tests, go to: + +http://w3c-test.org/uievents/order-of-events/mouse-events/ \ No newline at end of file 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 000000000..097a51039 --- /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/hierarchy/README.md b/testing/web-platform/tests/uievents/hierarchy/README.md new file mode 100644 index 000000000..3bf23b4c2 --- /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/interface/README.md b/testing/web-platform/tests/uievents/interface/README.md new file mode 100644 index 000000000..970fdd4df --- /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/keyboard/README.md b/testing/web-platform/tests/uievents/keyboard/README.md new file mode 100644 index 000000000..38c454dd7 --- /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 000000000..6fa00c929 --- /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 000000000..7ef1ce295 --- /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-manual.css b/testing/web-platform/tests/uievents/keyboard/key-manual.css new file mode 100644 index 000000000..b2add2a75 --- /dev/null +++ b/testing/web-platform/tests/uievents/keyboard/key-manual.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-manual.js b/testing/web-platform/tests/uievents/keyboard/key-manual.js new file mode 100644 index 000000000..175258bd8 --- /dev/null +++ b/testing/web-platform/tests/uievents/keyboard/key-manual.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/legacy-domevents-tests/Status.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/Status.html new file mode 100644 index 000000000..392f68edc --- /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 000000000..2da0a389e --- /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 000000000..8cb548f84 --- /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 000000000..e5064d8d4 --- /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 000000000..a414d6029 --- /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 000000000..93489c63b --- /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 000000000..4c95ae29d --- /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 000000000..0f8242b07 --- /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 000000000..12c45fc84 --- /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 000000000..ca1ad97d2 --- /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 000000000..c229abe96 --- /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 000000000..77b8a41e1 --- /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 000000000..31fbec776 --- /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 000000000..5c30dabe2 --- /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 000000000..31d4fbf08 --- /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 000000000..0e0d26d1a --- /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 000000000..34d711202 --- /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 000000000..1819f563d --- /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 000000000..8acd3cb97 --- /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 000000000..4bd3b51b4 --- /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 000000000..019143e36 --- /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 000000000..ea1adb075 --- /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 000000000..63fe460f3 --- /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 000000000..ee490b47e --- /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 000000000..605565a78 --- /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 000000000..17b7dd5cc --- /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 000000000..e6cb57806 --- /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 000000000..f550a5366 --- /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 000000000..3b2bceabf --- /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 000000000..6b92079ef --- /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 000000000..9b0843c11 --- /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 000000000..34ad59064 --- /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 000000000..853cc7c43 --- /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 000000000..52eae11aa --- /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 000000000..af5c73624 --- /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 000000000..14ffc1976 --- /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 000000000..9d679d708 --- /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
+ + \ No newline at end of file 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 000000000..a93259cd6 --- /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 000000000..c1327ebae --- /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 000000000..a948a2f71 --- /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 000000000..4dfe24613 --- /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 000000000..52b17ced9 --- /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 000000000..11761f408 --- /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 000000000..8bd224fa9 --- /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 000000000..cd8c192e4 --- /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 000000000..6cb55a071 --- /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 000000000..c0fb1eaf9 --- /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 000000000..e0f6243b8 --- /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 000000000..cef282bfe --- /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 000000000..177c37e8d --- /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 000000000..7316d1a8a --- /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 000000000..74fc52b57 --- /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 000000000..e0ab7e0d3 --- /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 000000000..4c95ae29d --- /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 000000000..757bb1264 --- /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 000000000..a629652d4 --- /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 000000000..a6eb1b663 --- /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 000000000..a36d25466 --- /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 000000000..bc02267ed --- /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 000000000..e0c9ba18d --- /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 000000000..e96c39c85 --- /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 000000000..19414eaf0 --- /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 000000000..dac16046c --- /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 000000000..f2d449dae --- /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 000000000..37ca71975 --- /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 000000000..fb3c0d64b --- /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 000000000..0a15a8e10 --- /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 000000000..63959a056 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 000000000..961757bf3 --- /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/order-of-events/README.md b/testing/web-platform/tests/uievents/order-of-events/README.md new file mode 100644 index 000000000..a6ef35eb0 --- /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 000000000..f98109a9f --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-automated-blink-webkit.html @@ -0,0 +1,170 @@ + + + + + + + Focus-related events should fire in the correct order + + + + + + + + +
+ + +
+ + + diff --git a/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-manual.html b/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-manual.html new file mode 100644 index 000000000..c91f790e2 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/focus-events/focus-manual.html @@ -0,0 +1,81 @@ + + + + + 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 000000000..e71273973 --- /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-on-body-manual.html b/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-body-manual.html new file mode 100644 index 000000000..30b6646af --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/click-on-body-manual.html @@ -0,0 +1,53 @@ + + + + + Clicking on the body element itself fires a click event + + + + + + + + +

Click on the blue area below. If a "PASS" result appears, the test passes; otherwise, it fails.

+

 

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

Click on the blue square below. If a "PASS" result appears, the test passes; otherwise, it fails.

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

Click on the blue area below. If a "PASS" result appears, the test passes; otherwise, it fails.

+

 

+ + + diff --git a/testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseevents-mousemove-manual.htm b/testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseevents-mousemove-manual.htm new file mode 100644 index 000000000..8ed9c1c28 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseevents-mousemove-manual.htm @@ -0,0 +1,76 @@ + + + + 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/mouseover-out-manual.html b/testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseover-out-manual.html new file mode 100644 index 000000000..1d96fd303 --- /dev/null +++ b/testing/web-platform/tests/uievents/order-of-events/mouse-events/mouseover-out-manual.html @@ -0,0 +1,125 @@ + + +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/resources/eventrecorder.js b/testing/web-platform/tests/uievents/resources/eventrecorder.js new file mode 100644 index 000000000..936b136d8 --- /dev/null +++ b/testing/web-platform/tests/uievents/resources/eventrecorder.js @@ -0,0 +1,283 @@ +// 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. + +// ---------------------- + +// [NoInterfaceObject] +// interface EventRecorderRegistration { +// void addRecordedEventListener(SupportedEventTypes type, EventListener? handler, optional boolean capturePhase = false); +// void removeRecordedEventListener(SupportedEventTypes type, EventListener? handler, optional boolean capturePhase = false); +// }; +// Node implements EventRecorderRegistration; +// +// 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; } + }, + 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); + } + } + } + } + }) + }); + + 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