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

Unified Diff: sky/tests/lowlevel/bug-438036.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
« no previous file with comments | « sky/tests/lowlevel/attribute-collection-expected.txt ('k') | sky/tests/lowlevel/bug-438036-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/lowlevel/bug-438036.sky
diff --git a/sky/tests/lowlevel/bug-438036.sky b/sky/tests/lowlevel/bug-438036.sky
index 0ff4d27859236cc88ca17883912931930091e297..35f7815ea8d252469405f5eab3ceea31a41169f6 100644
--- a/sky/tests/lowlevel/bug-438036.sky
+++ b/sky/tests/lowlevel/bug-438036.sky
@@ -1,6 +1,4 @@
<sky>
-<import src="../resources/mocha.sky" />
-<import src="../resources/chai.sky" />
<style>
div { width: 100px; height: 100px; background-color: red; }
div.wide { width: 200px; }
@@ -9,21 +7,29 @@
<div></div>
<div></div>
<script>
+import "../resources/third_party/unittest/unittest.dart";
+import "../resources/unit.dart";
-describe("Div width", function() {
- it("should grow width to 200px", function() {
+import "dart:sky";
+
+void main() {
+ initUnit();
+
+ test("should grow width to 200px", () {
var target = document.querySelector('div');
target.classList.add("wide");
- assert.equal(getComputedStyle(target).width, "200px");
+ expect(window.getComputedStyle(target).getPropertyValue("width"),
+ equals("200px"));
});
- it("should grow height to 200px", function() {
- var target = document.querySelectorAll('div')[1];
+ test("should grow height to 200px", () {
+ var target = document.querySelectorAll('div').item(1);
target.id = 'high';
- assert.equal(getComputedStyle(target).height, "200px");
+ expect(window.getComputedStyle(target).getPropertyValue("height"),
+ equals("200px"));
});
-});
+}
</script>
</sky>
« no previous file with comments | « sky/tests/lowlevel/attribute-collection-expected.txt ('k') | sky/tests/lowlevel/bug-438036-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698