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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: sky/tests/layout/document-elementFromPoint.sky
diff --git a/sky/tests/layout/document-elementFromPoint.sky b/sky/tests/layout/document-elementFromPoint.sky
index e4c12af9e2313e52940cf370d2a5743a09fb5513..817991a3c8588c02518b24b2f600c9d52639381e 100644
--- a/sky/tests/layout/document-elementFromPoint.sky
+++ b/sky/tests/layout/document-elementFromPoint.sky
@@ -1,14 +1,19 @@
<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() {
+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
@@ -17,10 +22,10 @@ describe("elementFromPoint", function() {
// 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')
+ 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>
« 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