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

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

Issue 922893002: Merge the Sky Engine changes from the SkyDart branch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months 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
1 <sky> 1 <sky>
2 <import src="../resources/chai.sky" />
3 <import src="../resources/mocha.sky" />
4 <style> 2 <style>
5 foo { width: 100px; height: 100px; background: blue; } 3 foo { width: 100px; height: 100px; background: blue; }
6 bar { width: 100px; height: 100px; background: purple; } 4 bar { width: 100px; height: 100px; background: purple; }
7 </style> 5 </style>
8 <foo /><bar /> 6 <foo /><bar />
9 <script> 7 <script>
10 describe("elementFromPoint", function() { 8 import "../resources/third_party/unittest/unittest.dart";
11 it("should hit test", function() { 9 import "../resources/unit.dart";
10
11 import "dart:sky";
12
13 void main() {
14 initUnit();
15
16 test("should hit test", () {
12 // FIXME: We should have much better hit-testing coverage, at least: 17 // FIXME: We should have much better hit-testing coverage, at least:
13 // inline content (both sections of a wrapped run) 18 // inline content (both sections of a wrapped run)
14 // text node 19 // text node
15 // flex box 20 // flex box
16 // display: paragraph 21 // display: paragraph
17 // position: absolute 22 // position: absolute
18 // position: relative 23 // position: relative
19 // z-order (missing, zero, positive and negative) 24 // z-order (missing, zero, positive and negative)
20 assert.equal(document.elementFromPoint(50, 50).tagName, 'foo') 25 expect(document.elementFromPoint(50, 50).tagName, equals('foo'));
21 assert.equal(document.elementFromPoint(50, 150).tagName, 'bar') 26 expect(document.elementFromPoint(50, 150).tagName, equals('bar'));
22 assert.equal(document.elementFromPoint(50, 250).tagName, 'sky') 27 expect(document.elementFromPoint(50, 250).tagName, equals('sky'));
23 }); 28 });
24 }); 29 }
25 </script> 30 </script>
26 </sky> 31 </sky>
OLDNEW
« no previous file with comments | « sky/tests/harness/reftest-mismatch-expected-mismatch.sky ('k') | sky/tests/layout/document-elementFromPoint-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698