diff options
Diffstat (limited to 'testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.html')
-rw-r--r-- | testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.html | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.html b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.html new file mode 100644 index 0000000000..a6eb1b6638 --- /dev/null +++ b/testing/web-platform/tests/uievents/legacy-domevents-tests/submissions/Microsoft/focusin.html @@ -0,0 +1,61 @@ +<!DOCTYPE HTML> +<html> + <head> + <title> W3C DOM Level 3 Event: focusin </title> + <script type="text/javascript"> + var PassTest = function() + { + document.getElementById("testresult").firstChild.data = "PASS"; + } + + var FailTest = function() + { + document.getElementById("testresult").firstChild.data = "FAIL"; + } + + var EVENT = "focusin"; + var TARGET, PARENT; + + window.onload = function() + { + try + { + TARGET = document.getElementById("target"); + PARENT = document.getElementById("parent"); + + PARENT.addEventListener(EVENT, TestBubble, false); + } + catch(ex) + { + FailTest(); + } + } + + function TestBubble(evt) + { + if ((evt.type == EVENT) && (evt.currentTarget == PARENT) && (evt.target == TARGET)) + { + PassTest(); + } + else + { + FailTest(); + } + } + </script> + </head> + <body> + <h4> + Test Description: + focusin event fires when an event target is about to receive focus. + </h4> + + <div id="parent"> + Click here: <input id="target" /> + </div> + + <p>Test passes if the word "PASS" appears below after clicking the above textbox using mouse.</p> + <div>Test result: </div> + <div id='testresult'>FAIL</div> + </body> +</html>
\ No newline at end of file |