<!DOCTYPE html> | |
<html> | |
<style style="text/css"> | |
@media screen | |
{ | |
p#bodyText {color: red; font-size: 20px;} | |
} | |
@media print | |
{ | |
p#bodyText {color: green; font-size: 40px;} | |
} | |
</style> | |
<body> | |
<p id="bodyText">Test message please ignore.</p> | |
</body> | |
<script src="../../../resources/testharness.js"></script> | |
<script src="../../../resources/testharnessreport.js"></script> | |
<script> | |
test(function () { | |
assert_equals(getComputedStyle(bodyText).fontSize, "40px") | |
}, "Checks if we are in print mode"); | |
</script> | |
</html> |