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

Unified Diff: LayoutTests/http/tests/loading/resources/preloaded.js

Issue 23861003: Enable srcset support in HTMLImageElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed a flaky test Created 7 years, 3 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
Index: LayoutTests/http/tests/loading/resources/preloaded.js
diff --git a/LayoutTests/http/tests/loading/resources/preloaded.js b/LayoutTests/http/tests/loading/resources/preloaded.js
new file mode 100644
index 0000000000000000000000000000000000000000..118975c0ab297f53c55518ef48b0f80dcd1d9c41
--- /dev/null
+++ b/LayoutTests/http/tests/loading/resources/preloaded.js
@@ -0,0 +1,20 @@
+var results=[];
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+}
+
+function checkForPreload(url, shouldbe) {
+ var preloaded = internals.isPreloaded(url);
+ if ((preloaded && shouldbe) || (!preloaded && !shouldbe))
+ results.push("PASS " + url);
+ else
+ results.push("FAIL " + url);
+}
+
+function printPreloadResults(){
+ for(var i = 0; i < results.length; i++) {
+ document.body.appendChild(document.createElement("br"));
+ document.body.appendChild(document.createTextNode(results[i]));
+ }
+}
« no previous file with comments | « LayoutTests/http/tests/loading/resources/image2.png ('k') | LayoutTests/http/tests/resources/srcset-helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698