Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Side by Side Diff: sky/tests/layout/document-elementFromPoint.sky

Issue 791933004: Fix hit-testing (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebased Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayer.cpp ('k') | sky/tests/layout/document-elementFromPoint-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698