Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / loading / preload-css-test.html
blob944324df8473d8b6a20d7a4b15c72570d2cf47ce
1 <head>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
6 var results=[];
7 function checkForPreload(url, shouldbe) {
8 var preloaded = internals.isPreloaded(url);
9 if ((preloaded && shouldbe) || (!preloaded && !shouldbe))
10 results.push("PASS\n");
11 else
12 results.push("FAIL\n");
14 function printResults(){
15 for(var i = 0; i < results.length; i++)
16 document.getElementsByTagName("body")[0].appendChild(document.createTextNode(results[i]));
19 </script>
20 <script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=100"></script>
21 <script>
22 checkForPreload("resources/big_mq.css", true);
23 checkForPreload("resources/small_mq.css", false);
24 </script>
25 <link href="resources/big_mq.css" rel="stylesheet" media="screen and (min-width: 800px)">
26 <link href="resources/small_mq.css" rel="stylesheet" media="screen and (max-width: 799px)">
27 <script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=100"></script>
29 <body>
30 <p>Preload scanner should preload only the relevant MQ external CSS</p>
31 <script>
32 printResults();
33 </script>