Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: LayoutTests/http/tests/loading/preload-css-test.html

Issue 13945017: External Stylesheets preloaded according to their media attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/loading/preload-css-test-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <head>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
5
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");
13 }
14 function printResults(){
15 for(var i = 0; i < results.length; i++)
16 document.getElementsByTagName("body")[0].appendChild(document.createText Node(results[i]));
17 }
18
19 </script>
20 <script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=1000"></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-widt h: 799px)">
27 <script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=1000"></script >
28
29 <body>
30 <p>Preload scanner should preload only the relevant MQ external CSS</p>
31 <script>
32 printResults();
33 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/loading/preload-css-test-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698