| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <p id="description"></p> | 7 <p id="description"></p> |
| 8 <div id="sandbox"> | 8 <div id="sandbox"> |
| 9 <details open id="details" style="height: 200px"> | 9 <details open id="details" style="height: 200px"> |
| 10 <summary id="summary">summary</summary> | 10 <summary id="summary">summary</summary> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 function moveMouse(oldElementId, newElementId) | 63 function moveMouse(oldElementId, newElementId) |
| 64 { | 64 { |
| 65 debug('\n' + 'Moving mouse from ' + oldElementId + ' to ' + newElementId); | 65 debug('\n' + 'Moving mouse from ' + oldElementId + ' to ' + newElementId); |
| 66 moveMouseOver(document.getElementById(oldElementId)); | 66 moveMouseOver(document.getElementById(oldElementId)); |
| 67 clearEventRecords(); | 67 clearEventRecords(); |
| 68 moveMouseOver(document.getElementById(newElementId)); | 68 moveMouseOver(document.getElementById(newElementId)); |
| 69 } | 69 } |
| 70 | 70 |
| 71 function test() | 71 function test() |
| 72 { | 72 { |
| 73 if (window.testRunner) | |
| 74 testRunner.dumpAsText(); | |
| 75 var ids = ['sandbox', 'details', 'summary']; | 73 var ids = ['sandbox', 'details', 'summary']; |
| 76 for (var i = 0; i < ids.length; ++i) { | 74 for (var i = 0; i < ids.length; ++i) { |
| 77 var element = document.getElementById(ids[i]); | 75 var element = document.getElementById(ids[i]); |
| 78 element.addEventListener('mouseover', recordEvent, false); | 76 element.addEventListener('mouseover', recordEvent, false); |
| 79 element.addEventListener('mouseout', recordEvent, false); | 77 element.addEventListener('mouseout', recordEvent, false); |
| 80 } | 78 } |
| 81 | 79 |
| 82 moveMouse('summary', 'details'); | 80 moveMouse('summary', 'details'); |
| 83 shouldBe('dispatchedEvent("mouseover")', '["details(<-summary)(@details)", "
details(<-summary)(@sandbox)"]'); | 81 shouldBe('dispatchedEvent("mouseover")', '["details(<-summary)(@details)", "
details(<-summary)(@sandbox)"]'); |
| 84 shouldBe('dispatchedEvent("mouseout")', '["summary(<-details)(@summary)", "s
ummary(<-details)(@details)", "summary(<-details)(@sandbox)"]'); | 82 shouldBe('dispatchedEvent("mouseout")', '["summary(<-details)(@summary)", "s
ummary(<-details)(@details)", "summary(<-details)(@sandbox)"]'); |
| 85 | 83 |
| 86 moveMouse('details', 'summary'); | 84 moveMouse('details', 'summary'); |
| 87 shouldBe('dispatchedEvent("mouseover")', '["summary(<-details)(@summary)", "
summary(<-details)(@details)", "summary(<-details)(@sandbox)"]'); | 85 shouldBe('dispatchedEvent("mouseover")', '["summary(<-details)(@summary)", "
summary(<-details)(@details)", "summary(<-details)(@sandbox)"]'); |
| 88 shouldBe('dispatchedEvent("mouseout")', '["details(<-summary)(@details)", "d
etails(<-summary)(@sandbox)"]'); | 86 shouldBe('dispatchedEvent("mouseout")', '["details(<-summary)(@details)", "d
etails(<-summary)(@sandbox)"]'); |
| 89 } | 87 } |
| 90 | 88 |
| 91 test(); | 89 test(); |
| 92 </script> | 90 </script> |
| 93 </body> | 91 </body> |
| 94 </html> | 92 </html> |
| OLD | NEW |