blob: 627cff66f6047663a36e6a15aa382933457561aa [file] [log] [blame]
<head>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var results=[];
function checkForPreload(url, shouldbe) {
var preloaded = internals.isPreloaded(url);
if ((preloaded && shouldbe) || (!preloaded && !shouldbe))
results.push("PASS\n");
else
results.push("FAIL\n");
}
function printResults(){
for(var i = 0; i < results.length; i++)
document.getElementsByTagName("body")[0].appendChild(document.createTextNode(results[i]));
}
</script>
<script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=1000"></script>
<script>
checkForPreload("resources/big_mq.css", true);
checkForPreload("resources/small_mq.css", false);
</script>
<link href="resources/big_mq.css" rel="stylesheet" media="screen and (min-width: 800px)">
<link href="resources/small_mq.css" rel="stylesheet" media="screen and (max-width: 799px)">
<script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=1000"></script>
<body>
<p>Preload scanner should preload only the relevant MQ external CSS</p>
<script>
printResults();
</script>