| Index: sky/tests/styles/media-queries.sky
|
| diff --git a/sky/tests/styles/media-queries.sky b/sky/tests/styles/media-queries.sky
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4b220b94777206e8076037404b675729253bed72
|
| --- /dev/null
|
| +++ b/sky/tests/styles/media-queries.sky
|
| @@ -0,0 +1,29 @@
|
| +<html>
|
| +<import src="../resources/chai.sky" />
|
| +<import src="../resources/mocha.sky" />
|
| +
|
| +<style media="(max-width: 0px)">
|
| + #test { color: rgb(255, 0, 0); }
|
| +</style>
|
| +<div id="does-not-match">Should not be red.</div>
|
| +
|
| +<style media="(max-width: 10000px)">
|
| + #matches { color: rgb(255, 0, 0); }
|
| +</style>
|
| +
|
| +<div id="matches">Should be red.</div>
|
| +
|
| +<script>
|
| +describe('Media queries', function() {
|
| + it('should allow sheets to apply when they match', function() {
|
| + var element = document.getElementById('matches');
|
| + assert.equal(getComputedStyle(element).color, "rgb(255, 0, 0)");
|
| + });
|
| +
|
| + it('should cause sheets to be skipped when they do not match', function() {
|
| + var element = document.getElementById('does-not-match');
|
| + assert.equal(getComputedStyle(element).color, "rgb(0, 0, 0)");
|
| + });
|
| +});
|
| +</script>
|
| +</html>
|
|
|