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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« 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