OLD | NEW |
(Empty) | |
| 1 <sky> |
| 2 <import src="../resources/chai.sky" /> |
| 3 <import src="../resources/mocha.sky" /> |
| 4 <style> |
| 5 foo { width: 100px; height: 100px; background: blue; } |
| 6 bar { width: 100px; height: 100px; background: purple; } |
| 7 </style> |
| 8 <foo /><bar /> |
| 9 <script> |
| 10 describe("elementFromPoint", function() { |
| 11 it("should hit test", function() { |
| 12 // FIXME: We should have much better hit-testing coverage, at least: |
| 13 // inline content (both sections of a wrapped run) |
| 14 // text node |
| 15 // flex box |
| 16 // display: paragraph |
| 17 // position: absolute |
| 18 // position: relative |
| 19 // z-order (missing, zero, positive and negative) |
| 20 assert.equal(document.elementFromPoint(50, 50).tagName, 'foo') |
| 21 assert.equal(document.elementFromPoint(50, 150).tagName, 'bar') |
| 22 assert.equal(document.elementFromPoint(50, 250).tagName, 'sky') |
| 23 }); |
| 24 }); |
| 25 </script> |
| 26 </sky> |
OLD | NEW |