mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
It was broken during removal of RenderLayer::collectFragments: https://codereview.chromium.org/778043005/ R=esprehn@chromium.org, ojan@chromium.org Review URL: https://codereview.chromium.org/791933004
27 lines
840 B
Plaintext
27 lines
840 B
Plaintext
<sky>
|
|
<import src="../resources/chai.sky" />
|
|
<import src="../resources/mocha.sky" />
|
|
<style>
|
|
foo { width: 100px; height: 100px; background: blue; }
|
|
bar { width: 100px; height: 100px; background: purple; }
|
|
</style>
|
|
<foo /><bar />
|
|
<script>
|
|
describe("elementFromPoint", function() {
|
|
it("should hit test", function() {
|
|
// FIXME: We should have much better hit-testing coverage, at least:
|
|
// inline content (both sections of a wrapped run)
|
|
// text node
|
|
// flex box
|
|
// display: paragraph
|
|
// position: absolute
|
|
// position: relative
|
|
// z-order (missing, zero, positive and negative)
|
|
assert.equal(document.elementFromPoint(50, 50).tagName, 'foo')
|
|
assert.equal(document.elementFromPoint(50, 150).tagName, 'bar')
|
|
assert.equal(document.elementFromPoint(50, 250).tagName, 'sky')
|
|
});
|
|
});
|
|
</script>
|
|
</sky>
|