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

Unified Diff: sky/tests/styles/media-queries.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/styles/inline-style-expected.txt ('k') | sky/tests/styles/media-queries-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/styles/media-queries.sky
diff --git a/sky/tests/styles/media-queries.sky b/sky/tests/styles/media-queries.sky
index 4b220b94777206e8076037404b675729253bed72..ff4f618738d9cf04d244be8db2b6b9d9688a90cd 100644
--- a/sky/tests/styles/media-queries.sky
+++ b/sky/tests/styles/media-queries.sky
@@ -1,6 +1,4 @@
<html>
-<import src="../resources/chai.sky" />
-<import src="../resources/mocha.sky" />
<style media="(max-width: 0px)">
#test { color: rgb(255, 0, 0); }
@@ -14,16 +12,25 @@
<div id="matches">Should be red.</div>
<script>
-describe('Media queries', function() {
- it('should allow sheets to apply when they match', function() {
+import "../resources/third_party/unittest/unittest.dart";
+import "../resources/unit.dart";
+
+import "dart:sky";
+
+void main() {
+ initUnit();
+
+ test('should allow sheets to apply when they match', () {
var element = document.getElementById('matches');
- assert.equal(getComputedStyle(element).color, "rgb(255, 0, 0)");
+ expect(window.getComputedStyle(element).getPropertyValue("color"),
+ equals("rgb(255, 0, 0)"));
});
- it('should cause sheets to be skipped when they do not match', function() {
+ test('should cause sheets to be skipped when they do not match', () {
var element = document.getElementById('does-not-match');
- assert.equal(getComputedStyle(element).color, "rgb(0, 0, 0)");
+ expect(window.getComputedStyle(element).getPropertyValue("color"),
+ "rgb(0, 0, 0)");
});
-});
+}
</script>
</html>
« no previous file with comments | « sky/tests/styles/inline-style-expected.txt ('k') | sky/tests/styles/media-queries-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698