OLD | NEW |
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> |
OLD | NEW |