mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This CL flips the switch to make Sky use Dart. TBR=eseidel@chromium.org BUG=454613 Review URL: https://codereview.chromium.org/922893002
32 lines
861 B
Plaintext
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>
|