flutter_flutter/tests/layout/document-elementFromPoint.sky
Adam Barth f2d2e80e59 Merge the Sky Engine changes from the SkyDart branch
This CL flips the switch to make Sky use Dart.

TBR=eseidel@chromium.org
BUG=454613

Review URL: https://codereview.chromium.org/922893002
2015-02-12 15:06:03 -08:00

32 lines
861 B
Plaintext

<sky>
<style>
foo { width: 100px; height: 100px; background: blue; }
bar { width: 100px; height: 100px; background: purple; }
</style>
<foo /><bar />
<script>
import "../resources/third_party/unittest/unittest.dart";
import "../resources/unit.dart";
import "dart:sky";
void main() {
initUnit();
test("should hit test", () {
// 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)
expect(document.elementFromPoint(50, 50).tagName, equals('foo'));
expect(document.elementFromPoint(50, 150).tagName, equals('bar'));
expect(document.elementFromPoint(50, 250).tagName, equals('sky'));
});
}
</script>
</sky>