6 testRunner
.dumpAsText();
10 document
.getElementById('console').appendChild(document
.createTextNode(message
+ "\n"));
13 function testQuery(query
, expected
)
15 var actual
= window
.styleMedia
.matchMedium(query
);
16 var message
= (actual
=== expected
) ? 'PASS' : 'FAIL';
17 message
+= ": \"" + query
+ "\" evaluates to " + (actual
? "true" : "false") + ".";
21 testQuery('(min-device-width: 0)', true);
22 testQuery('(min-device-width: 1px)', true);
23 testQuery('(min-device-width: 1deg)', false);
24 testQuery('(min-device-width: 1)', false);
25 testQuery('(min-device-width: solid)', false);
26 testQuery('(min-device-width: "red")', false);