3 <title>Test that print restores previous media type</title>
4 <style type="text/css">
7 <script type="text/javascript" charset="utf-8">
8 if (window.layoutTestController) {
9 layoutTestController.dumpAsText();
10 layoutTestController.setMediaType("handheld");
15 var results = document.getElementById('results');
16 results.innerHTML += m + '<br>';
19 function shouldBe(aDescription, a, b)
22 log("PASS: " + aDescription + " should be '" + b + "' and is.");
24 log("FAIL: " + aDescription + " should be '" + b + "' but instead is '" + a + "'.");
30 log("Media type is set to 'handheld' to be different than the default 'screen'");
31 shouldBe("window.styleMedia.type", window.styleMedia.type, "handheld");
32 log("<br>The page is printed, which changes the media type to 'print', and then back");
34 shouldBe("window.styleMedia.type", window.styleMedia.type, "handheld");
38 <body onload="runTests()">
39 <div id="results"></div>