Index: LayoutTests/fast/dom/icon-url-list-apple-touch.html |
diff --git a/LayoutTests/fast/dom/icon-url-list-apple-touch.html b/LayoutTests/fast/dom/icon-url-list-apple-touch.html |
index b7c92cde4f36a519f3c75688d34751517eaa8df7..2168c3cdb9754e5546ffd45a5be5e4789bf3ccad 100644 |
--- a/LayoutTests/fast/dom/icon-url-list-apple-touch.html |
+++ b/LayoutTests/fast/dom/icon-url-list-apple-touch.html |
@@ -10,16 +10,29 @@ function runTests() { |
if (window.testRunner) |
testRunner.dumpAsText(); |
- debug('Tests that all favicons and touch icons (if ENABLE(TOUCH_ICON_LOADING)) are in document.iconURLs()'); |
+ debug('Tests that all favicons and touch icons are in document.iconURLs()'); |
// Fetch the actual list of icon URLs. |
var actualURLs = window.internals.allIconURLs(document); |
- // Print out the URL list in the document to match it against the expected list. |
- // Note that the expected order is reverse to ensure that icons seen later |
- // take precedence as required by the spec. |
- for (var i = 0; i < actualURLs.length; i++) |
- debug(actualURLs[i]); |
+ if (!actualURLs[0] || actualURLs[0] != "http://test.com/oldfavicon.ico") { |
+ debug("Test failed.. not the right icon on first place in document.iconURLs()") |
+ return |
+ } |
+ |
+ if (window.internals && window.internals.runtimeFlags.touchIconLoadingEnabled) { |
+ if (!actualURLs[1] || actualURLs[1] != "http://test.com/i/touch.png") { |
+ debug("Test failed.. apple touch icon missing or invalid.") |
+ return |
+ } |
+ |
+ if (!actualURLs[2] || actualURLs[2] != "http://test.com/i/touch-precomposed.png") { |
+ debug("Test failed.. apple touch icon missing or invalid.") |
+ return |
+ } |
+ } |
+ |
+ debug("All icons are preset and in-order in document.iconURLs()") |
} |
</script> |
</head> |