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

Side by Side Diff: LayoutTests/fast/dom/icon-url-list-apple-touch.html

Issue 132723002: Remove compile time flag TOUCH_ICON_LOADING and use runtime flag instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix unit test case Created 6 years, 11 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/fast/dom/icon-url-list-apple-touch-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
1 <html> 1 <html>
2 <head> 2 <head>
3 <title>Original Title</title> 3 <title>Original Title</title>
4 <link rel="shortcut icon" type="image/x-icon" href="http://test.com/oldfavicon.i co"/> 4 <link rel="shortcut icon" type="image/x-icon" href="http://test.com/oldfavicon.i co"/>
5 <link rel="apple-touch-icon" type="image/png" href="http://test.com/i/touch.png" /> 5 <link rel="apple-touch-icon" type="image/png" href="http://test.com/i/touch.png" />
6 <link rel="apple-touch-icon-precomposed" type="image/png" href="http://test.com/ i/touch-precomposed.png"/> 6 <link rel="apple-touch-icon-precomposed" type="image/png" href="http://test.com/ i/touch-precomposed.png"/>
7 <script src="../../resources/js-test.js"></script> 7 <script src="../../resources/js-test.js"></script>
8 <script> 8 <script>
9 function runTests() { 9 function runTests() {
10 if (window.testRunner) 10 if (window.testRunner)
11 testRunner.dumpAsText(); 11 testRunner.dumpAsText();
12 12
13 debug('Tests that all favicons and touch icons (if ENABLE(TOUCH_ICON_LOADING )) are in document.iconURLs()'); 13 debug('Tests that all favicons and touch icons are in document.iconURLs()');
14 14
15 // Fetch the actual list of icon URLs. 15 // Fetch the actual list of icon URLs.
16 var actualURLs = window.internals.allIconURLs(document); 16 var actualURLs = window.internals.allIconURLs(document);
17 17
18 // Print out the URL list in the document to match it against the expected l ist. 18 if (!actualURLs[0] || actualURLs[0] != "http://test.com/oldfavicon.ico") {
19 // Note that the expected order is reverse to ensure that icons seen later 19 debug("Test failed.. not the right icon on first place in document.iconU RLs()")
20 // take precedence as required by the spec. 20 return
21 for (var i = 0; i < actualURLs.length; i++) 21 }
22 debug(actualURLs[i]); 22
23 if (window.internals && window.internals.runtimeFlags.touchIconLoadingEnable d) {
24 if (!actualURLs[1] || actualURLs[1] != "http://test.com/i/touch.png") {
25 debug("Test failed.. apple touch icon missing or invalid.")
26 return
27 }
28
29 if (!actualURLs[2] || actualURLs[2] != "http://test.com/i/touch-precompo sed.png") {
30 debug("Test failed.. apple touch icon missing or invalid.")
31 return
32 }
33 }
34
35 debug("All icons are preset and in-order in document.iconURLs()")
23 } 36 }
24 </script> 37 </script>
25 </head> 38 </head>
26 <body onload='runTests();'> 39 <body onload='runTests();'>
27 </body> 40 </body>
28 </html> 41 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/icon-url-list-apple-touch-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698