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> |