| OLD | NEW |
| 1 var focusinSeen = ""; | 1 var focusinSeen = ""; |
| 2 var focusoutSeen = ""; | 2 var focusoutSeen = ""; |
| 3 | 3 |
| 4 var rectElement = document.getElementById("rect1"); | 4 var rectElement = document.getElementById("rect1"); |
| 5 var gElement = document.getElementById("g"); | 5 var gElement = document.getElementById("g"); |
| 6 var useElement = document.getElementById("use"); | 6 var useElement = document.getElementById("use"); |
| 7 var useElement2 = document.getElementById("usesymbol"); | 7 var useElement2 = document.getElementById("usesymbol"); |
| 8 var switchElement = document.getElementById("switch"); | 8 var switchElement = document.getElementById("switch"); |
| 9 var imgElement = document.getElementById("img"); | 9 var imgElement = document.getElementById("img"); |
| 10 description("Test whether focusin and focusout events are dispatched and seen in
the focusin/focusout event handlers: "); | 10 description("Test whether focusin and focusout events are dispatched and seen in
the focusin/focusout event handlers: "); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 imgElement.setAttribute("onfocusout", "focusoutHandler(evt)"); | 42 imgElement.setAttribute("onfocusout", "focusoutHandler(evt)"); |
| 43 | 43 |
| 44 function clickAt(x, y) | 44 function clickAt(x, y) |
| 45 { | 45 { |
| 46 eventSender.mouseMoveTo(x, y); | 46 eventSender.mouseMoveTo(x, y); |
| 47 eventSender.mouseDown(); | 47 eventSender.mouseDown(); |
| 48 eventSender.mouseUp(); | 48 eventSender.mouseUp(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 if (window.eventSender) { | 51 if (window.eventSender) { |
| 52 // Mouse events only work after an initial layout | |
| 53 document.documentElement.offsetLeft; | |
| 54 | 52 |
| 55 // cause focusin and focusout | 53 // cause focusin and focusout |
| 56 clickAt(50, 50); | 54 clickAt(50, 50); |
| 57 clickAt(150, 250); | 55 clickAt(150, 250); |
| 58 shouldBeEqualToString('focusinSeen', 'rect1'); | 56 shouldBeEqualToString('focusinSeen', 'rect1'); |
| 59 shouldBeEqualToString('focusoutSeen', 'rect1'); | 57 shouldBeEqualToString('focusoutSeen', 'rect1'); |
| 60 | 58 |
| 61 clearFocusSeen(); | 59 clearFocusSeen(); |
| 62 | 60 |
| 63 // cause focusin and focusout | 61 // cause focusin and focusout |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 shouldBeEqualToString('focusinSeen', 'img'); | 96 shouldBeEqualToString('focusinSeen', 'img'); |
| 99 shouldBeEqualToString('focusoutSeen', 'img'); | 97 shouldBeEqualToString('focusoutSeen', 'img'); |
| 100 | 98 |
| 101 successfullyParsed = true; | 99 successfullyParsed = true; |
| 102 successfullyParsed = true; | 100 successfullyParsed = true; |
| 103 | 101 |
| 104 if (window.testRunner) | 102 if (window.testRunner) |
| 105 testRunner.notifyDone(); | 103 testRunner.notifyDone(); |
| 106 } else | 104 } else |
| 107 alert("This test must be run via DRT!"); | 105 alert("This test must be run via DRT!"); |
| OLD | NEW |